mirror of
https://github.com/fumiama/gozel.git
synced 2026-06-05 00:10:24 +08:00
10 lines
222 B
C++
10 lines
222 B
C++
#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];
|
|
}
|