llvm-runtime-resources-darwin 22.1.8 → 23.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/include/__clang_cuda_complex_builtins.h +10 -3
  2. package/include/__clang_cuda_intrinsics.h +207 -226
  3. package/include/__clang_cuda_math_forward_declares.h +5 -0
  4. package/include/__clang_cuda_runtime_wrapper.h +9 -5
  5. package/include/__clang_gpu_builtin_vars.h +71 -0
  6. package/include/__clang_gpu_device_functions.h +411 -0
  7. package/include/__clang_gpu_intrinsics.h +242 -0
  8. package/include/__clang_hip_libdevice_declares.h +0 -102
  9. package/include/__clang_hip_math.h +3 -3
  10. package/include/__clang_hip_runtime_wrapper.h +6 -1
  11. package/include/__clang_spirv_libdevice_declares.h +170 -0
  12. package/include/__clang_spirv_math.h +719 -0
  13. package/include/altivec.h +79 -9
  14. package/include/amdgpuintrin.h +2 -29
  15. package/include/amdhsa_abi.h +83 -0
  16. package/include/amo.h +89 -0
  17. package/include/andes_vector.h +5 -0
  18. package/include/arm64_neon.h +21 -0
  19. package/include/arm64intr.h +10 -0
  20. package/include/arm_acle.h +1 -0
  21. package/include/arm_neon.h +3922 -3754
  22. package/include/arm_sme.h +12 -0
  23. package/include/arm_sve.h +420 -0
  24. package/include/avx2intrin.h +4 -5
  25. package/include/avx512bmmintrin.h +174 -0
  26. package/include/avx512bmmvlintrin.h +245 -0
  27. package/include/avx512bwintrin.h +19 -29
  28. package/include/avx512fintrin.h +62 -89
  29. package/include/avx512fp16intrin.h +12 -18
  30. package/include/avx512vbmi2intrin.h +12 -16
  31. package/include/avx512vlbwintrin.h +24 -36
  32. package/include/avx512vlintrin.h +80 -96
  33. package/include/avx512vlvbmi2intrin.h +24 -32
  34. package/include/avx512vlvnniintrin.h +29 -34
  35. package/include/avx512vnniintrin.h +32 -35
  36. package/include/avx512vp2intersectintrin.h +1 -1
  37. package/include/avxvnniintrin.h +23 -18
  38. package/include/crc32intrin.h +10 -8
  39. package/include/emmintrin.h +8 -8
  40. package/include/endian.h +91 -0
  41. package/include/fuzzer/FuzzedDataProvider.h +3 -3
  42. package/include/gpuintrin.h +123 -105
  43. package/include/hlsl_alias_intrinsics_gen.inc +3869 -0
  44. package/include/hlsl_inline_intrinsics_gen.inc +546 -0
  45. package/include/hvx_hexagon_protos.h +102 -80
  46. package/include/immintrin.h +4 -2
  47. package/include/intrin.h +20 -10
  48. package/include/larchintrin.h +2 -0
  49. package/include/llvm_libc_wrappers/ctype.h +3 -2
  50. package/include/llvm_libc_wrappers/string.h +3 -2
  51. package/include/module.modulemap +16 -1
  52. package/include/nvptxintrin.h +15 -26
  53. package/include/opencl-c-base.h +7 -0
  54. package/include/opencl-c.h +163 -102
  55. package/include/openmp_wrappers/__clang_openmp_device_functions.h +14 -0
  56. package/include/openmp_wrappers/complex +7 -1
  57. package/include/openmp_wrappers/complex.h +6 -0
  58. package/include/openmp_wrappers/math.h +10 -0
  59. package/include/profile/InstrProfData.inc +65 -3
  60. package/include/ptrauth.h +90 -12
  61. package/include/riscv_bitmanip.h +7 -0
  62. package/include/riscv_corev_alu.h +2 -0
  63. package/include/riscv_crypto.h +8 -0
  64. package/include/riscv_mips.h +2 -0
  65. package/include/riscv_nds.h +3 -0
  66. package/include/riscv_ntlh.h +2 -0
  67. package/include/riscv_packed_simd.h +644 -0
  68. package/include/riscv_vector.h +43 -0
  69. package/include/sanitizer/asan_interface.h +51 -1
  70. package/include/sanitizer/common_interface_defs.h +12 -49
  71. package/include/sanitizer/safestack_interface.h +50 -0
  72. package/include/sanitizer/tysan_interface.h +36 -0
  73. package/include/sanitizer/ubsan_interface.h +30 -0
  74. package/include/sifive_vector.h +18 -0
  75. package/include/spirvintrin.h +2 -29
  76. package/include/stdint.h +5 -14
  77. package/include/vecintrin.h +1 -1
  78. package/include/wasm_simd128.h +17 -0
  79. package/include/xmmintrin.h +8 -7
  80. package/include/zos_wrappers/grp.h +19 -0
  81. package/include/zos_wrappers/locale.h +19 -0
  82. package/include/zos_wrappers/math.h +31 -0
  83. package/include/zos_wrappers/poll.h +19 -0
  84. package/include/zos_wrappers/stdlib.h +20 -0
  85. package/include/zos_wrappers/string.h +19 -0
  86. package/include/zos_wrappers/time.h +19 -0
  87. package/include/zos_wrappers/variant.h +19 -0
  88. package/lib/darwin/libclang_rt.asan_abi_ios.a +0 -0
  89. package/lib/darwin/libclang_rt.asan_abi_iossim.a +0 -0
  90. package/lib/darwin/libclang_rt.asan_abi_osx.a +0 -0
  91. package/lib/darwin/libclang_rt.asan_ios_dynamic.dylib +0 -0
  92. package/lib/darwin/libclang_rt.asan_iossim_dynamic.dylib +0 -0
  93. package/lib/darwin/libclang_rt.asan_osx_dynamic.dylib +0 -0
  94. package/lib/darwin/libclang_rt.cc_kext.a +0 -0
  95. package/lib/darwin/libclang_rt.cc_kext_ios.a +0 -0
  96. package/lib/darwin/libclang_rt.fuzzer_ios.a +0 -0
  97. package/lib/darwin/libclang_rt.fuzzer_iossim.a +0 -0
  98. package/lib/darwin/libclang_rt.fuzzer_no_main_ios.a +0 -0
  99. package/lib/darwin/libclang_rt.fuzzer_no_main_iossim.a +0 -0
  100. package/lib/darwin/libclang_rt.fuzzer_no_main_osx.a +0 -0
  101. package/lib/darwin/libclang_rt.fuzzer_osx.a +0 -0
  102. package/lib/darwin/libclang_rt.ios.a +0 -0
  103. package/lib/darwin/libclang_rt.iossim.a +0 -0
  104. package/lib/darwin/libclang_rt.lsan_ios_dynamic.dylib +0 -0
  105. package/lib/darwin/libclang_rt.lsan_iossim_dynamic.dylib +0 -0
  106. package/lib/darwin/libclang_rt.lsan_osx_dynamic.dylib +0 -0
  107. package/lib/darwin/libclang_rt.osx.a +0 -0
  108. package/lib/darwin/libclang_rt.profile_ios.a +0 -0
  109. package/lib/darwin/libclang_rt.profile_iossim.a +0 -0
  110. package/lib/darwin/libclang_rt.profile_osx.a +0 -0
  111. package/lib/darwin/libclang_rt.rtsan_ios_dynamic.dylib +0 -0
  112. package/lib/darwin/libclang_rt.rtsan_iossim_dynamic.dylib +0 -0
  113. package/lib/darwin/libclang_rt.rtsan_osx_dynamic.dylib +0 -0
  114. package/lib/darwin/libclang_rt.stats_client_ios.a +0 -0
  115. package/lib/darwin/libclang_rt.stats_client_iossim.a +0 -0
  116. package/lib/darwin/libclang_rt.stats_client_osx.a +0 -0
  117. package/lib/darwin/libclang_rt.stats_ios_dynamic.dylib +0 -0
  118. package/lib/darwin/libclang_rt.stats_iossim_dynamic.dylib +0 -0
  119. package/lib/darwin/libclang_rt.stats_osx_dynamic.dylib +0 -0
  120. package/lib/darwin/libclang_rt.tsan_ios_dynamic.dylib +0 -0
  121. package/lib/darwin/libclang_rt.tsan_iossim_dynamic.dylib +0 -0
  122. package/lib/darwin/libclang_rt.tsan_osx_dynamic.dylib +0 -0
  123. package/lib/darwin/libclang_rt.tysan_ios_dynamic.dylib +0 -0
  124. package/lib/darwin/libclang_rt.tysan_iossim_dynamic.dylib +0 -0
  125. package/lib/darwin/libclang_rt.tysan_osx_dynamic.dylib +0 -0
  126. package/lib/darwin/libclang_rt.ubsan_ios_dynamic.dylib +0 -0
  127. package/lib/darwin/libclang_rt.ubsan_iossim_dynamic.dylib +0 -0
  128. package/lib/darwin/libclang_rt.ubsan_minimal_ios.a +0 -0
  129. package/lib/darwin/libclang_rt.ubsan_minimal_ios_dynamic.dylib +0 -0
  130. package/lib/darwin/libclang_rt.ubsan_minimal_iossim.a +0 -0
  131. package/lib/darwin/libclang_rt.ubsan_minimal_iossim_dynamic.dylib +0 -0
  132. package/lib/darwin/libclang_rt.ubsan_minimal_osx.a +0 -0
  133. package/lib/darwin/libclang_rt.ubsan_minimal_osx_dynamic.dylib +0 -0
  134. package/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib +0 -0
  135. package/package.json +1 -1
  136. package/include/amxtf32intrin.h +0 -108
@@ -16,19 +16,25 @@
16
16
  // to work with CUDA and OpenMP target offloading [in C and C++ mode].)
17
17
 
18
18
  #pragma push_macro("__DEVICE__")
19
- #if defined(__OPENMP_NVPTX__) || defined(__OPENMP_AMDGCN__)
19
+ #if defined(__OPENMP_NVPTX__) || defined(__OPENMP_AMDGCN__) || \
20
+ defined(__OPENMP_SPIRV__)
20
21
  #pragma omp declare target
21
22
  #define __DEVICE__ __attribute__((noinline, nothrow, cold, weak))
22
23
  #else
23
24
  #define __DEVICE__ __device__ inline
24
25
  #endif
25
26
 
26
- #ifdef __NVPTX__
27
+ #if defined(__NVPTX__)
27
28
  // FIXME: NVPTX should use generic builtins.
28
29
  #define _SCALBNd __nv_scalbn
29
30
  #define _SCALBNf __nv_scalbnf
30
31
  #define _LOGBd __nv_logb
31
32
  #define _LOGBf __nv_logbf
33
+ #elif defined(__OPENMP_SPIRV__)
34
+ #define _SCALBNd __spirv_ocl_ldexp
35
+ #define _SCALBNf __spirv_ocl_ldexp
36
+ #define _LOGBd __spirv_ocl_logb
37
+ #define _LOGBf __spirv_ocl_logb
32
38
  #else
33
39
  #define _SCALBNd __builtin_scalbn
34
40
  #define _SCALBNf __builtin_scalbnf
@@ -220,7 +226,8 @@ __DEVICE__ float _Complex __divsc3(float __a, float __b, float __c, float __d) {
220
226
  #undef _LOGBd
221
227
  #undef _LOGBf
222
228
 
223
- #if defined(__OPENMP_NVPTX__) || defined(__OPENMP_AMDGCN__)
229
+ #if defined(__OPENMP_NVPTX__) || defined(__OPENMP_AMDGCN__) || \
230
+ defined(__OPENMP_SPIRV__)
224
231
  #pragma omp end declare target
225
232
  #endif
226
233
 
@@ -449,33 +449,33 @@ inline __device__ double2 __ldg(const double2 *ptr) {
449
449
  inline __device__ unsigned __funnelshift_l(unsigned low32, unsigned high32,
450
450
  unsigned shiftWidth) {
451
451
  unsigned result;
452
- asm("shf.l.wrap.b32 %0, %1, %2, %3;"
453
- : "=r"(result)
454
- : "r"(low32), "r"(high32), "r"(shiftWidth));
452
+ __asm__("shf.l.wrap.b32 %0, %1, %2, %3;"
453
+ : "=r"(result)
454
+ : "r"(low32), "r"(high32), "r"(shiftWidth));
455
455
  return result;
456
456
  }
457
457
  inline __device__ unsigned __funnelshift_lc(unsigned low32, unsigned high32,
458
458
  unsigned shiftWidth) {
459
459
  unsigned result;
460
- asm("shf.l.clamp.b32 %0, %1, %2, %3;"
461
- : "=r"(result)
462
- : "r"(low32), "r"(high32), "r"(shiftWidth));
460
+ __asm__("shf.l.clamp.b32 %0, %1, %2, %3;"
461
+ : "=r"(result)
462
+ : "r"(low32), "r"(high32), "r"(shiftWidth));
463
463
  return result;
464
464
  }
465
465
  inline __device__ unsigned __funnelshift_r(unsigned low32, unsigned high32,
466
466
  unsigned shiftWidth) {
467
467
  unsigned result;
468
- asm("shf.r.wrap.b32 %0, %1, %2, %3;"
469
- : "=r"(result)
470
- : "r"(low32), "r"(high32), "r"(shiftWidth));
468
+ __asm__("shf.r.wrap.b32 %0, %1, %2, %3;"
469
+ : "=r"(result)
470
+ : "r"(low32), "r"(high32), "r"(shiftWidth));
471
471
  return result;
472
472
  }
473
473
  inline __device__ unsigned __funnelshift_rc(unsigned low32, unsigned high32,
474
474
  unsigned shiftWidth) {
475
475
  unsigned ret;
476
- asm("shf.r.clamp.b32 %0, %1, %2, %3;"
477
- : "=r"(ret)
478
- : "r"(low32), "r"(high32), "r"(shiftWidth));
476
+ __asm__("shf.r.clamp.b32 %0, %1, %2, %3;"
477
+ : "=r"(ret)
478
+ : "r"(low32), "r"(high32), "r"(shiftWidth));
479
479
  return ret;
480
480
  }
481
481
 
@@ -483,38 +483,40 @@ inline __device__ unsigned __funnelshift_rc(unsigned low32, unsigned high32,
483
483
 
484
484
  #pragma push_macro("__INTRINSIC_LOAD")
485
485
  #define __INTRINSIC_LOAD(__FnName, __AsmOp, __DeclType, __TmpType, __AsmType, \
486
- __Clobber) \
486
+ __Volatile, __Clobber) \
487
487
  inline __device__ __DeclType __FnName(const __DeclType *__ptr) { \
488
488
  __TmpType __ret; \
489
- asm(__AsmOp " %0, [%1];" : __AsmType(__ret) : "l"(__ptr)__Clobber); \
489
+ __asm__ __Volatile(__AsmOp " %0, [%1];" \
490
+ : __AsmType(__ret) \
491
+ : "l"(__ptr)__Clobber); \
490
492
  return (__DeclType)__ret; \
491
493
  }
492
494
 
493
495
  #pragma push_macro("__INTRINSIC_LOAD2")
494
496
  #define __INTRINSIC_LOAD2(__FnName, __AsmOp, __DeclType, __TmpType, __AsmType, \
495
- __Clobber) \
497
+ __Volatile, __Clobber) \
496
498
  inline __device__ __DeclType __FnName(const __DeclType *__ptr) { \
497
499
  __DeclType __ret; \
498
500
  __TmpType __tmp; \
499
- asm(__AsmOp " {%0,%1}, [%2];" \
500
- : __AsmType(__tmp.x), __AsmType(__tmp.y) \
501
- : "l"(__ptr)__Clobber); \
501
+ __asm__ __Volatile(__AsmOp " {%0,%1}, [%2];" \
502
+ : __AsmType(__tmp.x), __AsmType(__tmp.y) \
503
+ : "l"(__ptr)__Clobber); \
502
504
  using __ElementType = decltype(__ret.x); \
503
- __ret.x = (__ElementType)(__tmp.x); \
505
+ __ret.x = (__ElementType)__tmp.x; \
504
506
  __ret.y = (__ElementType)__tmp.y; \
505
507
  return __ret; \
506
508
  }
507
509
 
508
510
  #pragma push_macro("__INTRINSIC_LOAD4")
509
511
  #define __INTRINSIC_LOAD4(__FnName, __AsmOp, __DeclType, __TmpType, __AsmType, \
510
- __Clobber) \
512
+ __Volatile, __Clobber) \
511
513
  inline __device__ __DeclType __FnName(const __DeclType *__ptr) { \
512
514
  __DeclType __ret; \
513
515
  __TmpType __tmp; \
514
- asm(__AsmOp " {%0,%1,%2,%3}, [%4];" \
515
- : __AsmType(__tmp.x), __AsmType(__tmp.y), __AsmType(__tmp.z), \
516
- __AsmType(__tmp.w) \
517
- : "l"(__ptr)__Clobber); \
516
+ __asm__ __Volatile(__AsmOp " {%0,%1,%2,%3}, [%4];" \
517
+ : __AsmType(__tmp.x), __AsmType(__tmp.y), \
518
+ __AsmType(__tmp.z), __AsmType(__tmp.w) \
519
+ : "l"(__ptr)__Clobber); \
518
520
  using __ElementType = decltype(__ret.x); \
519
521
  __ret.x = (__ElementType)__tmp.x; \
520
522
  __ret.y = (__ElementType)__tmp.y; \
@@ -523,179 +525,105 @@ inline __device__ unsigned __funnelshift_rc(unsigned low32, unsigned high32,
523
525
  return __ret; \
524
526
  }
525
527
 
526
- __INTRINSIC_LOAD(__ldcg, "ld.global.cg.s8", char, unsigned int, "=r", );
527
- __INTRINSIC_LOAD(__ldcg, "ld.global.cg.s8", signed char, unsigned int, "=r", );
528
- __INTRINSIC_LOAD(__ldcg, "ld.global.cg.s16", short, unsigned short, "=h", );
529
- __INTRINSIC_LOAD(__ldcg, "ld.global.cg.s32", int, unsigned int, "=r", );
530
- __INTRINSIC_LOAD(__ldcg, "ld.global.cg.s64", long long, unsigned long long,
531
- "=l", );
532
-
533
- __INTRINSIC_LOAD2(__ldcg, "ld.global.cg.v2.s8", char2, int2, "=r", );
534
- __INTRINSIC_LOAD4(__ldcg, "ld.global.cg.v4.s8", char4, int4, "=r", );
535
- __INTRINSIC_LOAD2(__ldcg, "ld.global.cg.v2.s16", short2, short2, "=h", );
536
- __INTRINSIC_LOAD4(__ldcg, "ld.global.cg.v4.s16", short4, short4, "=h", );
537
- __INTRINSIC_LOAD2(__ldcg, "ld.global.cg.v2.s32", int2, int2, "=r", );
538
- __INTRINSIC_LOAD4(__ldcg, "ld.global.cg.v4.s32", int4, int4, "=r", );
539
- __INTRINSIC_LOAD2(__ldcg, "ld.global.cg.v2.s64 ", longlong2, longlong2, "=l", );
540
-
541
- __INTRINSIC_LOAD(__ldcg, "ld.global.cg.u8", unsigned char, unsigned int,
542
- "=r", );
543
- __INTRINSIC_LOAD(__ldcg, "ld.global.cg.u16", unsigned short, unsigned short,
544
- "=h", );
545
- __INTRINSIC_LOAD(__ldcg, "ld.global.cg.u32", unsigned int, unsigned int,
546
- "=r", );
547
- __INTRINSIC_LOAD(__ldcg, "ld.global.cg.u64", unsigned long long,
548
- unsigned long long, "=l", );
549
-
550
- __INTRINSIC_LOAD2(__ldcg, "ld.global.cg.v2.u8", uchar2, int2, "=r", );
551
- __INTRINSIC_LOAD4(__ldcg, "ld.global.cg.v4.u8", uchar4, int4, "=r", );
552
- __INTRINSIC_LOAD2(__ldcg, "ld.global.cg.v2.u16", ushort2, ushort2, "=h", );
553
- __INTRINSIC_LOAD4(__ldcg, "ld.global.cg.v4.u16", ushort4, ushort4, "=h", );
554
- __INTRINSIC_LOAD2(__ldcg, "ld.global.cg.v2.u32", uint2, uint2, "=r", );
555
- __INTRINSIC_LOAD4(__ldcg, "ld.global.cg.v4.u32", uint4, uint4, "=r", );
556
- __INTRINSIC_LOAD2(__ldcg, "ld.global.cg.v2.u64", ulonglong2, ulonglong2,
557
- "=l", );
558
-
559
- __INTRINSIC_LOAD(__ldcg, "ld.global.cg.f32", float, float, "=f", );
560
- __INTRINSIC_LOAD(__ldcg, "ld.global.cg.f64", double, double, "=d", );
561
- __INTRINSIC_LOAD2(__ldcg, "ld.global.cg.v2.f32", float2, float2, "=f", );
562
- __INTRINSIC_LOAD4(__ldcg, "ld.global.cg.v4.f32", float4, float4, "=f", );
563
- __INTRINSIC_LOAD2(__ldcg, "ld.global.cg.v2.f64", double2, double2, "=d", );
564
-
565
- inline __device__ long __ldcg(const long *__ptr) {
566
- unsigned long __ret;
567
- if (sizeof(long) == 8) {
568
- asm("ld.global.cg.s64 %0, [%1];" : "=l"(__ret) : "l"(__ptr));
569
- } else {
570
- asm("ld.global.cg.s32 %0, [%1];" : "=r"(__ret) : "l"(__ptr));
528
+ #pragma push_macro("__INTRINSIC_LOAD_LONG")
529
+ #define __INTRINSIC_LOAD_LONG(__Mode) \
530
+ inline __device__ long __ld##__Mode(const long *__ptr) { \
531
+ if (__SIZEOF_LONG__ == __SIZEOF_LONG_LONG__) { \
532
+ return (long)__ld##__Mode((const long long *)__ptr); \
533
+ } else { \
534
+ return (long)__ld##__Mode((const int *)__ptr); \
535
+ } \
571
536
  }
572
- return (long)__ret;
573
- }
574
-
575
- __INTRINSIC_LOAD(__ldcv, "ld.global.cv.u8", unsigned char, unsigned int,
576
- "=r", : "memory");
577
- __INTRINSIC_LOAD(__ldcv, "ld.global.cv.u16", unsigned short, unsigned short,
578
- "=h", : "memory");
579
- __INTRINSIC_LOAD(__ldcv, "ld.global.cv.u32", unsigned int, unsigned int,
580
- "=r", : "memory");
581
- __INTRINSIC_LOAD(__ldcv, "ld.global.cv.u64", unsigned long long,
582
- unsigned long long, "=l", : "memory");
583
-
584
- __INTRINSIC_LOAD(__ldcv, "ld.global.cv.s8", char, unsigned int,
585
- "=r", : "memory");
586
- __INTRINSIC_LOAD(__ldcv, "ld.global.cv.s8", signed char, unsigned int,
587
- "=r", : "memory");
588
- __INTRINSIC_LOAD(__ldcv, "ld.global.cv.s16", short, unsigned short,
589
- "=h", : "memory");
590
- __INTRINSIC_LOAD(__ldcv, "ld.global.cv.s32", int, unsigned int,
591
- "=r", : "memory");
592
- __INTRINSIC_LOAD(__ldcv, "ld.global.cv.s64", long long, unsigned long long,
593
- "=l", : "memory");
594
-
595
- __INTRINSIC_LOAD2(__ldcv, "ld.global.cv.v2.u8", uchar2, uint2,
596
- "=r", : "memory");
597
- __INTRINSIC_LOAD4(__ldcv, "ld.global.cv.v4.u8", uchar4, uint4,
598
- "=r", : "memory");
599
- __INTRINSIC_LOAD2(__ldcv, "ld.global.cv.v2.u16", ushort2, ushort2,
600
- "=h", : "memory");
601
- __INTRINSIC_LOAD4(__ldcv, "ld.global.cv.v4.u16", ushort4, ushort4,
602
- "=h", : "memory");
603
- __INTRINSIC_LOAD2(__ldcv, "ld.global.cv.v2.u32", uint2, uint2,
604
- "=r", : "memory");
605
- __INTRINSIC_LOAD4(__ldcv, "ld.global.cv.v4.u32", uint4, uint4,
606
- "=r", : "memory");
607
- __INTRINSIC_LOAD2(__ldcv, "ld.global.cv.v2.u64", ulonglong2, ulonglong2,
608
- "=l", : "memory");
609
-
610
- __INTRINSIC_LOAD2(__ldcv, "ld.global.cv.v2.s8", char2, int2, "=r", : "memory");
611
- __INTRINSIC_LOAD4(__ldcv, "ld.global.cv.v4.s8", char4, int4, "=r", : "memory");
612
- __INTRINSIC_LOAD2(__ldcv, "ld.global.cv.v2.s16", short2, short2,
613
- "=h", : "memory");
614
- __INTRINSIC_LOAD4(__ldcv, "ld.global.cv.v4.s16", short4, short4,
615
- "=h", : "memory");
616
- __INTRINSIC_LOAD2(__ldcv, "ld.global.cv.v2.s32", int2, int2, "=r", : "memory");
617
- __INTRINSIC_LOAD4(__ldcv, "ld.global.cv.v4.s32", int4, int4, "=r", : "memory");
618
- __INTRINSIC_LOAD2(__ldcv, "ld.global.cv.v2.s64", longlong2, longlong2,
619
- "=l", : "memory");
620
-
621
- __INTRINSIC_LOAD(__ldcv, "ld.global.cv.f32", float, float, "=f", : "memory");
622
- __INTRINSIC_LOAD(__ldcv, "ld.global.cv.f64", double, double, "=d", : "memory");
623
-
624
- __INTRINSIC_LOAD2(__ldcv, "ld.global.cv.v2.f32", float2, float2,
625
- "=f", : "memory");
626
- __INTRINSIC_LOAD4(__ldcv, "ld.global.cv.v4.f32", float4, float4,
627
- "=f", : "memory");
628
- __INTRINSIC_LOAD2(__ldcv, "ld.global.cv.v2.f64", double2, double2,
629
- "=d", : "memory");
630
-
631
- inline __device__ long __ldcv(const long *__ptr) {
632
- unsigned long __ret;
633
- if (sizeof(long) == 8) {
634
- asm("ld.global.cv.s64 %0, [%1];" : "=l"(__ret) : "l"(__ptr));
635
- } else {
636
- asm("ld.global.cv.s32 %0, [%1];" : "=r"(__ret) : "l"(__ptr));
537
+
538
+ #pragma push_macro("__INTRINSIC_LOAD_ULONG")
539
+ #define __INTRINSIC_LOAD_ULONG(__Mode) \
540
+ inline __device__ unsigned long __ld##__Mode(const unsigned long *__ptr) { \
541
+ if (__SIZEOF_LONG__ == __SIZEOF_LONG_LONG__) { \
542
+ return (unsigned long)__ld##__Mode((const unsigned long long *)__ptr); \
543
+ } else { \
544
+ return (unsigned long)__ld##__Mode((const unsigned int *)__ptr); \
545
+ } \
637
546
  }
638
- return (long)__ret;
639
- }
640
-
641
- __INTRINSIC_LOAD(__ldcs, "ld.global.cs.s8", char, unsigned int, "=r", );
642
- __INTRINSIC_LOAD(__ldcs, "ld.global.cs.s8", signed char, signed int, "=r", );
643
- __INTRINSIC_LOAD(__ldcs, "ld.global.cs.s16", short, unsigned short, "=h", );
644
- __INTRINSIC_LOAD(__ldcs, "ld.global.cs.s32", int, unsigned int, "=r", );
645
- __INTRINSIC_LOAD(__ldcs, "ld.global.cs.s64", long long, unsigned long long,
646
- "=l", );
647
-
648
- __INTRINSIC_LOAD2(__ldcs, "ld.global.cs.v2.s8", char2, int2, "=r", );
649
- __INTRINSIC_LOAD4(__ldcs, "ld.global.cs.v4.s8", char4, int4, "=r", );
650
- __INTRINSIC_LOAD2(__ldcs, "ld.global.cs.v2.s16", short2, short2, "=h", );
651
- __INTRINSIC_LOAD4(__ldcs, "ld.global.cs.v4.s16", short4, short4, "=h", );
652
- __INTRINSIC_LOAD2(__ldcs, "ld.global.cs.v2.s32", int2, int2, "=r", );
653
- __INTRINSIC_LOAD4(__ldcs, "ld.global.cs.v4.s32", int4, int4, "=r", );
654
- __INTRINSIC_LOAD2(__ldcs, "ld.global.cs.v2.s64", longlong2, longlong2, "=l", );
655
-
656
- __INTRINSIC_LOAD(__ldcs, "ld.global.cs.u8", unsigned char, unsigned int,
657
- "=r", );
658
- __INTRINSIC_LOAD(__ldcs, "ld.global.cs.u16", unsigned short, unsigned short,
659
- "=h", );
660
- __INTRINSIC_LOAD(__ldcs, "ld.global.cs.u32", unsigned int, unsigned int,
661
- "=r", );
662
- __INTRINSIC_LOAD(__ldcs, "ld.global.cs.u64", unsigned long long,
663
- unsigned long long, "=l", );
664
-
665
- __INTRINSIC_LOAD2(__ldcs, "ld.global.cs.v2.u8", uchar2, uint2, "=r", );
666
- __INTRINSIC_LOAD4(__ldcs, "ld.global.cs.v4.u8", uchar4, uint4, "=r", );
667
- __INTRINSIC_LOAD2(__ldcs, "ld.global.cs.v2.u16", ushort2, ushort2, "=h", );
668
- __INTRINSIC_LOAD4(__ldcs, "ld.global.cs.v4.u16", ushort4, ushort4, "=h", );
669
- __INTRINSIC_LOAD2(__ldcs, "ld.global.cs.v2.u32", uint2, uint2, "=r", );
670
- __INTRINSIC_LOAD4(__ldcs, "ld.global.cs.v4.u32", uint4, uint4, "=r", );
671
- __INTRINSIC_LOAD2(__ldcs, "ld.global.cs.v2.u64", ulonglong2, ulonglong2,
672
- "=l", );
673
-
674
- __INTRINSIC_LOAD(__ldcs, "ld.global.cs.f32", float, float, "=f", );
675
- __INTRINSIC_LOAD(__ldcs, "ld.global.cs.f64", double, double, "=d", );
676
- __INTRINSIC_LOAD2(__ldcs, "ld.global.cs.v2.f32", float2, float2, "=f", );
677
- __INTRINSIC_LOAD4(__ldcs, "ld.global.cs.v4.f32", float4, float4, "=f", );
678
- __INTRINSIC_LOAD2(__ldcs, "ld.global.cs.v2.f64", double2, double2, "=d", );
547
+
548
+ #define __INTRINSIC_LOAD_FAMILY(__Mode, __Volatile, __Clobber) \
549
+ __INTRINSIC_LOAD(__ld##__Mode, "ld.global." #__Mode ".s8", char, \
550
+ unsigned int, "=r", __Volatile, __Clobber) \
551
+ __INTRINSIC_LOAD(__ld##__Mode, "ld.global." #__Mode ".s8", signed char, \
552
+ unsigned int, "=r", __Volatile, __Clobber) \
553
+ __INTRINSIC_LOAD(__ld##__Mode, "ld.global." #__Mode ".s16", short, \
554
+ unsigned short, "=h", __Volatile, __Clobber) \
555
+ __INTRINSIC_LOAD(__ld##__Mode, "ld.global." #__Mode ".s32", int, \
556
+ unsigned int, "=r", __Volatile, __Clobber) \
557
+ __INTRINSIC_LOAD(__ld##__Mode, "ld.global." #__Mode ".s64", long long, \
558
+ unsigned long long, "=l", __Volatile, __Clobber) \
559
+ __INTRINSIC_LOAD2(__ld##__Mode, "ld.global." #__Mode ".v2.s8", char2, int2, \
560
+ "=r", __Volatile, __Clobber) \
561
+ __INTRINSIC_LOAD4(__ld##__Mode, "ld.global." #__Mode ".v4.s8", char4, int4, \
562
+ "=r", __Volatile, __Clobber) \
563
+ __INTRINSIC_LOAD2(__ld##__Mode, "ld.global." #__Mode ".v2.s16", short2, \
564
+ short2, "=h", __Volatile, __Clobber) \
565
+ __INTRINSIC_LOAD4(__ld##__Mode, "ld.global." #__Mode ".v4.s16", short4, \
566
+ short4, "=h", __Volatile, __Clobber) \
567
+ __INTRINSIC_LOAD2(__ld##__Mode, "ld.global." #__Mode ".v2.s32", int2, int2, \
568
+ "=r", __Volatile, __Clobber) \
569
+ __INTRINSIC_LOAD4(__ld##__Mode, "ld.global." #__Mode ".v4.s32", int4, int4, \
570
+ "=r", __Volatile, __Clobber) \
571
+ __INTRINSIC_LOAD2(__ld##__Mode, "ld.global." #__Mode ".v2.s64", longlong2, \
572
+ longlong2, "=l", __Volatile, __Clobber) \
573
+ __INTRINSIC_LOAD(__ld##__Mode, "ld.global." #__Mode ".u8", unsigned char, \
574
+ unsigned int, "=r", __Volatile, __Clobber) \
575
+ __INTRINSIC_LOAD(__ld##__Mode, "ld.global." #__Mode ".u16", unsigned short, \
576
+ unsigned short, "=h", __Volatile, __Clobber) \
577
+ __INTRINSIC_LOAD(__ld##__Mode, "ld.global." #__Mode ".u32", unsigned int, \
578
+ unsigned int, "=r", __Volatile, __Clobber) \
579
+ __INTRINSIC_LOAD(__ld##__Mode, "ld.global." #__Mode ".u64", \
580
+ unsigned long long, unsigned long long, "=l", __Volatile, \
581
+ __Clobber) \
582
+ __INTRINSIC_LOAD2(__ld##__Mode, "ld.global." #__Mode ".v2.u8", uchar2, \
583
+ uint2, "=r", __Volatile, __Clobber) \
584
+ __INTRINSIC_LOAD4(__ld##__Mode, "ld.global." #__Mode ".v4.u8", uchar4, \
585
+ uint4, "=r", __Volatile, __Clobber) \
586
+ __INTRINSIC_LOAD2(__ld##__Mode, "ld.global." #__Mode ".v2.u16", ushort2, \
587
+ ushort2, "=h", __Volatile, __Clobber) \
588
+ __INTRINSIC_LOAD4(__ld##__Mode, "ld.global." #__Mode ".v4.u16", ushort4, \
589
+ ushort4, "=h", __Volatile, __Clobber) \
590
+ __INTRINSIC_LOAD2(__ld##__Mode, "ld.global." #__Mode ".v2.u32", uint2, \
591
+ uint2, "=r", __Volatile, __Clobber) \
592
+ __INTRINSIC_LOAD4(__ld##__Mode, "ld.global." #__Mode ".v4.u32", uint4, \
593
+ uint4, "=r", __Volatile, __Clobber) \
594
+ __INTRINSIC_LOAD2(__ld##__Mode, "ld.global." #__Mode ".v2.u64", ulonglong2, \
595
+ ulonglong2, "=l", __Volatile, __Clobber) \
596
+ __INTRINSIC_LOAD(__ld##__Mode, "ld.global." #__Mode ".f32", float, float, \
597
+ "=f", __Volatile, __Clobber) \
598
+ __INTRINSIC_LOAD(__ld##__Mode, "ld.global." #__Mode ".f64", double, double, \
599
+ "=d", __Volatile, __Clobber) \
600
+ __INTRINSIC_LOAD2(__ld##__Mode, "ld.global." #__Mode ".v2.f32", float2, \
601
+ float2, "=f", __Volatile, __Clobber) \
602
+ __INTRINSIC_LOAD4(__ld##__Mode, "ld.global." #__Mode ".v4.f32", float4, \
603
+ float4, "=f", __Volatile, __Clobber) \
604
+ __INTRINSIC_LOAD2(__ld##__Mode, "ld.global." #__Mode ".v2.f64", double2, \
605
+ double2, "=d", __Volatile, __Clobber) \
606
+ __INTRINSIC_LOAD_LONG(__Mode) \
607
+ __INTRINSIC_LOAD_ULONG(__Mode)
608
+
609
+ __INTRINSIC_LOAD_FAMILY(ca, __volatile__, /* no clobber */)
610
+ __INTRINSIC_LOAD_FAMILY(cg, __volatile__, /* no clobber */)
611
+ __INTRINSIC_LOAD_FAMILY(cs, __volatile__, /* no clobber */)
612
+ __INTRINSIC_LOAD_FAMILY(cv, /* not volatile */, : "memory")
613
+ __INTRINSIC_LOAD_FAMILY(lu, /* not volatile */, : "memory")
679
614
 
680
615
  #pragma pop_macro("__INTRINSIC_LOAD")
681
616
  #pragma pop_macro("__INTRINSIC_LOAD2")
682
617
  #pragma pop_macro("__INTRINSIC_LOAD4")
683
-
684
- inline __device__ long __ldcs(const long *__ptr) {
685
- unsigned long __ret;
686
- if (sizeof(long) == 8) {
687
- asm("ld.global.cs.s64 %0, [%1];" : "=l"(__ret) : "l"(__ptr));
688
- } else {
689
- asm("ld.global.cs.s32 %0, [%1];" : "=r"(__ret) : "l"(__ptr));
690
- }
691
- return (long)__ret;
692
- }
618
+ #pragma pop_macro("__INTRINSIC_LOAD_LONG")
619
+ #pragma pop_macro("__INTRINSIC_LOAD_ULONG")
620
+ #pragma pop_macro("__INTRINSIC_LOAD_FAMILY")
693
621
 
694
622
  #pragma push_macro("__INTRINSIC_STORE")
695
623
  #define __INTRINSIC_STORE(__FnName, __AsmOp, __DeclType, __TmpType, __AsmType) \
696
624
  inline __device__ void __FnName(__DeclType *__ptr, __DeclType __value) { \
697
625
  __TmpType __tmp = (__TmpType)__value; \
698
- asm(__AsmOp " [%0], %1;" ::"l"(__ptr), __AsmType(__tmp) : "memory"); \
626
+ __asm__(__AsmOp " [%0], %1;" ::"l"(__ptr), __AsmType(__tmp) : "memory"); \
699
627
  }
700
628
 
701
629
  #pragma push_macro("__INTRINSIC_STORE2")
@@ -706,9 +634,9 @@ inline __device__ long __ldcs(const long *__ptr) {
706
634
  using __ElementType = decltype(__tmp.x); \
707
635
  __tmp.x = (__ElementType)(__value.x); \
708
636
  __tmp.y = (__ElementType)(__value.y); \
709
- asm(__AsmOp " [%0], {%1,%2};" ::"l"(__ptr), __AsmType(__tmp.x), \
710
- __AsmType(__tmp.y) \
711
- : "memory"); \
637
+ __asm__(__AsmOp " [%0], {%1,%2};" ::"l"(__ptr), __AsmType(__tmp.x), \
638
+ __AsmType(__tmp.y) \
639
+ : "memory"); \
712
640
  }
713
641
 
714
642
  #pragma push_macro("__INTRINSIC_STORE4")
@@ -721,49 +649,102 @@ inline __device__ long __ldcs(const long *__ptr) {
721
649
  __tmp.y = (__ElementType)(__value.y); \
722
650
  __tmp.z = (__ElementType)(__value.z); \
723
651
  __tmp.w = (__ElementType)(__value.w); \
724
- asm(__AsmOp " [%0], {%1,%2,%3,%4};" ::"l"(__ptr), __AsmType(__tmp.x), \
725
- __AsmType(__tmp.y), __AsmType(__tmp.z), __AsmType(__tmp.w) \
726
- : "memory"); \
652
+ __asm__(__AsmOp " [%0], {%1,%2,%3,%4};" ::"l"(__ptr), __AsmType(__tmp.x), \
653
+ __AsmType(__tmp.y), __AsmType(__tmp.z), __AsmType(__tmp.w) \
654
+ : "memory"); \
655
+ }
656
+
657
+ #pragma push_macro("__INTRINSIC_STORE_LONG")
658
+ #define __INTRINSIC_STORE_LONG(__Mode) \
659
+ inline __device__ void __st##__Mode(long *__ptr, long __value) { \
660
+ if (__SIZEOF_LONG__ == __SIZEOF_LONG_LONG__) { \
661
+ __st##__Mode((long long *)__ptr, (long long)__value); \
662
+ } else { \
663
+ __st##__Mode((int *)__ptr, (int)__value); \
664
+ } \
665
+ }
666
+
667
+ #pragma push_macro("__INTRINSIC_STORE_ULONG")
668
+ #define __INTRINSIC_STORE_ULONG(__Mode) \
669
+ inline __device__ void __st##__Mode(unsigned long *__ptr, \
670
+ unsigned long __value) { \
671
+ if (__SIZEOF_LONG__ == __SIZEOF_LONG_LONG__) { \
672
+ __st##__Mode((unsigned long long *)__ptr, (unsigned long long)__value); \
673
+ } else { \
674
+ __st##__Mode((unsigned int *)__ptr, (unsigned int)__value); \
675
+ } \
727
676
  }
728
677
 
729
- __INTRINSIC_STORE(__stwt, "st.global.wt.s8", char, int, "r");
730
- __INTRINSIC_STORE(__stwt, "st.global.wt.s8", signed char, int, "r");
731
- __INTRINSIC_STORE(__stwt, "st.global.wt.s16", short, short, "h");
732
- __INTRINSIC_STORE(__stwt, "st.global.wt.s32", int, int, "r");
733
- __INTRINSIC_STORE(__stwt, "st.global.wt.s64", long long, long long, "l");
734
-
735
- __INTRINSIC_STORE2(__stwt, "st.global.wt.v2.s8", char2, int2, "r");
736
- __INTRINSIC_STORE4(__stwt, "st.global.wt.v4.s8", char4, int4, "r");
737
- __INTRINSIC_STORE2(__stwt, "st.global.wt.v2.s16", short2, short2, "h");
738
- __INTRINSIC_STORE4(__stwt, "st.global.wt.v4.s16", short4, short4, "h");
739
- __INTRINSIC_STORE2(__stwt, "st.global.wt.v2.s32", int2, int2, "r");
740
- __INTRINSIC_STORE4(__stwt, "st.global.wt.v4.s32", int4, int4, "r");
741
- __INTRINSIC_STORE2(__stwt, "st.global.wt.v2.s64", longlong2, longlong2, "l");
742
-
743
- __INTRINSIC_STORE(__stwt, "st.global.wt.u8", unsigned char, int, "r");
744
- __INTRINSIC_STORE(__stwt, "st.global.wt.u16", unsigned short, unsigned short,
745
- "h");
746
- __INTRINSIC_STORE(__stwt, "st.global.wt.u32", unsigned int, unsigned int, "r");
747
- __INTRINSIC_STORE(__stwt, "st.global.wt.u64", unsigned long long,
748
- unsigned long long, "l");
749
-
750
- __INTRINSIC_STORE2(__stwt, "st.global.wt.v2.u8", uchar2, uchar2, "r");
751
- __INTRINSIC_STORE4(__stwt, "st.global.wt.v4.u8", uchar4, uint4, "r");
752
- __INTRINSIC_STORE2(__stwt, "st.global.wt.v2.u16", ushort2, ushort2, "h");
753
- __INTRINSIC_STORE4(__stwt, "st.global.wt.v4.u16", ushort4, ushort4, "h");
754
- __INTRINSIC_STORE2(__stwt, "st.global.wt.v2.u32", uint2, uint2, "r");
755
- __INTRINSIC_STORE4(__stwt, "st.global.wt.v4.u32", uint4, uint4, "r");
756
- __INTRINSIC_STORE2(__stwt, "st.global.wt.v2.u64", ulonglong2, ulonglong2, "l");
757
-
758
- __INTRINSIC_STORE(__stwt, "st.global.wt.f32", float, float, "f");
759
- __INTRINSIC_STORE(__stwt, "st.global.wt.f64", double, double, "d");
760
- __INTRINSIC_STORE2(__stwt, "st.global.wt.v2.f32", float2, float2, "f");
761
- __INTRINSIC_STORE4(__stwt, "st.global.wt.v4.f32", float4, float4, "f");
762
- __INTRINSIC_STORE2(__stwt, "st.global.wt.v2.f64", double2, double2, "d");
678
+ #pragma push_macro("__INTRINSIC_STORE_FAMILY")
679
+ #define __INTRINSIC_STORE_FAMILY(__Mode) \
680
+ __INTRINSIC_STORE(__st##__Mode, "st.global." #__Mode ".s8", char, int, "r") \
681
+ __INTRINSIC_STORE(__st##__Mode, "st.global." #__Mode ".s8", signed char, \
682
+ int, "r") \
683
+ __INTRINSIC_STORE(__st##__Mode, "st.global." #__Mode ".s16", short, short, \
684
+ "h") \
685
+ __INTRINSIC_STORE(__st##__Mode, "st.global." #__Mode ".s32", int, int, "r") \
686
+ __INTRINSIC_STORE(__st##__Mode, "st.global." #__Mode ".s64", long long, \
687
+ long long, "l") \
688
+ __INTRINSIC_STORE2(__st##__Mode, "st.global." #__Mode ".v2.s8", char2, int2, \
689
+ "r") \
690
+ __INTRINSIC_STORE4(__st##__Mode, "st.global." #__Mode ".v4.s8", char4, int4, \
691
+ "r") \
692
+ __INTRINSIC_STORE2(__st##__Mode, "st.global." #__Mode ".v2.s16", short2, \
693
+ short2, "h") \
694
+ __INTRINSIC_STORE4(__st##__Mode, "st.global." #__Mode ".v4.s16", short4, \
695
+ short4, "h") \
696
+ __INTRINSIC_STORE2(__st##__Mode, "st.global." #__Mode ".v2.s32", int2, int2, \
697
+ "r") \
698
+ __INTRINSIC_STORE4(__st##__Mode, "st.global." #__Mode ".v4.s32", int4, int4, \
699
+ "r") \
700
+ __INTRINSIC_STORE2(__st##__Mode, "st.global." #__Mode ".v2.s64", longlong2, \
701
+ longlong2, "l") \
702
+ __INTRINSIC_STORE(__st##__Mode, "st.global." #__Mode ".u8", unsigned char, \
703
+ int, "r") \
704
+ __INTRINSIC_STORE(__st##__Mode, "st.global." #__Mode ".u16", unsigned short, \
705
+ unsigned short, "h") \
706
+ __INTRINSIC_STORE(__st##__Mode, "st.global." #__Mode ".u32", unsigned int, \
707
+ unsigned int, "r") \
708
+ __INTRINSIC_STORE(__st##__Mode, "st.global." #__Mode ".u64", \
709
+ unsigned long long, unsigned long long, "l") \
710
+ __INTRINSIC_STORE2(__st##__Mode, "st.global." #__Mode ".v2.u8", uchar2, \
711
+ uchar2, "r") \
712
+ __INTRINSIC_STORE4(__st##__Mode, "st.global." #__Mode ".v4.u8", uchar4, \
713
+ uint4, "r") \
714
+ __INTRINSIC_STORE2(__st##__Mode, "st.global." #__Mode ".v2.u16", ushort2, \
715
+ ushort2, "h") \
716
+ __INTRINSIC_STORE4(__st##__Mode, "st.global." #__Mode ".v4.u16", ushort4, \
717
+ ushort4, "h") \
718
+ __INTRINSIC_STORE2(__st##__Mode, "st.global." #__Mode ".v2.u32", uint2, \
719
+ uint2, "r") \
720
+ __INTRINSIC_STORE4(__st##__Mode, "st.global." #__Mode ".v4.u32", uint4, \
721
+ uint4, "r") \
722
+ __INTRINSIC_STORE2(__st##__Mode, "st.global." #__Mode ".v2.u64", ulonglong2, \
723
+ ulonglong2, "l") \
724
+ __INTRINSIC_STORE(__st##__Mode, "st.global." #__Mode ".f32", float, float, \
725
+ "f") \
726
+ __INTRINSIC_STORE(__st##__Mode, "st.global." #__Mode ".f64", double, double, \
727
+ "d") \
728
+ __INTRINSIC_STORE2(__st##__Mode, "st.global." #__Mode ".v2.f32", float2, \
729
+ float2, "f") \
730
+ __INTRINSIC_STORE4(__st##__Mode, "st.global." #__Mode ".v4.f32", float4, \
731
+ float4, "f") \
732
+ __INTRINSIC_STORE2(__st##__Mode, "st.global." #__Mode ".v2.f64", double2, \
733
+ double2, "d") \
734
+ __INTRINSIC_STORE_LONG(__Mode) \
735
+ __INTRINSIC_STORE_ULONG(__Mode)
736
+
737
+ __INTRINSIC_STORE_FAMILY(cg)
738
+ __INTRINSIC_STORE_FAMILY(cs)
739
+ __INTRINSIC_STORE_FAMILY(wb)
740
+ __INTRINSIC_STORE_FAMILY(wt)
763
741
 
764
742
  #pragma pop_macro("__INTRINSIC_STORE")
765
743
  #pragma pop_macro("__INTRINSIC_STORE2")
766
744
  #pragma pop_macro("__INTRINSIC_STORE4")
745
+ #pragma pop_macro("__INTRINSIC_STORE_LONG")
746
+ #pragma pop_macro("__INTRINSIC_STORE_ULONG")
747
+ #pragma pop_macro("__INTRINSIC_STORE_FAMILY")
767
748
 
768
749
  #endif // defined(__cplusplus) && (__cplusplus >= 201103L)
769
750
  #endif // !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 320
@@ -70,6 +70,11 @@ __DEVICE__ double floor(double);
70
70
  __DEVICE__ float floor(float);
71
71
  __DEVICE__ double fma(double, double, double);
72
72
  __DEVICE__ float fma(float, float, float);
73
+ #ifdef _MSC_VER
74
+ // long double fma variant is not actually supported by CUDA (PTX).
75
+ // However, MS-STL requires that this is forward declared anyways.
76
+ __DEVICE__ long double fma(long double, long double, long double);
77
+ #endif
73
78
  __DEVICE__ double fmax(double, double);
74
79
  __DEVICE__ float fmax(float, float);
75
80
  __DEVICE__ double fmin(double, double);