CMS 3D CMS Logo

DeviceAdditionKernel.hip.cc
Go to the documentation of this file.
1 #include <cstddef>
2 
3 #include <hip/hip_runtime.h>
4 
7 
8 namespace cms::rocmtest {
9 
10  __global__ void kernel_add_vectors_f(const float* __restrict__ in1,
11  const float* __restrict__ in2,
12  float* __restrict__ out,
13  size_t size) {
14  add_vectors_f(in1, in2, out, size);
15  }
16 
17  __global__ void kernel_add_vectors_d(const double* __restrict__ in1,
18  const double* __restrict__ in2,
19  double* __restrict__ out,
20  size_t size) {
21  add_vectors_d(in1, in2, out, size);
22  }
23 
24 } // namespace cms::rocmtest
__device__ void add_vectors_f(const float *__restrict__ in1, const float *__restrict__ in2, float *__restrict__ out, size_t size)
#define __global__
Definition: cudaCompat.h:19
__global__ void kernel_add_vectors_d(const double *__restrict__ in1, const double *__restrict__ in2, double *__restrict__ out, size_t size)
__device__ void add_vectors_d(const double *__restrict__ in1, const double *__restrict__ in2, double *__restrict__ out, size_t size)
__global__ void kernel_add_vectors_f(const float *__restrict__ in1, const float *__restrict__ in2, float *__restrict__ out, size_t size)