27
27
* @param {PositiveInteger } N - number of indexed elements
28
28
* @param {Object } x - first input array object
29
29
* @param {Collection } x.data - first input array data
30
- * @param {Function } x.get - getter
31
- * @param {Function } x.set - setter
30
+ * @param {Array<Function> } x.accessors - array element accessors
32
31
* @param {integer } strideX - `x` stride length
33
32
* @param {NonNegativeInteger } offsetX - starting `x` index
34
33
* @param {Object } y - second input array object
35
34
* @param {Collection } y.data - second input array array
36
- * @param {Function } y.get - getter
37
- * @param {Function } y.set - setter
35
+ * @param {Array<Function> } y.accessors - array element accessors
38
36
* @param {integer } strideY - `y` stride length
39
37
* @param {NonNegativeInteger } offsetY - starting `y` index
40
38
* @returns {Object } `y`
54
52
*
55
53
* var x = {
56
54
* 'data': new Complex64Array( [ 1.0, 2.0, 3.0, 4.0 ] ),
57
- * 'setter': setter,
58
- * 'getter': getter
55
+ * 'accessors': [ getter, setter ]
59
56
* };
60
57
*
61
58
* var y = {
62
59
* 'data': new Complex64Array( [ 5.0, 6.0, 7.0, 8.0 ] ),
63
- * 'setter': setter,
64
- * 'getter': getter
60
+ * 'accessors': [ getter, setter ]
65
61
* };
66
62
*
67
63
* gswap( x.data.length, x, 1, 0, y, 1, 0 );
@@ -87,8 +83,8 @@ function gswap( N, x, strideX, offsetX, y, strideY, offsetY ) {
87
83
ybuf = y . data ;
88
84
89
85
// Cache a reference to the element accessors:
90
- get = x . getter ;
91
- set = y . setter ;
86
+ get = x . accessors [ 0 ] ;
87
+ set = y . accessors [ 1 ] ;
92
88
93
89
ix = offsetX ;
94
90
iy = offsetY ;
0 commit comments