1 //------------------------------------------------------------------------------ 2 // GB_split_full_template: split a full matrix into a full tile 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 { 11 12 //-------------------------------------------------------------------------- 13 // get C and the tile A 14 //-------------------------------------------------------------------------- 15 16 const GB_CTYPE *restrict Ax = (GB_CTYPE *) A->x ; 17 GB_CTYPE *restrict Cx = (GB_CTYPE *) C->x ; 18 19 int64_t pC ; 20 #pragma omp parallel for num_threads(C_nthreads) schedule(static) 21 for (pC = 0 ; pC < cnz ; pC++) 22 { 23 int64_t i = pC % cvlen ; 24 int64_t j = pC / cvlen ; 25 int64_t iA = aistart + i ; 26 int64_t jA = avstart + j ; 27 int64_t pA = iA + jA * avlen ; 28 // Cx [pC] = Ax [pA] ; 29 GB_COPY (pC, pA) ; 30 } 31 32 done = true ; 33 } 34 35 #undef GB_CTYPE 36 37