1
0
mirror of https://github.com/fumiama/gozel.git synced 2026-06-09 02:24:05 +08:00

feat(ze): add event support & vadd demo & refactor (#5)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
fumiama
2026-03-28 18:00:12 +08:00
committed by GitHub
parent 163549e271
commit b821801ecd
134 changed files with 481 additions and 49 deletions

View File

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