From Jacket Wiki
Back to Function List
Generate a zeros array on GPU
Usage
| Jacket for M Language |
| | Supported Syntax |
| |
B = gzeros(n)
B = gzeros(m,n)
B = gzeros([m n])
B = gzeros(m,n,p,...)
B = gzeros([m n p ...])
B = gzeros(size(A))
gzeros(m, n,...,classname)
gzeros([m,n,...],classname)
% new in v1.7
zeros(m,n,...,class(X)) % where X is another variable
zeros(.., gsingle) % explicitly name a type |
| |
|
Notes
- The size inputs M, N, and P... should be nonnegative integers. Negative integers are treated as 0.
- All subsequent computations on B are performed on the graphics card (GPU).
- Use the standard MATLAB conversions to return data to the CPU (DOUBLE,SINGLE,..)
- Actual GPU computation is delayed until the results are requested.
A = gzeros(2);
B = gzeros(4,8);
C = gzeros([9 1 8]);
D = gzeros(3,'single');
E = gzeros(3,'uint32');
F = zeros(3,class(E)); % new in v1.7
See Also
GONES, GEYE, GSINGLE, RAND, RANDN, COMPLEX