Files
rocm-systems/tests/catch/kernels/vectorADD.inl
T
Fábio 604de0f817 EXSWCPHIPT-42 - Add HIP RTC support to the test framework (#2719)
* EXSWCPHIPT-42 - Add HIP RTC support to the test framework
* Removed ifdef from hipTestContext class
2022-06-13 15:35:02 +05:30

10 строки
311 B
C++

namespace HipTest {
template <typename T> __global__ void vectorADD(const T* A_d, const T* B_d, T* C_d, size_t NELEM) {
size_t offset = (blockIdx.x * blockDim.x + threadIdx.x);
size_t stride = blockDim.x * gridDim.x;
for (size_t i = offset; i < NELEM; i += stride) {
C_d[i] = A_d[i] + B_d[i];
}
}
}