Skip to content

rtm/macros.h

#include "rtm/macros.h"

RTM_MASK4F_ALL_TRUE

#define RTM_MASK4F_ALL_TRUE(input_mask, output)

Returns true if all [xyzw] SIMD lanes are true (aka ~0). Input must be a rtm::mask4f. Output must be a bool.

RTM_MASK4F_ALL_TRUE2

#define RTM_MASK4F_ALL_TRUE2(input_mask, output)

Returns true if all [xy] SIMD lanes are true (aka ~0). Input must be a rtm::mask4f. Output must be a bool.

RTM_MASK4F_ALL_TRUE3

#define RTM_MASK4F_ALL_TRUE3(input_mask, output)

Returns true if all [xyz] SIMD lanes are true (aka ~0). Input must be a rtm::mask4f. Output must be a bool.

RTM_MASK4F_ANY_TRUE

#define RTM_MASK4F_ANY_TRUE(input_mask, output)

Returns true if any [xyzw] SIMD lanes is true (aka ~0). Input must be a rtm::mask4f. Output must be a bool.

RTM_MASK4F_ANY_TRUE2

#define RTM_MASK4F_ANY_TRUE2(input_mask, output)

Returns true if any [xy] SIMD lanes is true (aka ~0). Input must be a rtm::mask4f. Output must be a bool.

RTM_MASK4F_ANY_TRUE3

#define RTM_MASK4F_ANY_TRUE3(input_mask, output)

Returns true if any [xyz] SIMD lanes is true (aka ~0). Input must be a rtm::mask4f. Output must be a bool.

RTM_MATRIXF_TRANSPOSE_4X4

#define RTM_MATRIXF_TRANSPOSE_4X4(input_xyzw0, input_xyzw1, input_xyzw2, input_xyzw3, output_xxxx, output_yyyy, output_zzzz, output_wwww)

Transposes a 4x4 matrix. All inputs and outputs must be rtm::vector4f.

RTM_MATRIXD_TRANSPOSE_4X4

#define RTM_MATRIXD_TRANSPOSE_4X4(input_xyzw0, input_xyzw1, input_xyzw2, input_xyzw3, output_xxxx, output_yyyy, output_zzzz, output_wwww)

Transposes a 4x4 matrix. All inputs and outputs must be rtm::vector4d.

RTM_MATRIXF_TRANSPOSE_3X3

#define RTM_MATRIXF_TRANSPOSE_3X3(input_xyz0, input_xyz1, input_xyz2, output_xxx, output_yyy, output_zzz)

Transposes a 3x3 matrix. All inputs and outputs must be rtm::vector4f.

RTM_MATRIXD_TRANSPOSE_3X3

#define RTM_MATRIXD_TRANSPOSE_3X3(input_xyz0, input_xyz1, input_xyz2, output_xxx, output_yyy, output_zzz)

Transposes a 3x3 matrix. All inputs and outputs must be rtm::vector4d.

RTM_MATRIXF_TRANSPOSE_2X2

#define RTM_MATRIXF_TRANSPOSE_2X2(input_xy0, input_xy1, output_xx, output_yy)

Transposes a 2x2 matrix. All inputs and outputs must be rtm::vector4f.

RTM_MATRIXD_TRANSPOSE_2X2

#define RTM_MATRIXD_TRANSPOSE_2X2(input_xy0, input_xy1, output_xx, output_yy)

Transposes a 2x2 matrix. All inputs and outputs must be rtm::vector4d.

RTM_MATRIXF_TRANSPOSE_4X3

#define RTM_MATRIXF_TRANSPOSE_4X3(input_xyz0, input_xyz1, input_xyz2, input_xyz3, output_xxxx, output_yyyy, output_zzzz)

Transposes a 4x3 matrix. All inputs and outputs must be rtm::vector4f.

RTM_MATRIXD_TRANSPOSE_4X3

#define RTM_MATRIXD_TRANSPOSE_4X3(input_xyz0, input_xyz1, input_xyz2, input_xyz3, output_xxxx, output_yyyy, output_zzzz)

Transposes a 4x3 matrix. All inputs and outputs must be rtm::vector4d.

RTM_MATRIXF_TRANSPOSE_3X4

#define RTM_MATRIXF_TRANSPOSE_3X4(input_xyzw0, input_xyzw1, input_xyzw2, output_xxx, output_yyy, output_zzz, output_www)

Transposes a 3x4 matrix. All inputs and outputs must be rtm::vector4f.

RTM_MATRIXD_TRANSPOSE_3X4

#define RTM_MATRIXD_TRANSPOSE_3X4(input_xyzw0, input_xyzw1, input_xyzw2, output_xxx, output_yyy, output_zzz, output_www)

Transposes a 3x4 matrix. All inputs and outputs must be rtm::vector4d.

RTM_VECTOR4F_MULV_ADD

#define RTM_VECTOR4F_MULV_ADD(v0, v1, v2)

Per component multiplication/addition of the three inputs: v2 + (v0 * v1) All three inputs must be an rtm::vector4f.

RTM_VECTOR4F_MULS_ADD

#define RTM_VECTOR4F_MULS_ADD(v0, s1, v2)

Per component multiplication/addition of the three inputs: v2 + (v0 * s1) The v0 and v2 inputs must be a rtm::vector4f and s1 must be a float.

RTM_VECTOR4F_NEG_MULV_SUB

#define RTM_VECTOR4F_NEG_MULV_SUB(v0, v1, v2)

Per component negative multiplication/subtraction of the three inputs: -((v0 * v1) - v2) This is mathematically equivalent to: v2 - (v0 * v1) All three inputs must be an rtm::vector4f.

RTM_VECTOR4F_NEG_MULS_SUB

#define RTM_VECTOR4F_NEG_MULS_SUB(v0, s1, v2)

Per component negative multiplication/subtraction of the three inputs: -((v0 * s1) - v2) This is mathematically equivalent to: v2 - (v0 * s1) The v0 and v2 inputs must be a rtm::vector4f and s1 must be a float.