MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / TEST

Function TEST

test/sparse_convert.cpp:109–125  ·  view source on GitHub ↗

Test to check failure with CSC

Source from the content-addressed store, hash-verified

107
108// Test to check failure with CSC
109TEST(SPARSE_CONVERT, CSC_ARG_ERROR) {
110 const int m = 100, n = 28, factor = 5;
111
112 array A = cpu_randu<float>(dim4(m, n));
113
114 A = makeSparse<float>(A, factor);
115
116 // Create Sparse Array of type src and dest From Dense
117 array sA = sparse(A, AF_STORAGE_CSR);
118
119 // Convert src to dest format and dest to src
120 // Use C-API to catch error
121 af_array out = 0;
122 ASSERT_EQ(AF_ERR_ARG, af_sparse_convert_to(&out, sA.get(), AF_STORAGE_CSC));
123
124 if (out != 0) af_release_array(out);
125}

Callers

nothing calls this directly

Calls 5

sparseFunction · 0.85
dim4Class · 0.50
af_sparse_convert_toFunction · 0.50
af_release_arrayFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected