Skip to content

Commit

Permalink
Update project version and fix AVX blendf_macro
Browse files Browse the repository at this point in the history
horta committed Feb 6, 2024
1 parent 8024a50 commit b8872a2
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion c-core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.20.2 FATAL_ERROR)
project(deciphon VERSION 0.15.0 LANGUAGES C)
project(deciphon VERSION 0.15.1 LANGUAGES C)

include(cmake/warnings.cmake)
include(cmake/sanitizers.cmake)
4 changes: 2 additions & 2 deletions c-core/viterbi.c
Original file line number Diff line number Diff line change
@@ -209,7 +209,7 @@ struct viterbi
#if __AVX__
#define add(a, b) _mm256_add_ps(a, b)
#define and(a, b) _mm256_and_si256(a, b)
#define blendf(m, a, b) _mm256_blendv_ps(b, a, m)
#define blendf(m, a, b) _mm256_blendv_ps(b, a, castf(m))
#define blendu(m, a, b) _mm256_blendv_epi8(b, a, m)
#define castf(x) _mm256_castsi256_ps(x)
#define castu(x) _mm256_castps_si256(x)
@@ -282,7 +282,7 @@ INLINE void setf(packf *x, f32 v, int e)
int32_t m[2 * NUM_LANES] = {0};
m[NUM_LANES] = -1;
packu mask = loadu((void const *)(m + NUM_LANES - (e & (NUM_LANES - 1))));
*x = blendf(castf(mask), broad, *x);
*x = blendf(mask, broad, *x);
}

__attribute__((unused)) INLINE void setu(packu *x, u32 v, int e)

0 comments on commit b8872a2

Please sign in to comment.