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

Function makeSparse

test/sparse_arith.cpp:34–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32
33template<typename T>
34array makeSparse(array A, int factor) {
35 A = floor(A * 1000);
36 A = A * ((A % factor) == 0) / 1000;
37 return A;
38}
39
40template<>
41array makeSparse<cfloat>(array A, int factor) {

Callers

nothing calls this directly

Calls 1

floorFunction · 0.85

Tested by

no test coverage detected