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

Function makeSparse

test/sparse_common.hpp:33–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

floorFunction · 0.85

Tested by

no test coverage detected