Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename None to NoTransformation in enum class Category to avoid a clash with X11 library #354

Merged
merged 1 commit into from
Sep 29, 2023
Merged
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
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
Loading