Skip to content

Commit

Permalink
Fix a bug in AVX512 simd_mask::operator[]
Browse files Browse the repository at this point in the history
this would cause a compiler error when
instantiated because of const-correctness
  • Loading branch information
ibaned committed Jan 24, 2023
1 parent ad2af17 commit 5212d90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion simd/src/Kokkos_SIMD_AVX512.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class simd_mask<T, simd_abi::avx512_fixed_size<8>> {
}
KOKKOS_IMPL_HOST_FORCEINLINE_FUNCTION value_type
operator[](std::size_t i) const {
return static_cast<value_type>(reference(m_value, int(i)));
return reference(const_cast<simd_mask*>(this)->m_value, int(i));
}
KOKKOS_IMPL_HOST_FORCEINLINE_FUNCTION simd_mask
operator||(simd_mask const& other) const {
Expand Down

0 comments on commit 5212d90

Please sign in to comment.