FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Allow non-standard template parameters in accessor · codeplaysoftware/computecpp-sdk@d203c35 · GitHub

This repository was archived by the owner on Aug 11, 2023. It is now read-only.

Repository navigation

Commit d203c35

Browse files
Alexander Batashev
committed
Allow non-standard template parameters in accessor
This only works if additional template parameters have default value, and that value is used when passing type to is_accessor trait.
1 parent 8114ff0 commit d203c35

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

‎include/ivka/ivka.hpp‎

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,11 @@ struct is_accessor {
4242
static constexpr auto value = false;
4343
};
4444

45-
/* More specialised: must match accessor template args exactly, and then
46-
* uses std::is_same to make sure that the thing passed in is the same
47-
* type as an accessor with the same template args. */
48-
template <template <typename, int, cl::sycl::access::mode,
49-
cl::sycl::access::target, cl::sycl::access::placeholder>
50-
class T, typename U, int d, cl::sycl::access::mode m,
45+
/* More specialised: must match accessor template. */
46+
template <typename U, int d, cl::sycl::access::mode m,
5147
cl::sycl::access::target t, cl::sycl::access::placeholder p>
52-
struct is_accessor<T<U, d, m, t, p>> {
53-
static constexpr auto value =
54-
std::is_same<T<U, d, m, t, p>, cl::sycl::accessor<U, d, m, t, p>>::value;
48+
struct is_accessor<cl::sycl::accessor<U, d, m, t, p>> {
49+
static constexpr auto value = true;
5550
};
5651

5752
/* Least specialised, chosen for most typenames. Matches the spec definition

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL