Global Declarations¶ Slang’s Standard Library defines the following global declarations: AcceptHitAndEndSearch AllMemoryBarrier AllMemoryBarrierWithGroupSync CANDIDATE_NON_OPAQUE_TRIANGLE CANDIDATE_PROCEDURAL_PRIMITIVE COMMITTED_NOTHING COMMITTED_PROCEDURAL_PRIMITIVE_HIT COMMITTED_TRIANGLE_HIT CallShader CheckAccessFullyMapped D3DCOLORtoUBYTE4 DeviceMemoryBarrier DeviceMemoryBarrierWithGroupSync DispatchMesh DispatchRaysDimensions DispatchRaysIndex EvaluateAttributeAtCentroid EvaluateAttributeAtSample EvaluateAttributeSnapped GeometryIndex GetAttributeAtVertex GetClusterID GetInstanceTraversable GetLssPositionsAndRadii GetRenderTargetSampleCount GetRenderTargetSamplePosition GetSpherePositionAndRadius GetTransformListHandle GetTransformListSize GetTraversableChild GetTraversableInstanceId GetTraversableObjectToWorld GetTraversableTransformType GetTraversableWorldToObject GroupMemoryBarrier GroupMemoryBarrierWithGroupSync HIT_KIND_TRIANGLE_BACK_FACE HIT_KIND_TRIANGLE_FRONT_FACE HitKind HitTriangleVertexPosition IgnoreHit InstanceID InstanceIndex InterlockedAdd InterlockedAddF16Emulated InterlockedAddF16x2 InterlockedAnd InterlockedCompareExchange InterlockedCompareExchangeFloatBitwise InterlockedCompareStore InterlockedCompareStoreFloatBitwise InterlockedExchange InterlockedMax InterlockedMin InterlockedOr InterlockedXor IsHelperLane IsLssHit IsSphereHit MaybeReorderThread NonUniformResourceIndex ObjectRayDirection ObjectRayOrigin ObjectToWorld ObjectToWorld3x4 ObjectToWorld4x3 PrimitiveIndex Process2DQuadTessFactorsAvg Process2DQuadTessFactorsMax Process2DQuadTessFactorsMin ProcessIsolineTessFactors ProcessQuadTessFactorsAvg ProcessQuadTessFactorsMax ProcessQuadTessFactorsMin ProcessTriTessFactorsAvg ProcessTriTessFactorsMax ProcessTriTessFactorsMin QuadAll QuadAny QuadReadAcrossDiagonal QuadReadAcrossX QuadReadAcrossY QuadReadLaneAt RAYQUERY_FLAG_ALLOW_OPACITY_MICROMAPS RAYQUERY_FLAG_NONE RAY_FLAG_ACCEPT_FIRST_HIT_AND_END_SEARCH RAY_FLAG_CULL_BACK_FACING_TRIANGLES RAY_FLAG_CULL_FRONT_FACING_TRIANGLES RAY_FLAG_CULL_NON_OPAQUE RAY_FLAG_CULL_OPAQUE RAY_FLAG_FORCE_NON_OPAQUE RAY_FLAG_FORCE_OMM_2_STATE RAY_FLAG_FORCE_OPAQUE RAY_FLAG_NONE RAY_FLAG_SKIP_CLOSEST_HIT_SHADER RAY_FLAG_SKIP_PROCEDURAL_PRIMITIVES RAY_FLAG_SKIP_TRIANGLES RayCurrentTime RayFlags RayTCurrent RayTMin ReorderThread ReportHit ReportHitOptix SetMeshOutputCounts TraceMotionRay TraceRay WaveActiveAllEqual WaveActiveAllTrue WaveActiveAnyTrue WaveActiveBallot WaveActiveBitAnd WaveActiveBitOr WaveActiveBitXor WaveActiveCountBits WaveActiveMax WaveActiveMin WaveActiveProduct WaveActiveSum WaveBroadcastLaneAt WaveClusteredRotate WaveGetActiveMulti WaveGetConvergedMulti WaveGetLaneCount WaveGetLaneEqMask WaveGetLaneGeMask WaveGetLaneGtMask WaveGetLaneIndex WaveGetLaneLeMask WaveGetLaneLtMask WaveGetNumWaves WaveGetWaveIndex WaveIsFirstLane WaveMatch WaveMultiBitAnd WaveMultiBitOr WaveMultiBitXor WaveMultiMax WaveMultiMin WaveMultiPrefixBitAnd WaveMultiPrefixBitOr WaveMultiPrefixBitXor WaveMultiPrefixCountBits WaveMultiPrefixExclusiveBitAnd WaveMultiPrefixExclusiveBitOr WaveMultiPrefixExclusiveBitXor WaveMultiPrefixExclusiveMax WaveMultiPrefixExclusiveMin WaveMultiPrefixExclusiveProduct WaveMultiPrefixExclusiveSum WaveMultiPrefixInclusiveBitAnd WaveMultiPrefixInclusiveBitOr WaveMultiPrefixInclusiveBitXor WaveMultiPrefixInclusiveMax WaveMultiPrefixInclusiveMin WaveMultiPrefixInclusiveProduct WaveMultiPrefixInclusiveSum WaveMultiPrefixProduct WaveMultiPrefixSum WaveMultiProduct WaveMultiSum WavePrefixBitAnd WavePrefixBitOr WavePrefixBitXor WavePrefixCountBits WavePrefixMax WavePrefixMin WavePrefixProduct WavePrefixSum WaveReadLaneAt WaveReadLaneFirst WaveRotate WaveShuffle WorkgroupCount WorkgroupSize WorldRayDirection WorldRayOrigin WorldToObject WorldToObject3x4 WorldToObject4x3 _WaveCountBits abort abs acos acosh all any asdouble asfloat asfloat16 asin asinh asint asint16 asuint asuint16 atan atan2 atanh bit_cast bitfieldExtract bitfieldInsert ceil clamp clip clock2x32ARB clockARB concat coopVecLoad coopVecLoadCoherent coopVecLoadGroupshared coopVecMatMul coopVecMatMulAdd coopVecMatMulAddPacked coopVecMatMulPacked coopVecOuterProductAccumulate coopVecReduceSumAccumulate copysign copysign_double copysign_float copysign_half cos cosh cospi countbits createDynamicObject cross cudaBlockDim cudaBlockIdx cudaThreadIdx ddx ddx_coarse ddx_fine ddy ddy_coarse ddy_fine debugBreak defaultGetDescriptorFromHandle degrees detach determinant diffPair distance divide dot dot2add dot4add_i8packed dot4add_u8packed dst enableVMMDeviceScopeCapabilityIfNeeded exp exp10 exp2 f16tof32 f32tof16 f32tof16_ fabs faceforward fdim firstbithigh firstbitlow floatCast floor fma fmax fmax3 fmedian3 fmin fmin3 fmod frac fract frexp fwidth fwidth_coarse fwidth_fine getDescriptorFromHandle getRealtimeClock getRealtimeClockLow getStringHash isfinite isinf isnan ldexp length lerp lit loadAligned log log10 log2 mad makeArrayFromElement makeTuple max max3 median3 min min3 modf msad4 mul nextafter nonuniform normalize operator* operator?: packHalf2x16 packInt4x8 packInt4x8Clamp packSnorm2x16 packSnorm4x8 packUint4x8 packUint4x8Clamp packUnorm2x16 packUnorm4x8 pack_clamp_s8 pack_clamp_u8 pack_s8 pack_u8 pow powr printf radians rcp reflect refract reinterpret reversebits rint round rsqrt saturate select sign sin sincos sinh sinpi smoothstep sqrt static_assert step storeAligned syncTorchCudaStream tan tanh tanpi transpose trunc unmodified unpackHalf2x16ToFloat unpackHalf2x16ToHalf unpackInt4x8ToInt16 unpackInt4x8ToInt32 unpackSnorm2x16ToFloat unpackSnorm2x16ToHalf unpackSnorm4x8ToFloat unpackSnorm4x8ToHalf unpackUint4x8ToUint16 unpackUint4x8ToUint32 unpackUnorm2x16ToFloat unpackUnorm2x16ToHalf unpackUnorm4x8ToFloat unpackUnorm4x8ToHalf unpack_s8s16 unpack_s8s32 unpack_u8u16 unpack_u8u32 unused updateDiff updatePair updatePrimal workgroupUniformLoad