diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | main.cpp | 10 | ||||
-rw-r--r-- | subgroup.cpp | 4 |
3 files changed, 8 insertions, 8 deletions
@@ -7,7 +7,7 @@ sycltest:main.cpp $(CXX) -O3 -std=c++14 -lstdc++ -fsycl -o $@ $^ -lsycl -lOpenCL subgroup:subgroup.cpp - $(CXX) -O3 -std=c++14 -lstdc++ -fsycl -o $@ $^ -lsycl -lOpenCL + $(CXX) -O3 -std=c++14 -lstdc++ -fsycl -o $@ $^ -lsycl -lOpenCL clean: -rm sycltest @@ -38,7 +38,7 @@ public: [[intel::reqd_sub_group_size(16)]] void operator()(nd_item<1> NdItem) const { - intel::sub_group SG = NdItem.get_sub_group(); + ONEAPI::sub_group SG = NdItem.get_sub_group(); uint32_t wggid = NdItem.get_global_id(0); uint32_t sgid = SG.get_local_id().get(0); if (wggid == 0) @@ -186,7 +186,7 @@ int main() { const std::string DeviceName = Device.get_info<info::device::name>(); const std::string DeviceVendor = Device.get_info<info::device::vendor>(); - return Device.is_gpu() && DeviceName.find("HD Graphics NEO") ? 1 : -1; + return Device.is_gpu() && DeviceName.find("Gen11") ? 1 : -1; } }; @@ -199,10 +199,10 @@ int main() { const std::string DeviceName = Device.get_info<info::device::name>(); - std::cout << "Device [" << DeviceNumber << "]:" << std::endl; + std::cout << "Device [" << DeviceNumber << "]:" << DeviceName << std::endl; try { - printInfo(Device); - if (Device.is_gpu() && (DeviceName.find("HD Graphics NEO") != std::string::npos)) { + if (Device.is_gpu() && (DeviceName.find("Gen11") != std::string::npos)) { + printInfo(Device); run27pt(Device); runSubgroups(Device); } else { diff --git a/subgroup.cpp b/subgroup.cpp index 1e4bc11..59e873d 100644 --- a/subgroup.cpp +++ b/subgroup.cpp @@ -10,7 +10,7 @@ using namespace cl::sycl; template<typename T> -inline void dev_shl(intel::sub_group &SG, T &res, T l, T r, unsigned kn, unsigned cw, unsigned cid) { +inline void dev_shl(ONEAPI::sub_group &SG, T &res, T l, T r, unsigned kn, unsigned cw, unsigned cid) { T l_tmp = SG.shuffle_down(l, cw - (kn)); T r_tmp = SG.shuffle_up(r, kn); res = (cid) < kn? l_tmp : r_tmp; @@ -69,7 +69,7 @@ int main() { cgh.parallel_for<class FillBuffer>( nworkitem, [=](nd_item<1> WIid) { - intel::sub_group SG = WIid.get_sub_group(); + ONEAPI::sub_group SG = WIid.get_sub_group(); int sglid = SG.get_local_id().get(0); uint32_t i = WIid.get_global_id(0); int* cp = &c[0]; |