GONES
From Jacket Wiki
(Redirected from ONES)
Back to Function List, Jacket Basics
Generate a ones array on GPU
Usage
| Jacket for M Language | |||||||||||
| Supported Syntax | |||||||||||
Y = gones(n) Y = gones(m,n) Y = gones([m n]) Y = gones(m,n,p,...) Y = gones([m n p ...]) Y = gones(size(A)) gones(m, n,...,classname) gones([m,n,...],classname) % new in v1.7 ones(m, n,...,class(X)) % where X is another GPU variable ones(m, n, gsingle) ones(m, n, gdouble) ones(m, n, gint8) ... |
|||||||||||
|
|||||||||||
Notes
- The size inputs M, N, and P... should be nonnegative integers. Negative integers are treated as 0.
- All subsequent computations on Y 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 = gones(2); B = gones(4,8); C = gones([9 1 8]); D = gones(3,'single'); E = gones(3,'uint32'); F = ones(3, class(E));