1 //------------------------------------------------------------------------------ 2 // GB_positional_op_ip: C = positional_op (A), depending only on i 3 //------------------------------------------------------------------------------ 4 5 // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. 6 // SPDX-License-Identifier: Apache-2.0 7 8 //------------------------------------------------------------------------------ 9 10 // A can be jumbled. If A is jumbled, so is C. 11 12 { 13 14 //-------------------------------------------------------------------------- 15 // Cx = positional_op (A) 16 //-------------------------------------------------------------------------- 17 18 int64_t p ; 19 #pragma omp parallel for num_threads(nthreads) schedule(static) 20 for (p = 0 ; p < anz ; p++) 21 { 22 // GB_POSITION is either i or i+1 23 int64_t i = GBI (Ai, p, avlen) ; 24 Cx_int [p] = GB_POSITION ; 25 } 26 } 27 28 #undef GB_POSITION 29 30