1
0
mirror of https://github.com/fumiama/gozel.git synced 2026-06-07 01:10:24 +08:00

feat(example): impl. vadd

This commit is contained in:
源文雨
2026-03-25 00:25:24 +08:00
parent 1111b0ecc1
commit 25cb3b9741
16 changed files with 531 additions and 24 deletions

View File

@@ -0,0 +1,9 @@
#include <sycl/sycl.hpp>
extern "C" SYCL_EXTERNAL
void vector_add(double* a, double* b) {
auto item = sycl::ext::oneapi::this_work_item::get_nd_item<1>();
int idx = item.get_global_id(0);
a[idx] += b[idx];
}