2022-09-26 07:39:45 +05:30
|
|
|
#include "test_header1.h"
|
|
|
|
|
#include "test_header2.h"
|
|
|
|
|
|
2025-08-20 16:28:06 +02:00
|
|
|
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];
|
|
|
|
|
}
|
2022-09-26 07:39:45 +05:30
|
|
|
}
|