Lines Matching refs:SIMD
71 …:BuiltInNumWorkgroups, [&](const SpirvShader::BuiltinMapping &builtin, Array<SIMD::Float> &value) { in setWorkgroupBuiltins()
75 As<SIMD::Float>(SIMD::Int(Extract(routine->numWorkgroups, component))); in setWorkgroupBuiltins()
79 …v::BuiltInWorkgroupId, [&](const SpirvShader::BuiltinMapping &builtin, Array<SIMD::Float> &value) { in setWorkgroupBuiltins()
83 As<SIMD::Float>(SIMD::Int(workgroupID[component])); in setWorkgroupBuiltins()
87 …:BuiltInWorkgroupSize, [&](const SpirvShader::BuiltinMapping &builtin, Array<SIMD::Float> &value) { in setWorkgroupBuiltins()
91 As<SIMD::Float>(SIMD::Int(Extract(routine->workgroupSize, component))); in setWorkgroupBuiltins()
95 …::BuiltInNumSubgroups, [&](const SpirvShader::BuiltinMapping &builtin, Array<SIMD::Float> &value) { in setWorkgroupBuiltins()
97 value[builtin.FirstComponent] = As<SIMD::Float>(SIMD::Int(routine->subgroupsPerWorkgroup)); in setWorkgroupBuiltins()
100 …::BuiltInSubgroupSize, [&](const SpirvShader::BuiltinMapping &builtin, Array<SIMD::Float> &value) { in setWorkgroupBuiltins()
102 value[builtin.FirstComponent] = As<SIMD::Float>(SIMD::Int(routine->invocationsPerSubgroup)); in setWorkgroupBuiltins()
108 …upBuiltins(Pointer<Byte> data, SpirvRoutine *routine, Int workgroupID[3], SIMD::Int localInvocatio… in setSubgroupBuiltins()
117 SIMD::Int localInvocationID[3]; in setSubgroupBuiltins()
119 SIMD::Int idx = localInvocationIndex; in setSubgroupBuiltins()
120 localInvocationID[Z] = idx / SIMD::Int(workgroupSizeX * workgroupSizeY); in setSubgroupBuiltins()
121 idx -= localInvocationID[Z] * SIMD::Int(workgroupSizeX * workgroupSizeY); // modulo in setSubgroupBuiltins()
122 localInvocationID[Y] = idx / SIMD::Int(workgroupSizeX); in setSubgroupBuiltins()
123 idx -= localInvocationID[Y] * SIMD::Int(workgroupSizeX); // modulo in setSubgroupBuiltins()
127 …Int4 wgID = Insert(Insert(Insert(SIMD::Int(0), workgroupID[X], X), workgroupID[Y], Y), workgroupID… in setSubgroupBuiltins()
129 SIMD::Int globalInvocationID[3]; in setSubgroupBuiltins()
130 globalInvocationID[X] = SIMD::Int(Extract(localBase, X)) + localInvocationID[X]; in setSubgroupBuiltins()
131 globalInvocationID[Y] = SIMD::Int(Extract(localBase, Y)) + localInvocationID[Y]; in setSubgroupBuiltins()
132 globalInvocationID[Z] = SIMD::Int(Extract(localBase, Z)) + localInvocationID[Z]; in setSubgroupBuiltins()
143 …nLocalInvocationIndex, [&](const SpirvShader::BuiltinMapping &builtin, Array<SIMD::Float> &value) { in setSubgroupBuiltins()
145 value[builtin.FirstComponent] = As<SIMD::Float>(localInvocationIndex); in setSubgroupBuiltins()
148 …pv::BuiltInSubgroupId, [&](const SpirvShader::BuiltinMapping &builtin, Array<SIMD::Float> &value) { in setSubgroupBuiltins()
150 value[builtin.FirstComponent] = As<SIMD::Float>(SIMD::Int(subgroupIndex)); in setSubgroupBuiltins()
153 …ltInLocalInvocationId, [&](const SpirvShader::BuiltinMapping &builtin, Array<SIMD::Float> &value) { in setSubgroupBuiltins()
157 As<SIMD::Float>(localInvocationID[component]); in setSubgroupBuiltins()
161 …tInGlobalInvocationId, [&](const SpirvShader::BuiltinMapping &builtin, Array<SIMD::Float> &value) { in setSubgroupBuiltins()
165 As<SIMD::Float>(globalInvocationID[component]); in setSubgroupBuiltins()
196 auto localInvocationIndex = SIMD::Int(subgroupIndex * SIMD::Width) + SIMD::Int(0, 1, 2, 3); in emit()
199 auto activeLaneMask = CmpLT(localInvocationIndex, SIMD::Int(invocationsPerWorkgroup)); in emit()
216 auto invocationsPerSubgroup = SIMD::Width; in run()