Files
rocm-systems/catch/unit/rtc/saxpy.h
T
ROCm CI Service Account 0e309ebc9e SWDEV-339488 - Catch2 test for hipRTC include path (#2898)
* SWDEV-339488 - Catch2 test for hipRTC include path

Change-Id: I1f5502d1ea72ac4133f79207f2d60f86b934cf36
2022-09-26 07:39:45 +05:30

12 行
264 B
C

#include "test_header1.h"
#include "test_header2.h"
extern "C"
__global__
void saxpy(real a, realptr x, realptr y, realptr out, size_t n) {
size_t tid = blockIdx.x * blockDim.x + threadIdx.x;
if (tid < n) {
out[tid] = a * x[tid] + y[tid];
}
}