spla
auto_fill.hpp
Go to the documentation of this file.
1 // Copyright (c) 2021 - 2023 SparseLinearAlgebra
3 // Autogenerated file, do not modify
5 
6 #pragma once
7 
8 static const char source_fill[] = R"(
9 
10 
11 __kernel void fill_zero(__global TYPE* values,
12  const uint n) {
13  const uint gid = get_global_id(0);
14  const uint gstride = get_global_size(0);
15  const TYPE value = 0;
16 
17  for (uint i = gid; i < n; i += gstride) {
18  values[i] = value;
19  }
20 }
21 
22 __kernel void fill_value(__global TYPE* values,
23  const uint n,
24  const TYPE value) {
25  const uint gid = get_global_id(0);
26  const uint gstride = get_global_size(0);
27 
28  for (uint i = gid; i < n; i += gstride) {
29  values[i] = value;
30  }
31 }
32 )";