GZEROS

From Jacket Wiki

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

GFOR Supported

No

GCOMPILE Supported

No

Types Supported

-  GDOUBLE   GSINGLE   GINT32   GINT8   GUINT32   GUINT8 

Types Not Supported

-  GLOGICAL   COMPLEX 

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/zeros.html

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

Views