VEX Dictionary / select
select
Chooses between two values based on a condition, but evaluates both branches first to help vectorize the surrounding code.
group: utilityutility
Available in every context
Usage
<type> select(int conditional, <type> a, <type> b)
<type>[] select(int conditional, <type> a[], <type> b[])
Examples
No worked examples yet.
Signatures (from vcc -X)
matrix2 select(int, matrix2, matrix2)all contextsmatrix3 select(int, matrix3, matrix3)all contextsmatrix select(int, matrix, matrix)all contextsbsdf select(int, bsdf, bsdf)all contextslight select(int, light, light)displace, fog, light, shadow, surfacelpeaccumulator select(int, lpeaccumulator, lpeaccumulator)surfacematerial select(int, material, material)displace, fog, light, shadow, surfacedict select(int, dict, dict)all contextsfloat select(int, float, float)all contextsint select(int, int, int)all contextsvector4 select(int, vector4, vector4)all contextsstring select(int, string, string)all contextsvector2 select(int, vector2, vector2)all contextsvector select(int, vector, vector)all contextsmatrix2[] select(int, matrix2[], matrix2[])all contextsmatrix3[] select(int, matrix3[], matrix3[])all contextsmatrix[] select(int, matrix[], matrix[])all contextsbsdf[] select(int, bsdf[], bsdf[])all contextslight[] select(int, light[], light[])displace, fog, light, shadow, surfacelpeaccumulator[] select(int, lpeaccumulator[], lpeaccumulator[])surfacematerial[] select(int, material[], material[])displace, fog, light, shadow, surfacedict[] select(int, dict[], dict[])all contextsfloat[] select(int, float[], float[])all contextsint[] select(int, int[], int[])all contextsvector4[] select(int, vector4[], vector4[])all contextsstring[] select(int, string[], string[])all contextsvector2[] select(int, vector2[], vector2[])all contextsvector[] select(int, vector[], vector[])all contexts