1function test191 2%TEST191 test split 3 4% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. 5% SPDX-License-Identifier: Apache-2.0 6 7fprintf ('test191 ----------- Tiles = split (A)\n') ; 8 9[~, ~, ~, types, ~, ~] = GB_spec_opsall ; 10types = types.all ; 11 12rng ('default') ; 13 14m = 100 ; 15n = 110 ; 16ms = [10 1 89] ; 17ns = [1 4 50 45 10] ; 18 19for d = [1e-4 0.01 0.2 0.8 inf] 20 fprintf ('\nd = %g\n', d) ; 21 for ka = 1:length (types) 22 atype = types {ka} ; 23 A = GB_spec_random (m, n, d, 128, atype) ; 24 for sparsity_control = [1 2 4 8] 25 fprintf ('.') ; 26 A.sparsity = sparsity_control ; 27 for is_csc = [0 1] 28 A.is_csc = is_csc ; 29 C2 = GB_spec_split (A, ms, ns) ; 30 C1 = GB_mex_split (A, ms, ns) ; 31 for i = 1:length(ms) 32 for j = 1:length(ns) 33 GB_spec_compare (C1 {i,j}, C2 {i,j}) ; 34 end 35 end 36 end 37 end 38 end 39end 40 41fprintf ('\n') ; 42fprintf ('test191: all tests passed\n') ; 43 44