Obsolete function, use Scilab parenthesis instead.
Insert data in a part of GPU matrix.
[Obsolete] gpuInsert(A, data, row, col)
[Obsolete] gpuInsert(A, data, positions)
A(row, col) = data
A(positions) = data
Can be :
Pointer on the matrix stored in device memory (GPU).
A is the variable where data will be inserted.
Can be :
Pointer on the matrix stored in device memory (GPU).
Pointer on the matrix stored in host memory (CPU).
data is the variable which will be inserted in A.
A scalar or matrix stored in device or host memory.
A scalar or matrix stored in device or host memory.
A matrix stored in device or host memory.
Positions where data will be inserted.
gpuInsert
allow the user to insert a items into a matrix stored in device.
The insertion is only allowed into a variable, it can't be use to extend a variable.
a = matrix(1:100, 10, 10) da = gpuSetData(a); // insert a scalar da(3, 3) = 3000 da(4,4) = 4000 // insert a matrix into a matrix da([1 6 23 64]) = -11 da([1:11:100]) = (1:11:100) * -2 db = gpuSetData([1:11:100]); dc = gpuSetData((1:11:100) * -3) da(db) = dc clear db; clear dc; // insertion only allowed with overload da(:) = 0 da(2,:) = 2 da(:,4) = %i da([1 2; 4 5], [1 2 3]) = 36 + 6*%i clear da; | ![]() | ![]() |