Skip to content

Commit

Permalink
Fix host-annotations of AVX2, AVX512, and NEON constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
masterleinad committed Jun 15, 2023
1 parent 352f4c3 commit 0de2de2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions simd/src/Kokkos_SIMD_AVX2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ class simd<std::int32_t, simd_abi::avx2_fixed_size<4>> {
std::is_invocable_r_v<value_type, G,
std::integral_constant<std::size_t, 0>>,
bool> = false>
KOKKOS_FORCEINLINE_FUNCTION simd(G&& gen)
KOKKOS_IMPL_HOST_FORCEINLINE_FUNCTION simd(G&& gen)
: m_value(_mm_setr_epi32(gen(std::integral_constant<std::size_t, 0>()),
gen(std::integral_constant<std::size_t, 1>()),
gen(std::integral_constant<std::size_t, 2>()),
Expand Down Expand Up @@ -700,7 +700,7 @@ class simd<std::int64_t, simd_abi::avx2_fixed_size<4>> {
std::is_invocable_r_v<value_type, G,
std::integral_constant<std::size_t, 0>>,
bool> = false>
KOKKOS_FORCEINLINE_FUNCTION simd(G&& gen)
KOKKOS_IMPL_HOST_FORCEINLINE_FUNCTION simd(G&& gen)
: m_value(_mm256_setr_epi64x(
gen(std::integral_constant<std::size_t, 0>()),
gen(std::integral_constant<std::size_t, 1>()),
Expand Down Expand Up @@ -822,7 +822,7 @@ class simd<std::uint64_t, simd_abi::avx2_fixed_size<4>> {
std::is_invocable_r_v<value_type, G,
std::integral_constant<std::size_t, 0>>,
bool> = false>
KOKKOS_FORCEINLINE_FUNCTION simd(G&& gen)
KOKKOS_IMPL_HOST_FORCEINLINE_FUNCTION simd(G&& gen)
: m_value(_mm256_setr_epi64x(
gen(std::integral_constant<std::size_t, 0>()),
gen(std::integral_constant<std::size_t, 1>()),
Expand Down
2 changes: 1 addition & 1 deletion simd/src/Kokkos_SIMD_AVX512.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class simd<std::int32_t, simd_abi::avx512_fixed_size<8>> {
std::is_invocable_r_v<value_type, G,
std::integral_constant<std::size_t, 0>>,
bool> = false>
KOKKOS_FORCEINLINE_FUNCTION simd(G&& gen)
KOKKOS_IMPL_HOST_FORCEINLINE_FUNCTION simd(G&& gen)
: m_value(
_mm256_setr_epi32(gen(std::integral_constant<std::size_t, 0>()),
gen(std::integral_constant<std::size_t, 1>()),
Expand Down
8 changes: 4 additions & 4 deletions simd/src/Kokkos_SIMD_NEON.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ class simd<double, simd_abi::neon_fixed_size<2>> {
std::is_invocable_r_v<value_type, G,
std::integral_constant<std::size_t, 0>>,
bool> = false>
KOKKOS_FORCEINLINE_FUNCTION simd(G&& gen) {
KOKKOS_IMPL_HOST_FORCEINLINE_FUNCTION simd(G&& gen) {
m_value = vsetq_lane_f64(gen(std::integral_constant<std::size_t, 0>()),
m_value, 0);
m_value = vsetq_lane_f64(gen(std::integral_constant<std::size_t, 1>()),
Expand Down Expand Up @@ -502,7 +502,7 @@ class simd<std::int32_t, simd_abi::neon_fixed_size<2>> {
std::is_invocable_r_v<value_type, G,
std::integral_constant<std::size_t, 0>>,
bool> = false>
KOKKOS_FORCEINLINE_FUNCTION simd(G&& gen) {
KOKKOS_IMPL_HOST_FORCEINLINE_FUNCTION simd(G&& gen) {
m_value = vset_lane_s32(gen(std::integral_constant<std::size_t, 0>()),
m_value, 0);
m_value = vset_lane_s32(gen(std::integral_constant<std::size_t, 1>()),
Expand Down Expand Up @@ -640,7 +640,7 @@ class simd<std::int64_t, simd_abi::neon_fixed_size<2>> {
std::is_invocable_r_v<value_type, G,
std::integral_constant<std::size_t, 0>>,
bool> = false>
KOKKOS_FORCEINLINE_FUNCTION simd(G&& gen) {
KOKKOS_IMPL_HOST_FORCEINLINE_FUNCTION simd(G&& gen) {
m_value = vsetq_lane_s64(gen(std::integral_constant<std::size_t, 0>()),
m_value, 0);
m_value = vsetq_lane_s64(gen(std::integral_constant<std::size_t, 1>()),
Expand Down Expand Up @@ -778,7 +778,7 @@ class simd<std::uint64_t, simd_abi::neon_fixed_size<2>> {
std::is_invocable_r_v<value_type, G,
std::integral_constant<std::size_t, 0>>,
bool> = false>
KOKKOS_FORCEINLINE_FUNCTION simd(G&& gen) {
KOKKOS_IMPL_HOST_FORCEINLINE_FUNCTION simd(G&& gen) {
m_value = vsetq_lane_u64(gen(std::integral_constant<std::size_t, 0>()),
m_value, 0);
m_value = vsetq_lane_u64(gen(std::integral_constant<std::size_t, 1>()),
Expand Down

0 comments on commit 0de2de2

Please sign in to comment.