@@ -272,30 +272,6 @@ template <typename T> using vec_data = detail::vec_helper<T>;
272
272
template <typename T>
273
273
using vec_data_t = typename detail::vec_helper<T>::RetType;
274
274
275
- #if !defined(__INTEL_PREVIEW_BREAKING_CHANGES)
276
-
277
- #if defined(_WIN32) && (_MSC_VER)
278
- // MSVC Compiler doesn't allow using of function arguments with alignment
279
- // requirements. MSVC Compiler Error C2719: 'parameter': formal parameter with
280
- // __declspec(align('#')) won't be aligned. The align __declspec modifier
281
- // is not permitted on function parameters. Function parameter alignment
282
- // is controlled by the calling convention used.
283
- // For more information, see Calling Conventions
284
- // (https://docs.microsoft.com/en-us/cpp/cpp/calling-conventions).
285
- // For information on calling conventions for x64 processors, see
286
- // Calling Convention
287
- // (https://docs.microsoft.com/en-us/cpp/build/x64-calling-convention).
288
- #pragma message("Alignment of class vec is not in accordance with SYCL \
289
- specification requirements, a limitation of the MSVC compiler (Error C2719).\
290
- Requested alignment applied, limited at 64.")
291
- #define __SYCL_ALIGNED_VAR (type, x, var ) \
292
- type __declspec (align((x < 64 ) ? x : 64)) var
293
- #else
294
- #define __SYCL_ALIGNED_VAR (type, x, var ) alignas (x) type var
295
- #endif
296
-
297
- #endif // ! defined(__INTEL_PREVIEW_BREAKING_CHANGES)
298
-
299
275
// / Provides a cross-patform vector class template that works efficiently on
300
276
// / SYCL devices as well as in host C++ code.
301
277
// /
@@ -1458,31 +1434,12 @@ template <typename Type, int NumElements> class vec {
1458
1434
return (NumElements == 1 ) ? getValue (Index, 0 ) : getValue (Index, 0 .f );
1459
1435
}
1460
1436
1461
- #if defined(__INTEL_PREVIEW_BREAKING_CHANGES)
1462
-
1463
1437
// fields
1464
1438
1465
- // Alignment is the same as size, to a maximum size of 64.
1466
- // detail::vector_alignment will return that value .
1439
+ // Alignment is the same as size, to a maximum size of 64 (with some
1440
+ // exceptions, see detail::vector_alignment) .
1467
1441
alignas (detail::vector_alignment<DataT, NumElements>::value) DataType m_Data;
1468
1442
1469
- #endif // defined(__INTEL_PREVIEW_BREAKING_CHANGES)
1470
-
1471
- #if !defined(__INTEL_PREVIEW_BREAKING_CHANGES)
1472
-
1473
- // fields
1474
-
1475
- // Used "__SYCL_ALIGNED_VAR" instead "alignas" to handle MSVC compiler.
1476
- // For MSVC compiler max alignment is 64, e.g. vec<double, 16> required
1477
- // alignment of 128 and MSVC compiler cann't align a parameter with requested
1478
- // alignment of 128. For alignment request larger than 64, 64-alignment
1479
- // is applied
1480
- __SYCL_ALIGNED_VAR (DataType,
1481
- (detail::vector_alignment<DataT, NumElements>::value),
1482
- m_Data);
1483
-
1484
- #endif // !defined(__INTEL_PREVIEW_BREAKING_CHANGES)
1485
-
1486
1443
// friends
1487
1444
template <typename T1, typename T2, typename T3, template <typename > class T4 ,
1488
1445
int ... T5>
@@ -2554,7 +2511,3 @@ struct CheckDeviceCopyable<
2554
2511
2555
2512
} // namespace _V1
2556
2513
} // namespace sycl
2557
-
2558
- #if !defined(__INTEL_PREVIEW_BREAKING_CHANGES)
2559
- #undef __SYCL_ALIGNED_VAR
2560
- #endif // !defined(__INTEL_PREVIEW_BREAKING_CHANGES)
0 commit comments