Skip to content

Commit 60be15c

Browse files
committed
enums *.*
1 parent e645cde commit 60be15c

File tree

8 files changed

+338
-8
lines changed

8 files changed

+338
-8
lines changed

lib/es6/borderType.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
Copyright (c) 2014-2015, ArrayFire
3+
Copyright (c) 2015 Gábor Mező aka unbornchikken ([email protected])
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without modification,
7+
are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice, this
13+
list of conditions and the following disclaimer in the documentation and/or
14+
other materials provided with the distribution.
15+
16+
* Neither the name of the ArrayFire nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
24+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
27+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30+
*/
31+
32+
"use strict";
33+
34+
let borderType = module.exports = {
35+
padZero: 0,
36+
padSym: 1,
37+
AF_PAD_ZERO: 0,
38+
AF_PAD_SYM: 1
39+
};

lib/es6/connectivity.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
Copyright (c) 2014-2015, ArrayFire
3+
Copyright (c) 2015 Gábor Mező aka unbornchikken ([email protected])
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without modification,
7+
are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice, this
13+
list of conditions and the following disclaimer in the documentation and/or
14+
other materials provided with the distribution.
15+
16+
* Neither the name of the ArrayFire nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
24+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
27+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30+
*/
31+
32+
"use strict";
33+
34+
let connectivity = module.exports = {
35+
connectivity4: 4,
36+
connectivity8: 8,
37+
AF_CONNECTIVITY_4: 4,
38+
AF_CONNECTIVITY_8: 8
39+
};

lib/es6/convDomain.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
Copyright (c) 2014-2015, ArrayFire
3+
Copyright (c) 2015 Gábor Mező aka unbornchikken ([email protected])
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without modification,
7+
are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice, this
13+
list of conditions and the following disclaimer in the documentation and/or
14+
other materials provided with the distribution.
15+
16+
* Neither the name of the ArrayFire nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
24+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
27+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30+
*/
31+
32+
"use strict";
33+
34+
let convDomain = module.exports = {
35+
auto: 0, ///< ArrayFire automatically picks the right convolution algorithm
36+
spatial: 1, ///< Perform convolution in spatial domain
37+
freq: 2, ///< Perform convolution in frequency domain
38+
AF_CONV_AUTO: 0, ///< ArrayFire automatically picks the right convolution algorithm
39+
AF_CONV_SPATIAL: 1, ///< Perform convolution in spatial domain
40+
AF_CONV_FREQ: 2 ///< Perform convolution in frequency domain
41+
};

lib/es6/convMode.js

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
Copyright (c) 2014-2015, ArrayFire
3+
Copyright (c) 2015 Gábor Mező aka unbornchikken ([email protected])
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without modification,
7+
are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice, this
13+
list of conditions and the following disclaimer in the documentation and/or
14+
other materials provided with the distribution.
15+
16+
* Neither the name of the ArrayFire nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
24+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
27+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30+
*/
31+
32+
"use strict";
33+
34+
let convMode = module.exports = {
35+
///
36+
/// Output of the convolution is the same size as input
37+
///
38+
default: 0,
39+
40+
///
41+
/// Output of the convolution is signal_len + filter_len - 1
42+
///
43+
expand: 1,
44+
///
45+
/// Output of the convolution is the same size as input
46+
///
47+
AF_CONV_DEFAULT: 0,
48+
49+
///
50+
/// Output of the convolution is signal_len + filter_len - 1
51+
///
52+
AF_CONV_EXPAND: 1
53+
};

lib/es6/ext.js

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,19 @@ function Ext(self) {
9797

9898
_.extend(self, {
9999
end: -1,
100-
types: {
101-
dtype: require("./dtype"),
102-
dDype: require("./dtype"),
103-
source: require("./source"),
104-
matchType: require("./matchType"),
105-
cSpace: require("./cSpace"),
106-
CSpace: require("./cSpace"),
107-
},
100+
dtype: require("./dtype"),
101+
dDype: require("./dtype"),
102+
source: require("./source"),
103+
matchType: require("./matchType"),
104+
cSpace: require("./cSpace"),
105+
CSpace: require("./cSpace"),
106+
connectivity: require("./connectivity"),
107+
borderType: require("./borderType"),
108+
interpType: require("./interpType"),
109+
matProp: require("./matProp"),
110+
normType: require("./normType"),
111+
convMode: require("./convMode"),
112+
convDomain: require("./convDomain"),
108113
Dim4: require("./dim4"),
109114
Seq: require("./seq"),
110115
Complex: require("./complex"),

lib/es6/iterpType.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
Copyright (c) 2014-2015, ArrayFire
3+
Copyright (c) 2015 Gábor Mező aka unbornchikken ([email protected])
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without modification,
7+
are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice, this
13+
list of conditions and the following disclaimer in the documentation and/or
14+
other materials provided with the distribution.
15+
16+
* Neither the name of the ArrayFire nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
24+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
27+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30+
*/
31+
32+
"use strict";
33+
34+
let interpType = module.exports = {
35+
nearest: 0, ///< Nearest Interpolation
36+
linear: 1, ///< Linear Interpolation
37+
bilinerar : 2, ///< Bilinear Interpolation
38+
cubic: 3, ///< Cubic Interpolation,
39+
AF_INTERP_NEAREST: 0, ///< Nearest Interpolation
40+
AF_INTERP_LINEAR: 1, ///< Linear Interpolation
41+
AF_INTERP_BILINEAR : 2, ///< Bilinear Interpolation
42+
AF_INTERP_CUBIC: 3 ///< Cubic Interpolation
43+
};

lib/es6/matProp.js

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
Copyright (c) 2014-2015, ArrayFire
3+
Copyright (c) 2015 Gábor Mező aka unbornchikken ([email protected])
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without modification,
7+
are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice, this
13+
list of conditions and the following disclaimer in the documentation and/or
14+
other materials provided with the distribution.
15+
16+
* Neither the name of the ArrayFire nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
24+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
27+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30+
*/
31+
32+
"use strict";
33+
34+
let matProp = module.exports = {
35+
none : 0, ///< Default
36+
trans : 1, ///< Data needs to be transposed
37+
cTrans : 2, ///< Data needs to be conjugate tansposed
38+
upper : 32, ///< Matrix is upper triangular
39+
lower : 64, ///< Matrix is lower triangular
40+
diagUnit : 128, ///< Matrix diagonal contains unitary values
41+
sym : 512, ///< Matrix is symmetric
42+
posDef : 1024, ///< Matrix is positive definite
43+
orthog : 2048, ///< Matrix is orthogonal
44+
triDiag : 4096, ///< Matrix is tri diagonal
45+
blockDiag : 8192, ///< Matrix is block diagonal
46+
AF_MAT_NONE : 0, ///< Default
47+
AF_MAT_TRANS : 1, ///< Data needs to be transposed
48+
AF_MAT_CTRANS : 2, ///< Data needs to be conjugate tansposed
49+
AF_MAT_UPPER : 32, ///< Matrix is upper triangular
50+
AF_MAT_LOWER : 64, ///< Matrix is lower triangular
51+
AF_MAT_DIAG_UNIT : 128, ///< Matrix diagonal contains unitary values
52+
AF_MAT_SYM : 512, ///< Matrix is symmetric
53+
AF_MAT_POSDEF : 1024, ///< Matrix is positive definite
54+
AF_MAT_ORTHOG : 2048, ///< Matrix is orthogonal
55+
AF_MAT_TRI_DIAG : 4096, ///< Matrix is tri diagonal
56+
AF_MAT_BLOCK_DIAG : 8192 ///< Matrix is block diagonal
57+
};

lib/es6/normType.js

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
Copyright (c) 2014-2015, ArrayFire
3+
Copyright (c) 2015 Gábor Mező aka unbornchikken ([email protected])
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without modification,
7+
are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice, this
13+
list of conditions and the following disclaimer in the documentation and/or
14+
other materials provided with the distribution.
15+
16+
* Neither the name of the ArrayFire nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
24+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
27+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30+
*/
31+
32+
"use strict";
33+
34+
let normType = module.exports = {
35+
vector1: 1, ///< treats the input as a vector and returns the sum of absolute values
36+
vectorInf: 2, ///< treats the input as a vector and returns the max of absolute values
37+
vector2: 3, ///< treats the input as a vector and returns euclidean norm
38+
vectorP: 4, ///< treats the input as a vector and returns the p-norm
39+
matrix1: 5, ///< return the max of column sums
40+
matrixInf: 6, ///< return the max of row sums
41+
matrix2: 7, ///< returns the max singular value). Currently NOT SUPPORTED
42+
matrixLPq: 8, ///< returns Lpq-norm
43+
euclid: 3, ///< The default. Same as vector2
44+
AF_NORM_VECTOR_1: 1, ///< treats the input as a vector and returns the sum of absolute values
45+
AF_NORM_VECTOR_INF: 2, ///< treats the input as a vector and returns the max of absolute values
46+
AF_NORM_VECTOR_2: 3, ///< treats the input as a vector and returns euclidean norm
47+
AF_NORM_VECTOR_P: 4, ///< treats the input as a vector and returns the p-norm
48+
AF_NORM_MATRIX_1: 5, ///< return the max of column sums
49+
AF_NORM_MATRIX_INF: 6, ///< return the max of row sums
50+
AF_NORM_MATRIX_2: 7, ///< returns the max singular value). Currently NOT SUPPORTED
51+
AF_NORM_MATRIX_L_PQ: 8, ///< returns Lpq-norm
52+
AF_NORM_EUCLID: 3 ///< The default. Same as AF_NORM_VECTOR_2
53+
};

0 commit comments

Comments
 (0)