CMS 3D CMS Logo

ROCmTestDeviceAdditionAlgo.hip.cc
Go to the documentation of this file.
1 #include <cstddef>
2 
3 #include <hip/hip_runtime.h>
4 
7 
9 
11 
12  __global__ void kernel_add_vectors_f(const float* __restrict__ in1,
13  const float* __restrict__ in2,
14  float* __restrict__ out,
15  size_t size) {
16  cms::rocmtest::add_vectors_f(in1, in2, out, size);
17  }
18 
19  void wrapper_add_vectors_f(const float* __restrict__ in1,
20  const float* __restrict__ in2,
21  float* __restrict__ out,
22  size_t size) {
23  kernel_add_vectors_f<<<32, 32>>>(in1, in2, out, size);
24  hipCheck(hipGetLastError());
25  }
26 
27 } // namespace HeterogeneousTestROCmDevicePlugins
__device__ void add_vectors_f(const float *__restrict__ in1, const float *__restrict__ in2, float *__restrict__ out, size_t size)
void wrapper_add_vectors_f(const float *__restrict__ in1, const float *__restrict__ in2, float *__restrict__ out, size_t size)
#define __global__
Definition: cudaCompat.h:19
#define hipCheck(ARG,...)
Definition: hipCheck.h:52
__global__ void kernel_add_vectors_f(const float *__restrict__ in1, const float *__restrict__ in2, float *__restrict__ out, size_t size)