GONES

From Jacket Wiki

(Redirected from ONES)
Jump to: navigation, search
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)
...
    

GFOR Supported

Yes

GCOMPILE Supported

No

Types Supported

-  GDOUBLE   GSINGLE   GINT32   GINT8   GUINT32   GUINT8   COMPLEX 

Types Not Supported

-  GLOGICAL 

CPU usageJacket only contains GPU computing functions. To run functions on the CPU, try one of the MathWorks products:
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/ones.html

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));

See Also

GZEROS, GEYE, GSINGLE, COMPLEX

Views
Personal tools