Skip to content

rtm/mask4q.h

#include "rtm/mask4q.h"

mask_get_x

uint64_t mask_get_x(mask4q input)

Returns the mask4q [x] component.

mask_get_y

uint64_t mask_get_y(mask4q input)

Returns the mask4q [y] component.

mask_get_z

uint64_t mask_get_z(mask4q input)

Returns the mask4q [z] component.

mask_get_w

uint64_t mask_get_w(mask4q input)

Returns the mask4q [w] component.

mask_all_true

bool mask_all_true(mask4q input)

Returns true if all 4 components are true, otherwise false: all(input.xyzw != 0).

mask_all_true2

bool mask_all_true2(mask4q input)

Returns true if all [xy] components are true, otherwise false: all(input.xy != 0).

mask_all_true3

bool mask_all_true3(mask4q input)

Returns true if all [xyz] components are true, otherwise false: all(input.xyz != 0).

mask_any_true

bool mask_any_true(mask4q input)

Returns true if any 4 components are true, otherwise false: any(input.xyzw != 0).

mask_any_true2

bool mask_any_true2(mask4q input)

Returns true if any [xy] components are true, otherwise false: any(input.xy != 0).

mask_any_true3

bool mask_any_true3(mask4q input)

Returns true if any [xyz] components are true, otherwise false: any(input.xyz != 0).

mask_all_equal

bool mask_all_equal(mask4q lhs, mask4q rhs)

Returns true if all 4 components are equal, otherwise false: all(lhs.xyzw == rhs.xyzw).

mask_all_equal2

bool mask_all_equal2(mask4q lhs, mask4q rhs)

Returns true if all [xy] components are equal, otherwise false: all(lhs.xy == rhs.xy).

mask_all_equal3

bool mask_all_equal3(mask4q lhs, mask4q rhs)

Returns true if all [xyz] components are equal, otherwise false: all(lhs.xyz == rhs.xyz).

mask_any_equal

bool mask_any_equal(mask4q lhs, mask4q rhs)

Returns true if any 4 components are equal, otherwise false: any(lhs.xyzw == rhs.xyzw).

mask_any_equal2

bool mask_any_equal2(mask4q lhs, mask4q rhs)

Returns true if any [xy] components are equal, otherwise false: any(lhs.xy == rhs.xy).

mask_any_equal3

bool mask_any_equal3(mask4q lhs, mask4q rhs)

Returns true if any [xyz] components are equal, otherwise false: any(lhs.xyz == rhs.xyz).

mask_and

mask4q mask_and(mask4q lhs, mask4q rhs)

Per component logical AND between the inputs: lhs & rhs.

mask_or

mask4q mask_or(mask4q lhs, mask4q rhs)

Per component logical OR between the inputs: lhs | rhs.

mask_xor

mask4q mask_xor(mask4q lhs, mask4q rhs)

Per component logical XOR between the inputs: lhs ^ rhs.

mask_not

mask4q mask_not(mask4q input)

Per component logical NOT of the input: ~input.

mask_set

mask4q mask_set(bool x, bool y, bool z, bool w)

Creates a mask4 from all 4 bool components.

The return value also converts to mask4d, mask4f and mask4i.

mask4q mask_set(uint64_t x, uint64_t y, uint64_t z, uint64_t w)

Creates a mask4 from 4 uint64 components.

The return value also converts to mask4d.

mask_true

mask4q mask_true()

Creates a mask4 with all 4 components set to true.

The return value also converts to mask4d, mask4f and mask4i.

mask_false

mask4q mask_false()

Creates a mask4 with all 4 components set to false.

The return value also converts to mask4d, mask4f and mask4i.