Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jfalcou committed Apr 27, 2020
1 parent 625d6c3 commit cb7841f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@
std::cout << "This code has been compiled with XOP support.\n";
}

if constexpr( spy::supports::avx512::vnni )
if constexpr( spy::supports::avx512::vnni_ )
{
std::cout << "This code has been compiled with AV512-VNNI support.\n";
}
Expand Down Expand Up @@ -328,11 +328,11 @@

template<typename T> auto f(T t)
{
if constexpr( spy::clang )
if constexpr( spy::clang_ )
{
return __builtin_bitreverse32(t);
}
else if constexpr( spy::gcc )
else if constexpr( spy::gcc_ )
{
return __builtin_bswap32(t);
}
Expand All @@ -346,12 +346,12 @@
~~~~~ c++
#include <spy/spy.hpp>

template<typename T> auto f(T t) requires( spy::clang )
template<typename T> auto f(T t) requires( spy::clang_ )
{
return __builtin_bitreverse32(t);
}

template<typename T> auto f(T t) requires( spy::gcc )
template<typename T> auto f(T t) requires( spy::gcc_ )
{
return __builtin_bswap32(t);
}
Expand Down
2 changes: 1 addition & 1 deletion include/spy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ namespace spy
{
#if defined(_LIBCPP_VERSION)
#define SPY_STDLIB_IS_LIBCPP
using stdlib_type = detail::stdcpp_t<(_LIBCPP_VERSION/1000)%10,0,_LIBCPP_VERSION%1000,0>;
using stdlib_type = detail::libcpp_t<(_LIBCPP_VERSION/1000)%10,0,_LIBCPP_VERSION%1000,0>;
#elif defined(__GLIBCXX__)
#define SPY_STDLIB_IS_GLIBCXX
#define SPY0 (__GLIBCXX__/100)
Expand Down
6 changes: 3 additions & 3 deletions include/spy/stdlib.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ namespace spy::detail
return os << "Undefined Standard C++ Library";
}

template<int M, int N, int P> using libcpp_t = stdlib_info<stdlib::libcpp_,M,N,P>;
template<int M, int N, int P> using gnucpp_t = stdlib_info<stdlib::gnucpp_,M,N,P>;
template<int M, int N, int P> using libcpp_t = stdlib_info<stdlib::libcpp_,M,N,P>;
template<int M, int N, int P> using gnucpp_t = stdlib_info<stdlib::gnucpp_,M,N,P>;
}

namespace spy
{
#if defined(_LIBCPP_VERSION)
#define SPY_STDLIB_IS_LIBCPP
using stdlib_type = detail::stdcpp_t<(_LIBCPP_VERSION/1000)%10,0,_LIBCPP_VERSION%1000,0>;
using stdlib_type = detail::libcpp_t<(_LIBCPP_VERSION/1000)%10,0,_LIBCPP_VERSION%1000,0>;
#elif defined(__GLIBCXX__)
#define SPY_STDLIB_IS_GLIBCXX
#define SPY0 (__GLIBCXX__/100)
Expand Down

0 comments on commit cb7841f

Please sign in to comment.