I tried to pass the following function to the kernel:
gpu.createKernel ( (a: readonly number[][], b: readonly number[][])=>0 )
but got a TypeScript error. The problem is, your source does not have the 'readonly' attribute for input arrays. Does that mean that these arrays can be modified from the kernel? In any case, it is necessary to have a 'readonly' array in the input arguments to ensure that my array is immutable.
I tried to pass the following function to the kernel:
gpu.createKernel ( (a: readonly number[][], b: readonly number[][])=>0 )
but got a TypeScript error. The problem is, your source does not have the 'readonly' attribute for input arrays. Does that mean that these arrays can be modified from the kernel? In any case, it is necessary to have a 'readonly' array in the input arguments to ensure that my array is immutable.