Programmer Guide/SPU Reference/SELECTAB: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 7: Line 7:
|<var>A, B</var>||input data ||number, vector ||variable  
|<var>A, B</var>||input data ||number, vector ||variable  
|-
|-
|<var>SEL</var>||select switch ||number (int.), string||variable
|<var>SEL</var>||select switch ||number (int.), string||variable ||<code>0</code>
|-
|-
!output !!description !!data type !!value type!!comment
!output !!description !!data type !!value type!!comment

Latest revision as of 13:59, 6 May 2011

Two channel multiplexer.

[SPU SELECTAB A B SEL OUT Y]

input description data type value type default value
A, B input data number, vector variable
SEL select switch number (int.), string variable 0
output description data type value type comment
Y selected data same type as A variable
Description
SEL Ynumber=f(Anumber,Bnumber) Yvector=f(Avector,Bnumber) Ynumber=f(Avector,Bvector)
0 or A Y = A Y[i] = A[i] Y[i] = A[i]
1 or B Y = B Y[i] = B Y[i] = B[i]
2 or minimum Y = min(A,B) Y[i] = min(A[i],B) Y[i] = min(A[i],B[i])
3 or maximum Y = max(A,B) Y[i] = max(A[i],B) Y[i] = max(A[i],B[i])

with: 0 ≤ i < length of Avector

See also

<SP-atoms>

Navigation menu

Personal tools