@@ -43,7 +43,7 @@ var MODE = 'throw';
43
43
* @param {IntegerArray } x.strides - stride lengths
44
44
* @param {NonNegativeInteger } x.offset - index offset
45
45
* @param {string } x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
46
- * @param {Function } x.getter - callback for accessing `x` data buffer elements
46
+ * @param {Array< Function> } x.accessors - accessors for accessing data buffer elements
47
47
* @param {Object } y - object containing meta data for the second input ndarray
48
48
* @param {string } y.ref - reference to original input ndarray-like object
49
49
* @param {string } y.dtype - data type
@@ -53,7 +53,7 @@ var MODE = 'throw';
53
53
* @param {IntegerArray } y.strides - stride lengths
54
54
* @param {NonNegativeInteger } y.offset - index offset
55
55
* @param {string } y.order - specifies whether `y` is row-major (C-style) or column-major (Fortran-style)
56
- * @param {Function } y.getter - callback for accessing `y` data buffer elements
56
+ * @param {Array< Function> } y.accessors - accessors for accessing data buffer elements
57
57
* @param {Object } z - object containing output ndarray meta data
58
58
* @param {string } z.dtype - data type
59
59
* @param {Collection } z.data - data buffer
@@ -62,7 +62,7 @@ var MODE = 'throw';
62
62
* @param {IntegerArray } z.strides - stride lengths
63
63
* @param {NonNegativeInteger } z.offset - index offset
64
64
* @param {string } z.order - specifies whether `z` is row-major (C-style) or column-major (Fortran-style)
65
- * @param {Function } z.setter - callback for setting `z` data buffer elements
65
+ * @param {Array< Function> } z.accessors - accessors for accessing data buffer elements
66
66
* @param {Function } fcn - function to apply
67
67
* @param {* } thisArg - function execution context
68
68
* @returns {void }
@@ -112,7 +112,7 @@ var MODE = 'throw';
112
112
* 'strides': sx,
113
113
* 'offset': ox,
114
114
* 'order': 'row-major',
115
- * 'getter ': getter
115
+ * 'accessors ': [ getter, setter ]
116
116
* };
117
117
* x.ref = x;
118
118
*
@@ -125,7 +125,7 @@ var MODE = 'throw';
125
125
* 'strides': sy,
126
126
* 'offset': ox,
127
127
* 'order': 'row-major',
128
- * 'getter ': getter
128
+ * 'accessors ': [ getter, setter ]
129
129
* };
130
130
* y.ref = y;
131
131
*
@@ -138,7 +138,7 @@ var MODE = 'throw';
138
138
* 'strides': sz,
139
139
* 'offset': oz,
140
140
* 'order': 'row-major',
141
- * 'setter ': setter
141
+ * 'accessors ': [ getter, setter ]
142
142
* };
143
143
*
144
144
* // Apply the function:
@@ -208,9 +208,9 @@ function map2( x, y, z, fcn, thisArg ) {
208
208
ordz = z . order ;
209
209
210
210
// Cache accessors:
211
- xget = x . getter ;
212
- yget = y . getter ;
213
- zset = z . setter ;
211
+ xget = x . accessors [ 0 ] ;
212
+ yget = y . accessors [ 0 ] ;
213
+ zset = z . accessors [ 1 ] ;
214
214
215
215
// Cache references to the original input arrays:
216
216
xref = x . ref ;
0 commit comments