@@ -323,7 +323,7 @@ function unaryReduceSubarray( fcn, arrays, dims, options ) { // eslint-disable-l
323323 }
324324 // Determine whether we can avoid iteration altogether...
325325 if ( K === 0 ) {
326- if ( x . accessorProtocol || y . accessorProtocol ) {
326+ if ( y . accessorProtocol ) {
327327 return ACCESSOR_UNARY [ K ] ( fcn , arr , opts ) ;
328328 }
329329 return UNARY [ K ] ( fcn , arr , opts ) ;
@@ -376,7 +376,7 @@ function unaryReduceSubarray( fcn, arrays, dims, options ) { // eslint-disable-l
376376
377377 // Determine whether we only have one loop dimension and can thus readily perform one-dimensional iteration...
378378 if ( K === 1 ) {
379- if ( x . accessorProtocol || y . accessorProtocol ) {
379+ if ( y . accessorProtocol ) {
380380 return ACCESSOR_UNARY [ K ] ( fcn , arr , views , sl , opts ) ;
381381 }
382382 return UNARY [ K ] ( fcn , arr , views , sl , opts ) ;
@@ -396,7 +396,7 @@ function unaryReduceSubarray( fcn, arrays, dims, options ) { // eslint-disable-l
396396 arr [ j ] . strides = [ arr [ j ] . strides [ i ] ] ;
397397 }
398398 sl = [ sl [ i ] ] ;
399- if ( x . accessorProtocol || y . accessorProtocol ) {
399+ if ( y . accessorProtocol ) {
400400 return ACCESSOR_UNARY [ 1 ] ( fcn , arr , views , sl , opts ) ;
401401 }
402402 return UNARY [ 1 ] ( fcn , arr , views , sl , opts ) ;
@@ -407,7 +407,7 @@ function unaryReduceSubarray( fcn, arrays, dims, options ) { // eslint-disable-l
407407 // Determine whether we can avoid blocked iteration...
408408 if ( iox !== 0 && ioy !== 0 && iox === ioy && K <= MAX_DIMS ) {
409409 // So long as iteration for each respective array always moves in the same direction (i.e., no mixed sign strides), we can leverage cache-optimal (i.e., normal) nested loops without resorting to blocked iteration...
410- if ( x . accessorProtocol || y . accessorProtocol ) {
410+ if ( y . accessorProtocol ) {
411411 return ACCESSOR_UNARY [ K ] ( fcn , arr , views , sl , opts ) ;
412412 }
413413 return UNARY [ K ] ( fcn , arr , views , sl , opts ) ;
@@ -416,13 +416,13 @@ function unaryReduceSubarray( fcn, arrays, dims, options ) { // eslint-disable-l
416416
417417 // Determine whether we can perform blocked iteration...
418418 if ( K <= MAX_DIMS ) {
419- if ( x . accessorProtocol || y . accessorProtocol ) {
419+ if ( y . accessorProtocol ) {
420420 return BLOCKED_ACCESSOR_UNARY [ K - 2 ] ( fcn , arr , views , sl , opts ) ;
421421 }
422422 return BLOCKED_UNARY [ K - 2 ] ( fcn , arr , views , sl , opts ) ;
423423 }
424424 // Fall-through to linear view iteration without regard for how data is stored in memory (i.e., take the slow path)...
425- if ( x . accessorProtocol || y . accessorProtocol ) {
425+ if ( y . accessorProtocol ) {
426426 return accessorunarynd ( fcn , arr , views , sl , opts ) ;
427427 }
428428 unarynd ( fcn , arr , views , sl , opts ) ;
0 commit comments