Go to the documentation of this file.
8 static const char source_count[] = R
"(
11 __kernel void count_nz(__global const TYPE* g_vec,
12 __global uint* g_count,
14 const uint gid = get_global_id(0);
15 const uint gsize = get_global_size(0);
18 for (uint i = gid; i < n; i += gsize) {
24 atomic_add(g_count, count);
27 __kernel void count_mf(__global const TYPE* g_vec,
28 __global uint* g_count,
31 const uint gid = get_global_id(0);
32 const uint gsize = get_global_size(0);
35 for (uint i = gid; i < n; i += gsize) {
36 if (g_vec[i] != ref) {
41 atomic_add(g_count, count);