Programmer Guide/SPU Reference/LENGTH: Difference between revisions
From STX Wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
!Out !!Description | !Out !!Description | ||
|- | |- | ||
|<var>Y | |<var>Y</var> || number of rows; 1 if <var>A</var> is a number and >1 otherwise | ||
|- | |- | ||
|<var>NROW | |<var>NROW</var> || number of rows; 1 if <var>A</var> is a number and >1 otherwise | ||
|- | |- | ||
|<var>NCOL | |<var>NCOL</var> || number of columns; 1 if <var>A</var> is a number or vector and >1 otherwise | ||
|- | |- | ||
|<var>N | |<var>N</var> || number of elements = number of rows * number of columns | ||
|} | |} | ||
Revision as of 13:40, 2 May 2011
Number of elements in A
[SPU LENGTH A OUT Y NROW NCOL N]
If A is a numerical data element (number, vector or matrix), the dimensions of A are stored in the outputs.
Out | Description |
---|---|
Y | number of rows; 1 if A is a number and >1 otherwise |
NROW | number of rows; 1 if A is a number and >1 otherwise |
NCOL | number of columns; 1 if A is a number or vector and >1 otherwise |
N | number of elements = number of rows * number of columns |
with: 0 ≤ i < length of Avector
- See also
<SP-atoms>