• Home
  • Raw
  • Download

Lines Matching refs:SIMD

73 …:BuiltInNumWorkgroups, [&](const SpirvShader::BuiltinMapping &builtin, Array<SIMD::Float> &value) {  in setWorkgroupBuiltins()
77 As<SIMD::Float>(SIMD::Int(Extract(routine->numWorkgroups, component))); in setWorkgroupBuiltins()
81 …v::BuiltInWorkgroupId, [&](const SpirvShader::BuiltinMapping &builtin, Array<SIMD::Float> &value) { in setWorkgroupBuiltins()
85 As<SIMD::Float>(SIMD::Int(workgroupID[component])); in setWorkgroupBuiltins()
89 …:BuiltInWorkgroupSize, [&](const SpirvShader::BuiltinMapping &builtin, Array<SIMD::Float> &value) { in setWorkgroupBuiltins()
93 As<SIMD::Float>(SIMD::Int(Extract(routine->workgroupSize, component))); in setWorkgroupBuiltins()
97 …::BuiltInNumSubgroups, [&](const SpirvShader::BuiltinMapping &builtin, Array<SIMD::Float> &value) { in setWorkgroupBuiltins()
99 value[builtin.FirstComponent] = As<SIMD::Float>(SIMD::Int(routine->subgroupsPerWorkgroup)); in setWorkgroupBuiltins()
102 …::BuiltInSubgroupSize, [&](const SpirvShader::BuiltinMapping &builtin, Array<SIMD::Float> &value) { in setWorkgroupBuiltins()
104 value[builtin.FirstComponent] = As<SIMD::Float>(SIMD::Int(routine->invocationsPerSubgroup)); in setWorkgroupBuiltins()
110 …upBuiltins(Pointer<Byte> data, SpirvRoutine *routine, Int workgroupID[3], SIMD::Int localInvocatio… in setSubgroupBuiltins()
119 SIMD::Int localInvocationID[3]; in setSubgroupBuiltins()
121 SIMD::Int idx = localInvocationIndex; in setSubgroupBuiltins()
122 localInvocationID[Z] = idx / SIMD::Int(workgroupSizeX * workgroupSizeY); in setSubgroupBuiltins()
123 idx -= localInvocationID[Z] * SIMD::Int(workgroupSizeX * workgroupSizeY); // modulo in setSubgroupBuiltins()
124 localInvocationID[Y] = idx / SIMD::Int(workgroupSizeX); in setSubgroupBuiltins()
125 idx -= localInvocationID[Y] * SIMD::Int(workgroupSizeX); // modulo in setSubgroupBuiltins()
129 …Int4 wgID = Insert(Insert(Insert(SIMD::Int(0), workgroupID[X], X), workgroupID[Y], Y), workgroupID… in setSubgroupBuiltins()
131 SIMD::Int globalInvocationID[3]; in setSubgroupBuiltins()
132 globalInvocationID[X] = SIMD::Int(Extract(localBase, X)) + localInvocationID[X]; in setSubgroupBuiltins()
133 globalInvocationID[Y] = SIMD::Int(Extract(localBase, Y)) + localInvocationID[Y]; in setSubgroupBuiltins()
134 globalInvocationID[Z] = SIMD::Int(Extract(localBase, Z)) + localInvocationID[Z]; in setSubgroupBuiltins()
145 …nLocalInvocationIndex, [&](const SpirvShader::BuiltinMapping &builtin, Array<SIMD::Float> &value) { in setSubgroupBuiltins()
147 value[builtin.FirstComponent] = As<SIMD::Float>(localInvocationIndex); in setSubgroupBuiltins()
150 …pv::BuiltInSubgroupId, [&](const SpirvShader::BuiltinMapping &builtin, Array<SIMD::Float> &value) { in setSubgroupBuiltins()
152 value[builtin.FirstComponent] = As<SIMD::Float>(SIMD::Int(subgroupIndex)); in setSubgroupBuiltins()
155 …ltInLocalInvocationId, [&](const SpirvShader::BuiltinMapping &builtin, Array<SIMD::Float> &value) { in setSubgroupBuiltins()
159 As<SIMD::Float>(localInvocationID[component]); in setSubgroupBuiltins()
163 …tInGlobalInvocationId, [&](const SpirvShader::BuiltinMapping &builtin, Array<SIMD::Float> &value) { in setSubgroupBuiltins()
167 As<SIMD::Float>(globalInvocationID[component]); in setSubgroupBuiltins()
198 auto localInvocationIndex = SIMD::Int(subgroupIndex * SIMD::Width) + SIMD::Int(0, 1, 2, 3); in emit()
201 auto activeLaneMask = CmpLT(localInvocationIndex, SIMD::Int(invocationsPerWorkgroup)); in emit()
219 auto invocationsPerSubgroup = SIMD::Width; in run()