Skip to content

[SYCL] Use correct scalar types for vector elements on Windows #491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sycl/include/CL/sycl/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1741,7 +1741,7 @@ DECLARE_TYPE_T(half);
DECLARE_TYPE_T(double);

#define GET_CL_TYPE(target, num) __##target##num##_vec_t
#define GET_SCALAR_CL_TYPE(target) target
#define GET_SCALAR_CL_TYPE(target) __##target##_t

#undef DECLARE_TYPE_T
#undef DECLARE_LLTYPE_T
Expand Down
17 changes: 17 additions & 0 deletions sycl/test/basic_tests/vectors/vector_ulonglong.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// RUN: %clangxx %s -o %t.out -lOpenCL -lsycl
// RUN: %t.out

// Test that vector with 'unsigned long long' elements has enough bits to store
// value.

#define SYCL_SIMPLE_SWIZZLES
#include <CL/sycl.hpp>

int main(void) {
unsigned long long ref = 1ull - 2ull;
auto vec = cl::sycl::vec<unsigned long long, 1>(ref);
unsigned long long val = vec.template swizzle<cl::sycl::elem::s0>();

assert(val == ref);
return 0;
}