MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / gatherf

Function gatherf

Source/astcenc_vecmathlib_sse_4.h:895–904  ·  view source on GitHub ↗

* @brief Load a vector of gathered results from an array; */

Source from the content-addressed store, hash-verified

893 * @brief Load a vector of gathered results from an array;
894 */
895ASTCENC_SIMD_INLINE vfloat4 gatherf(const float* base, vint4 indices)
896{
897#if ASTCENC_AVX >= 2 && ASTCENC_X86_GATHERS != 0
898 return vfloat4(_mm_i32gather_ps(base, indices.m, 4));
899#else
900 alignas(16) int idx[4];
901 storea(indices, idx);
902 return vfloat4(base[idx[0]], base[idx[1]], base[idx[2]], base[idx[3]]);
903#endif
904}
905
906/**
907 * @brief Load a vector of gathered results from an array using byte indices from memory

Callers

nothing calls this directly

Calls 2

vfloat4Class · 0.70
storeaFunction · 0.70

Tested by

no test coverage detected