summaryrefslogtreecommitdiff
path: root/kompute-shaders/op_getrows.comp
diff options
context:
space:
mode:
Diffstat (limited to 'kompute-shaders/op_getrows.comp')
-rw-r--r--kompute-shaders/op_getrows.comp17
1 files changed, 17 insertions, 0 deletions
diff --git a/kompute-shaders/op_getrows.comp b/kompute-shaders/op_getrows.comp
new file mode 100644
index 00000000..1a5581b2
--- /dev/null
+++ b/kompute-shaders/op_getrows.comp
@@ -0,0 +1,17 @@
+void main() {
+ const uint i = gl_WorkGroupID.x;
+ const int r = inB[i + pcs.inBOff];
+
+ int z = 0;
+ for (uint ind = gl_LocalInvocationID.x; ind < pcs.ne00/16; ind += gl_WorkGroupSize.x) {
+ const uint inIndex = (r * pcs.nb01 + pcs.inAOff) + ind/NL * SIZE_OF_BLOCK;
+ const mat4 result = dequantize_block(inIndex, ind%NL);
+ for (uint j = 0; j < 4; ++j) {
+ for (uint k = 0; k < 4; ++k) {
+ const uint outIndex = i * pcs.nb1/BYTES_FOR_TYPE + pcs.outOff + z;
+ out_[outIndex] = result[j][k];
+ ++z;
+ }
+ }
+ }
+}