Skip to content

Commit

Permalink
Use Kokkos::bit_cast in SIMD instead of rolling its own
Browse files Browse the repository at this point in the history
  • Loading branch information
dalg24 committed May 4, 2023
1 parent e8a44e5 commit eff2716
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
1 change: 1 addition & 0 deletions simd/src/Kokkos_SIMD_AVX2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <type_traits>

#include <Kokkos_SIMD_Common.hpp>
#include <Kokkos_BitManipulation.hpp> // bit_cast

#include <immintrin.h>

Expand Down
1 change: 1 addition & 0 deletions simd/src/Kokkos_SIMD_AVX512.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <type_traits>

#include <Kokkos_SIMD_Common.hpp>
#include <Kokkos_BitManipulation.hpp> // bit_cast

#include <immintrin.h>

Expand Down
8 changes: 0 additions & 8 deletions simd/src/Kokkos_SIMD_Common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@ namespace Kokkos {

namespace Experimental {

template <class To, class From>
[[nodiscard]] KOKKOS_FORCEINLINE_FUNCTION constexpr To bit_cast(
From const& src) {
To dst;
std::memcpy(&dst, &src, sizeof(To));
return dst;
}

template <class T, class Abi>
class simd;

Expand Down

0 comments on commit eff2716

Please sign in to comment.