Skip to content

Commit

Permalink
Rename None to NoTransformation in enum class Category to avoid a cla…
Browse files Browse the repository at this point in the history
…sh with X11 library
  • Loading branch information
Dmitri Konstantinov authored and bernhardmgruber committed Sep 29, 2023
1 parent ea663e2 commit c93ca58
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions Vc/common/simdize.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ template <typename... Ts> struct Typelist;
*/
enum class Category {
///\internal No transformation
None,
NoTransformation,
///\internal simple Vector<T> transformation
ArithmeticVectorizable,
///\internal transform an input iterator to return vectorized entries
Expand Down Expand Up @@ -186,7 +186,7 @@ constexpr Category iteratorCategories(int, ItCat * = nullptr)
? Category::OutputIterator
: is_base_of<std::input_iterator_tag, ItCat>::value
? Category::InputIterator
: Category::None;
: Category::NoTransformation;
}
/**\internal
* This overload is selected for pointer types => RandomAccessIterator.
Expand All @@ -201,7 +201,7 @@ constexpr enable_if<std::is_pointer<T>::value, Category> iteratorCategories(floa
*/
template <typename T> constexpr Category iteratorCategories(...)
{
return Category::None;
return Category::NoTransformation;
}

/**\internal
Expand All @@ -225,10 +225,10 @@ template <typename T> constexpr Category typeCategory()
is_same<T, unsigned int>::value || is_same<T, float>::value ||
is_same<T, double>::value)
? Category::ArithmeticVectorizable
: iteratorCategories<T>(int()) != Category::None
: iteratorCategories<T>(int()) != Category::NoTransformation
? iteratorCategories<T>(int())
: is_class_template<T>::value ? Category::ClassTemplate
: Category::None;
: Category::NoTransformation;
}

/**\internal
Expand Down Expand Up @@ -279,7 +279,7 @@ struct ReplaceTypes : public The_simdization_for_the_requested_type_is_not_imple
* Specialization of ReplaceTypes that is used for types that should not be transformed by
* simdize.
*/
template <typename T, size_t N, typename MT> struct ReplaceTypes<T, N, MT, Category::None>
template <typename T, size_t N, typename MT> struct ReplaceTypes<T, N, MT, Category::NoTransformation>
{
typedef T type;
};
Expand Down
12 changes: 6 additions & 6 deletions godbolt/algorithm
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ using std::conditional;
using std::size_t;
template <typename... Ts> struct Typelist;
enum class Category {
None,
NoTransformation,
ArithmeticVectorizable,
InputIterator,
OutputIterator,
Expand All @@ -357,7 +357,7 @@ return is_base_of<std::random_access_iterator_tag, ItCat>::value
? Category::OutputIterator
: is_base_of<std::input_iterator_tag, ItCat>::value
? Category::InputIterator
: Category::None;
: Category::NoTransformation;
}
template <typename T>
constexpr enable_if<std::is_pointer<T>::value, Category> iteratorCategories(float)
Expand All @@ -366,7 +366,7 @@ return Category::RandomAccessIterator;
}
template <typename T> constexpr Category iteratorCategories(...)
{
return Category::None;
return Category::NoTransformation;
}
template <typename T> struct is_class_template : public false_type
{
Expand All @@ -382,10 +382,10 @@ is_same<T, unsigned short>::value || is_same<T, int>::value ||
is_same<T, unsigned int>::value || is_same<T, float>::value ||
is_same<T, double>::value)
? Category::ArithmeticVectorizable
: iteratorCategories<T>(int()) != Category::None
: iteratorCategories<T>(int()) != Category::NoTransformation
? iteratorCategories<T>(int())
: is_class_template<T>::value ? Category::ClassTemplate
: Category::None;
: Category::NoTransformation;
}
template <typename T, size_t TupleSize = std::tuple_size<T>::value>
constexpr size_t determine_tuple_size()
Expand All @@ -408,7 +408,7 @@ template <typename T, size_t N, typename MT, Category = typeCategory<T>()>
struct ReplaceTypes : public The_simdization_for_the_requested_type_is_not_implemented<T>
{
};
template <typename T, size_t N, typename MT> struct ReplaceTypes<T, N, MT, Category::None>
template <typename T, size_t N, typename MT> struct ReplaceTypes<T, N, MT, Category::NoTransformation>
{
typedef T type;
};
Expand Down

0 comments on commit c93ca58

Please sign in to comment.