Files
rocm-systems/projects/hip-tests/catch/unit/rtc/saxpy.h
T
systems-assistant[bot] 7105a89a51 Add 'projects/hip-tests/' from commit '5ce508401e1934053b127de5bf756dcd56a326a2'
git-subtree-dir: projects/hip-tests
git-subtree-mainline: cc7a96c46f
git-subtree-split: 5ce508401e
2025-08-10 02:09:49 +00:00

12 lines
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];
}
}