File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1717namespace sycl {
1818__SYCL_INLINE_VER_NAMESPACE (_V1) {
1919
20- template <std::size_t N, std::size_t SizeOfT>
21- constexpr std::size_t vecAlignment () {
20+ template <std::size_t N, typename T> constexpr std::size_t vecAlignment () {
2221 static_assert (N > 0 , " Invalid number of elements." );
22+ size_t SizeOfT = sizeof (T);
2323 static_assert (SizeOfT > 0 , " Invalid size of T." );
2424 // First find the "previous" vector num elements.
2525 size_t res = N >= 16 ? 16
@@ -42,12 +42,12 @@ constexpr std::size_t vecAlignment() {
4242
4343#if defined(_WIN32) || defined(_WIN64)
4444#define MARRAY_WINDOWS_ALIGN_ATTR \
45- __declspec (align (vecAlignment<NumElements, sizeof ( Type) >()))
45+ __declspec (align (vecAlignment<NumElements, Type>()))
4646#define MARRAY_LINUX_ALIGN_ATTR
4747#else
4848#define MARRAY_WINDOWS_ALIGN_ATTR
4949#define MARRAY_LINUX_ALIGN_ATTR \
50- __attribute__ ((aligned (vecAlignment<NumElements, sizeof ( Type) >())))
50+ __attribute__ ((aligned (vecAlignment<NumElements, Type>())))
5151#endif
5252
5353// / Provides a cross-patform math array class template that works on
You can’t perform that action at this time.
0 commit comments