1function test189 2%TEST189 test large assignment 3 4% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. 5% SPDX-License-Identifier: Apache-2.0 6 7fprintf ('test189 ----------- test large C(I,J)=A\n') ; 8 9rng ('default') ; 10 11n = 1e6 ; 12nz = 1e6 ; 13d = nz/n^2 ; 14C = sprand (n, n, d) ; 15A = sprand (n, n, d) ; 16I = randperm (n) ; 17J = randperm (n) ; 18nthreads_set (4, 1) ; 19% C (I,J) = A ; 20I0 = uint64 (I) - 1 ; 21J0 = uint64 (J) - 1 ; 22 23C1 = GB_mex_assign (C, [ ], [ ], A, I0, J0, [ ], 0) ; 24C2 = C ; 25C2 (I, J) = A ; 26 27assert (isequal (C1.matrix, C2)) ; 28 29fprintf ('test189: all tests passed\n') ; 30