Fix array length mismatches

This commit is contained in:
Rémy O 2025-01-25 12:20:35 +01:00
parent c5fd9c5b81
commit 6ed3047e41

View File

@ -383,10 +383,8 @@ shared uvec2 iq2xxs_grid[256];
void init_iq_shmem() void init_iq_shmem()
{ {
// copy the table into shared memory and sync // copy the table into shared memory and sync
if (gl_LocalInvocationIndex.x < 32) { for (uint i = gl_LocalInvocationIndex.x; i < iq2xxs_grid.length(); i += gl_WorkGroupSize.x) {
for (uint i = gl_LocalInvocationIndex.x; i < 512; i += 32) { iq2xxs_grid[i] = iq2xxs_grid_const[i];
iq2xxs_grid[i] = iq2xxs_grid_const[i];
}
} }
barrier(); barrier();
} }
@ -552,10 +550,8 @@ shared uvec2 iq2xs_grid[512];
void init_iq_shmem() void init_iq_shmem()
{ {
// copy the table into shared memory and sync // copy the table into shared memory and sync
if (gl_LocalInvocationIndex.x < 32) { for (uint i = gl_LocalInvocationIndex.x; i < iq2xs_grid.length(); i += gl_WorkGroupSize.x) {
for (uint i = gl_LocalInvocationIndex.x; i < 512; i += 32) { iq2xs_grid[i] = iq2xs_grid_const[i];
iq2xs_grid[i] = iq2xs_grid_const[i];
}
} }
barrier(); barrier();
} }
@ -843,10 +839,8 @@ shared uvec2 iq2s_grid[1024];
void init_iq_shmem() void init_iq_shmem()
{ {
// copy the table into shared memory and sync // copy the table into shared memory and sync
if (gl_LocalInvocationIndex.x < 32) { for (uint i = gl_LocalInvocationIndex.x; i < iq2s_grid.length(); i += gl_WorkGroupSize.x) {
for (uint i = gl_LocalInvocationIndex.x; i < 1024; i += 32) { iq2s_grid[i] = iq2s_grid_const[i];
iq2s_grid[i] = iq2s_grid_const[i];
}
} }
barrier(); barrier();
} }
@ -908,15 +902,13 @@ const uint32_t iq3xxs_grid_const[256] = {
0x3e1c1c1c, 0x3e1c3404, 0x3e24140c, 0x3e24240c, 0x3e2c0404, 0x3e2c0414, 0x3e2c1424, 0x3e341c04, 0x3e1c1c1c, 0x3e1c3404, 0x3e24140c, 0x3e24240c, 0x3e2c0404, 0x3e2c0414, 0x3e2c1424, 0x3e341c04,
}; };
shared uint32_t iq3xxs_grid[512]; shared uint32_t iq3xxs_grid[256];
void init_iq_shmem() void init_iq_shmem()
{ {
// copy the table into shared memory and sync // copy the table into shared memory and sync
if (gl_LocalInvocationIndex.x < 32) { for (uint i = gl_LocalInvocationIndex.x; i < iq3xxs_grid.length(); i += gl_WorkGroupSize.x) {
for (uint i = gl_LocalInvocationIndex.x; i < 512; i += 32) { iq3xxs_grid[i] = iq3xxs_grid_const[i];
iq3xxs_grid[i] = iq3xxs_grid_const[i];
}
} }
barrier(); barrier();
} }
@ -1022,10 +1014,8 @@ shared uint32_t iq3s_grid[512];
void init_iq_shmem() void init_iq_shmem()
{ {
// copy the table into shared memory and sync // copy the table into shared memory and sync
if (gl_LocalInvocationIndex.x < 32) { for (uint i = gl_LocalInvocationIndex.x; i < iq3s_grid.length(); i += gl_WorkGroupSize.x) {
for (uint i = gl_LocalInvocationIndex.x; i < 512; i += 32) { iq3s_grid[i] = iq3s_grid_const[i];
iq3s_grid[i] = iq3s_grid_const[i];
}
} }
barrier(); barrier();
} }