-
Notifications
You must be signed in to change notification settings - Fork 756
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add type converters for sycl::group and sycl::nd_item (#54)
The runtime class of `sycl::group`: ``` template <int Dimensions = 1> class group { ... range<Dimensions> globalRange; range<Dimensions> localRange; range<Dimensions> groupRange; id<Dimensions> index; ... } ``` The runtime class of `sycl::nd_item`: ``` template <int dimensions = 1> class nd_item { ... item<dimensions, true> globalItem; item<dimensions, false> localItem; group<dimensions> Group; ... } ``` Example of LLVM IR generated directly from clang: ``` %"class.cl::sycl::group" = type { %"class.cl::sycl::range", %"class.cl::sycl::range", %"class.cl::sycl::range", %"class.cl::sycl::id" } %"class.cl::sycl::nd_item" = type { %"class.cl::sycl::item", %"class.cl::sycl::item.0", %"class.cl::sycl::group" } %"class.cl::sycl::item" = type { %"struct.cl::sycl::detail::ItemBase" } %"class.cl::sycl::item.0" = type { %"struct.cl::sycl::detail::ItemBase.1" } %"struct.cl::sycl::detail::ItemBase" = type { %"class.cl::sycl::range", %"class.cl::sycl::id", %"class.cl::sycl::id" } %"struct.cl::sycl::detail::ItemBase.1" = type { %"class.cl::sycl::range", %"class.cl::sycl::id" } ``` Signed-off-by: Tsang, Whitney <whitney.tsang@intel.com>
- Loading branch information
1 parent
133be13
commit 9656ebf
Showing
2 changed files
with
81 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters