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

Function gatherf

Source/astcenc_vecmathlib_rvv_n.h:908–915  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

906 * @brief Load a vector of gathered results from an array;
907 */
908ASTCENC_SIMD_INLINE vfloat gatherf(const float* base, vint indices)
909{
910 // NOTE: currently unused,
911 // breaks for negative indices or ones >=2^30
912 vuint32m1_t vidx = __riscv_vreinterpret_u32m1(indices.m);
913 vidx = __riscv_vsll(vidx, 2, vfloat::vl());
914 return vfloat(__riscv_vluxei32_v_f32m1(base, vidx, vfloat::vl()));
915}
916
917/**
918 * @brief Load a vector of gathered results from an array using byte indices from memory

Callers

nothing calls this directly

Calls 1

vfloatClass · 0.85

Tested by

no test coverage detected