Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion include/boost/uuid/detail/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#undef BOOST_UUID_USE_AVX2
#undef BOOST_UUID_USE_AVX512_V1
#undef BOOST_UUID_USE_AVX10_1
#undef BOOST_UUID_USE_RISCV_V

#else

Expand Down Expand Up @@ -91,6 +92,15 @@

#endif

#if defined(__riscv_v)

// RISC-V Vector Extension (V 1.0+), GCC 12+ / Clang 15+
#ifndef BOOST_UUID_USE_RISCV_V
#define BOOST_UUID_USE_RISCV_V
#endif

#endif

// More advanced ISA extensions imply less advanced are also available
#if !defined(BOOST_UUID_USE_AVX512_V1) && defined(BOOST_UUID_USE_AVX10_1)
#define BOOST_UUID_USE_AVX512_V1
Expand Down Expand Up @@ -128,7 +138,8 @@
!defined(BOOST_UUID_USE_SSE41) && \
!defined(BOOST_UUID_USE_SSSE3) && \
!defined(BOOST_UUID_USE_SSE3) && \
!defined(BOOST_UUID_USE_SSE2)
!defined(BOOST_UUID_USE_SSE2) && \
!defined(BOOST_UUID_USE_RISCV_V)
#define BOOST_UUID_NO_SIMD
#endif

Expand Down
5 changes: 4 additions & 1 deletion include/boost/uuid/detail/from_chars.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
#if defined(BOOST_UUID_USE_SSE2)
# include <boost/uuid/detail/from_chars_x86.hpp>

#elif defined(BOOST_UUID_USE_RISCV_V)
# include <boost/uuid/detail/from_chars_riscv.hpp>

#elif defined(BOOST_UUID_REPORT_IMPLEMENTATION)
# include <boost/config/pragma_message.hpp>
BOOST_PRAGMA_MESSAGE( "Using from_chars_generic.hpp" )
Expand All @@ -27,7 +30,7 @@ template<class Ch>
BOOST_UUID_CXX14_CONSTEXPR_RT inline
from_chars_result<Ch> from_chars( Ch const* first, Ch const* last, uuid& u ) noexcept
{
#if defined(BOOST_UUID_USE_SSE2)
#if defined(BOOST_UUID_USE_SSE2) || defined(BOOST_UUID_USE_RISCV_V)
if( detail::is_constant_evaluated_rt() )
{
return detail::from_chars_generic( first, last, u );
Expand Down
Loading
Loading