VEC_ALL_GE
Mike Acton
April 26, 2006
April 26, 2006
Description
int vec_all_ge( arg1, arg2 )
The value 1 (ONE) is returned if every element of arg1 are greater than or equal to the corresponding element in arg2.
Otherwise the value 0 (ZERO) is returned.
Header Files
On the PPU:
#include <altivec.h>
On the SPU:
#include <vmx2spu.h>
PPU Instruction Mapping
The intrinsic is mapped to the following instructions depending on the type of arg1 and arg2:
vector unsigned char | vcmpgtub.
vector signed char | vcmpgtsb.
vector unsigned short | vcmpgtuh.
vector signed short | vcmpgtsh.
vector unsigned int | vcmpgtuw.
vector signed int | vcmpgtsw.
vector float | vcmpgtfp.
The Condition Register (CR) is modified. Note that a penalty may be incurred due to CR dependencies.Note that the return value will be retrieved into a fixed point register. Example Instruction Sequence:
unsigned short vec_all_gt( unsigned short a, unsigned short b );
vcmpgtuh. 2,3,2
mfcr 3
rlwinm 3,3,27,1
SPU Instruction Mapping
The intrinsic is mapped to the following instructions depending on the type of arg1 and arg2:
vector unsigned char | clgtb
vector signed char | cgtb
vector unsigned short | clgth
vector signed short | cgth
vector unsigned int | clgt
vector signed int | clg
vector float | fclg
Example Instruction Sequence:
unsigned short vec_all_gt( unsigned short a, unsigned short b );
clgth $5,$4,$3
gbh $2,$5
ceqi $3,$2,0
sfi $3,$3,0