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.
- package/include/__clang_cuda_complex_builtins.h +10 -3
- package/include/__clang_cuda_intrinsics.h +207 -226
- package/include/__clang_cuda_math_forward_declares.h +5 -0
- package/include/__clang_cuda_runtime_wrapper.h +9 -5
- package/include/__clang_gpu_builtin_vars.h +71 -0
- package/include/__clang_gpu_device_functions.h +411 -0
- package/include/__clang_gpu_intrinsics.h +242 -0
- package/include/__clang_hip_libdevice_declares.h +0 -102
- package/include/__clang_hip_math.h +3 -3
- package/include/__clang_hip_runtime_wrapper.h +6 -1
- package/include/__clang_spirv_libdevice_declares.h +170 -0
- package/include/__clang_spirv_math.h +719 -0
- package/include/altivec.h +79 -9
- package/include/amdgpuintrin.h +2 -29
- package/include/amdhsa_abi.h +83 -0
- package/include/amo.h +89 -0
- package/include/andes_vector.h +5 -0
- package/include/arm64_neon.h +21 -0
- package/include/arm64intr.h +10 -0
- package/include/arm_acle.h +1 -0
- package/include/arm_neon.h +3922 -3754
- package/include/arm_sme.h +12 -0
- package/include/arm_sve.h +420 -0
- package/include/avx2intrin.h +4 -5
- package/include/avx512bmmintrin.h +174 -0
- package/include/avx512bmmvlintrin.h +245 -0
- package/include/avx512bwintrin.h +19 -29
- package/include/avx512fintrin.h +62 -89
- package/include/avx512fp16intrin.h +12 -18
- package/include/avx512vbmi2intrin.h +12 -16
- package/include/avx512vlbwintrin.h +24 -36
- package/include/avx512vlintrin.h +80 -96
- package/include/avx512vlvbmi2intrin.h +24 -32
- package/include/avx512vlvnniintrin.h +29 -34
- package/include/avx512vnniintrin.h +32 -35
- package/include/avx512vp2intersectintrin.h +1 -1
- package/include/avxvnniintrin.h +23 -18
- package/include/crc32intrin.h +10 -8
- package/include/emmintrin.h +8 -8
- package/include/endian.h +91 -0
- package/include/fuzzer/FuzzedDataProvider.h +3 -3
- package/include/gpuintrin.h +123 -105
- package/include/hlsl_alias_intrinsics_gen.inc +3869 -0
- package/include/hlsl_inline_intrinsics_gen.inc +546 -0
- package/include/hvx_hexagon_protos.h +102 -80
- package/include/immintrin.h +4 -2
- package/include/intrin.h +20 -10
- package/include/larchintrin.h +2 -0
- package/include/llvm_libc_wrappers/ctype.h +3 -2
- package/include/llvm_libc_wrappers/string.h +3 -2
- package/include/module.modulemap +16 -1
- package/include/nvptxintrin.h +15 -26
- package/include/opencl-c-base.h +7 -0
- package/include/opencl-c.h +163 -102
- package/include/openmp_wrappers/__clang_openmp_device_functions.h +14 -0
- package/include/openmp_wrappers/complex +7 -1
- package/include/openmp_wrappers/complex.h +6 -0
- package/include/openmp_wrappers/math.h +10 -0
- package/include/profile/InstrProfData.inc +65 -3
- package/include/ptrauth.h +90 -12
- package/include/riscv_bitmanip.h +7 -0
- package/include/riscv_corev_alu.h +2 -0
- package/include/riscv_crypto.h +8 -0
- package/include/riscv_mips.h +2 -0
- package/include/riscv_nds.h +3 -0
- package/include/riscv_ntlh.h +2 -0
- package/include/riscv_packed_simd.h +644 -0
- package/include/riscv_vector.h +43 -0
- package/include/sanitizer/asan_interface.h +51 -1
- package/include/sanitizer/common_interface_defs.h +12 -49
- package/include/sanitizer/safestack_interface.h +50 -0
- package/include/sanitizer/tysan_interface.h +36 -0
- package/include/sanitizer/ubsan_interface.h +30 -0
- package/include/sifive_vector.h +18 -0
- package/include/spirvintrin.h +2 -29
- package/include/stdint.h +5 -14
- package/include/vecintrin.h +1 -1
- package/include/wasm_simd128.h +17 -0
- package/include/xmmintrin.h +8 -7
- package/include/zos_wrappers/grp.h +19 -0
- package/include/zos_wrappers/locale.h +19 -0
- package/include/zos_wrappers/math.h +31 -0
- package/include/zos_wrappers/poll.h +19 -0
- package/include/zos_wrappers/stdlib.h +20 -0
- package/include/zos_wrappers/string.h +19 -0
- package/include/zos_wrappers/time.h +19 -0
- package/include/zos_wrappers/variant.h +19 -0
- package/lib/darwin/libclang_rt.asan_abi_ios.a +0 -0
- package/lib/darwin/libclang_rt.asan_abi_iossim.a +0 -0
- package/lib/darwin/libclang_rt.asan_abi_osx.a +0 -0
- package/lib/darwin/libclang_rt.asan_ios_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.asan_iossim_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.asan_osx_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.cc_kext.a +0 -0
- package/lib/darwin/libclang_rt.cc_kext_ios.a +0 -0
- package/lib/darwin/libclang_rt.fuzzer_ios.a +0 -0
- package/lib/darwin/libclang_rt.fuzzer_iossim.a +0 -0
- package/lib/darwin/libclang_rt.fuzzer_no_main_ios.a +0 -0
- package/lib/darwin/libclang_rt.fuzzer_no_main_iossim.a +0 -0
- package/lib/darwin/libclang_rt.fuzzer_no_main_osx.a +0 -0
- package/lib/darwin/libclang_rt.fuzzer_osx.a +0 -0
- package/lib/darwin/libclang_rt.ios.a +0 -0
- package/lib/darwin/libclang_rt.iossim.a +0 -0
- package/lib/darwin/libclang_rt.lsan_ios_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.lsan_iossim_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.lsan_osx_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.osx.a +0 -0
- package/lib/darwin/libclang_rt.profile_ios.a +0 -0
- package/lib/darwin/libclang_rt.profile_iossim.a +0 -0
- package/lib/darwin/libclang_rt.profile_osx.a +0 -0
- package/lib/darwin/libclang_rt.rtsan_ios_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.rtsan_iossim_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.rtsan_osx_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.stats_client_ios.a +0 -0
- package/lib/darwin/libclang_rt.stats_client_iossim.a +0 -0
- package/lib/darwin/libclang_rt.stats_client_osx.a +0 -0
- package/lib/darwin/libclang_rt.stats_ios_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.stats_iossim_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.stats_osx_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.tsan_ios_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.tsan_iossim_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.tsan_osx_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.tysan_ios_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.tysan_iossim_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.tysan_osx_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.ubsan_ios_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.ubsan_iossim_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.ubsan_minimal_ios.a +0 -0
- package/lib/darwin/libclang_rt.ubsan_minimal_ios_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.ubsan_minimal_iossim.a +0 -0
- package/lib/darwin/libclang_rt.ubsan_minimal_iossim_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.ubsan_minimal_osx.a +0 -0
- package/lib/darwin/libclang_rt.ubsan_minimal_osx_dynamic.dylib +0 -0
- package/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib +0 -0
- package/package.json +1 -1
- 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
|
-
#
|
|
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
|
-
|
|
453
|
-
|
|
454
|
-
|
|
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
|
-
|
|
461
|
-
|
|
462
|
-
|
|
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
|
-
|
|
469
|
-
|
|
470
|
-
|
|
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
|
-
|
|
477
|
-
|
|
478
|
-
|
|
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
|
-
|
|
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
|
-
|
|
500
|
-
|
|
501
|
-
|
|
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)
|
|
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
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
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
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
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
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
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
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
__INTRINSIC_LOAD(
|
|
643
|
-
|
|
644
|
-
__INTRINSIC_LOAD(
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
__INTRINSIC_LOAD2(
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
__INTRINSIC_LOAD2(
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
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
|
-
|
|
685
|
-
|
|
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
|
-
|
|
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
|
-
|
|
710
|
-
|
|
711
|
-
|
|
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
|
-
|
|
725
|
-
|
|
726
|
-
|
|
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
|
-
|
|
730
|
-
|
|
731
|
-
__INTRINSIC_STORE(
|
|
732
|
-
__INTRINSIC_STORE(
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
__INTRINSIC_STORE2(
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
__INTRINSIC_STORE(
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
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);
|