You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using a typedef'd type as a non-type template parameter (to name a kernel) produces a compilation error. The error indicates that two declarations are seen - with the second using int rather than the alias name (here sz_t). The code below produces the error.
#include <CL/sycl.hpp>
using sz_t = unsigned long;
namespace kernels {
template <sz_t> class K; // Could be size_t
}
int main(int argc, char *argv[])
{
using namespace cl::sycl;
queue q;
q.submit([&](handler &cgh) {
cgh.parallel_for<kernels::K<0>>(range<1>{64}, [=](id<1> ix) {
ix[0];
});
});
return 0;
}
The text was updated successfully, but these errors were encountered:
pkeir
changed the title
Using an aliased type as the type of a non-type template parameter
[SYCL] Using an aliased type as the type of a non-type template parameter used naming a SYCL kernel
May 31, 2019
Using a typedef'd type as a non-type template parameter (to name a kernel) produces a compilation error. The error indicates that two declarations are seen - with the second using
int
rather than the alias name (heresz_t
). The code below produces the error.The text was updated successfully, but these errors were encountered: