Updated the array_multiplication example
Signed-off-by: Fabian Sauter <sauter.fabian@mailbox.org>
This commit is contained in:
parent
6fac581fa9
commit
7d16b73d14
7 changed files with 130 additions and 137 deletions
14
examples/array_multiplication/shader/my_shader.comp
Normal file
14
examples/array_multiplication/shader/my_shader.comp
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#version 450
|
||||
|
||||
// The execution structure
|
||||
layout (local_size_x = 1) in;
|
||||
|
||||
// The buffers are provided via the tensors
|
||||
layout(binding = 0) buffer bufA { float a[]; };
|
||||
layout(binding = 1) buffer bufB { float b[]; };
|
||||
layout(binding = 2) buffer bufOut { float o[]; };
|
||||
|
||||
void main() {
|
||||
uint index = gl_GlobalInvocationID.x;
|
||||
o[index] = a[index] * b[index];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue