Skip to content

Commit

Permalink
OCIO: More avx/avx2 target attrs attempts.
Browse files Browse the repository at this point in the history
  • Loading branch information
furby-tm committed Mar 16, 2024
1 parent 0c0d6fd commit 1195f31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/OpenColorIO/AVX2.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ struct AVX2RGBAPack<BIT_DEPTH_F16>
template <>
struct AVX2RGBAPack<BIT_DEPTH_F32>
{
static inline
static inline OCIO_TARGET_ATTRIBUTE("avx2")
void Load(const float *in, __m256& r, __m256& g, __m256& b, __m256& a)
{
const __m256i rgba_idx = _mm256_setr_epi32(0, 8, 16, 24, 4, 12, 20, 28);
Expand Down
3 changes: 2 additions & 1 deletion Sources/OpenColorIO/ops/lut3d/Lut3DOpCPU_AVX2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ struct rgbavec_avx2 {
sample_g = _mm256_i32gather_ps(src+1, idx, 4); \
sample_b = _mm256_i32gather_ps(src+2, idx, 4)

static inline rgbavec_avx2 interp_tetrahedral_avx2(const Lut3DContextAVX2 &ctx, __m256& r, __m256& g, __m256& b, __m256& a)
static inline OCIO_TARGET_ATTRIBUTE("avx2")
rgbavec_avx2 interp_tetrahedral_avx2(const Lut3DContextAVX2 &ctx, __m256& r, __m256& g, __m256& b, __m256& a)
{
__m256 x0, x1, x2;
__m256 cxxxa;
Expand Down

0 comments on commit 1195f31

Please sign in to comment.