Skip to content
Closed
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
2 changes: 1 addition & 1 deletion math/vc/include/Vc/avx/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class DebugStream
private:
template<typename T, typename V> static void printVector(V _x)
{
enum { Size = sizeof(V) / sizeof(T) };
enum JustSomeName__ { Size = sizeof(V) / sizeof(T) };
union { V v; T m[Size]; } x = { _x };
std::cerr << '[' << std::setprecision(24) << x.m[0];
for (int i = 1; i < Size; ++i) {
Expand Down
2 changes: 1 addition & 1 deletion math/vc/include/Vc/avx/shuffle.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ namespace Vc
static Vc_ALWAYS_INLINE m256i Vc_CONST blend(param256i x, param256i y) {
return _mm256_castps_si256(blend<Dst0, Dst1, Dst2, Dst3, Dst4, Dst5, Dst6, Dst7>(_mm256_castsi256_ps(x), _mm256_castsi256_ps(y)));
}
template<VecPos Dst> struct ScaleForBlend { enum { Value = Dst >= X4 ? Dst - X4 + Y0 : Dst }; };
template<VecPos Dst> struct ScaleForBlend { enum JustSomeName__ { Value = Dst >= X4 ? Dst - X4 + Y0 : Dst }; };
template<VecPos Dst0, VecPos Dst1, VecPos Dst2, VecPos Dst3, VecPos Dst4, VecPos Dst5, VecPos Dst6, VecPos Dst7>
static Vc_ALWAYS_INLINE m256 Vc_CONST permute(param256 x) {
VC_STATIC_ASSERT(Dst0 >= X0 && Dst0 <= X7, Incorrect_Range);
Expand Down
4 changes: 2 additions & 2 deletions math/vc/include/Vc/avx/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ namespace AVX
template<> struct SseVectorType<m128i> { typedef m128i Type; };
template<> struct SseVectorType<m128d> { typedef m128d Type; };

template<typename T> struct HasVectorDivisionHelper { enum { Value = 1 }; };
//template<> struct HasVectorDivisionHelper<unsigned int> { enum { Value = 0 }; };
template<typename T> struct HasVectorDivisionHelper { enum JustSomeName__ { Value = 1 }; };
//template<> struct HasVectorDivisionHelper<unsigned int> { enum JustSomeName__ { Value = 0 }; };

template<typename T> struct VectorHelperSize;

Expand Down
8 changes: 4 additions & 4 deletions math/vc/include/Vc/avx/vector.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -1286,7 +1286,7 @@ template<typename VectorType, typename EntryType> struct VectorShift<32, 8, Vect
};
template<typename VectorType, typename EntryType> struct VectorShift<16, 8, VectorType, EntryType>
{
enum {
enum JustSomeName__ {
EntryTypeSizeof = sizeof(EntryType)
};
static Vc_INTRINSIC VectorType shifted(VC_ALIGNED_PARAMETER(VectorType) v, int amount)
Expand Down Expand Up @@ -1319,7 +1319,7 @@ template<size_t SIMDWidth, size_t Size, typename VectorType, typename EntryType>
template<typename VectorType, typename EntryType> struct VectorRotate<32, 4, VectorType, EntryType>
{
typedef typename SseVectorType<VectorType>::Type SmallV;
enum {
enum JustSomeName__ {
EntryTypeSizeof = sizeof(EntryType)
};
static Vc_INTRINSIC VectorType rotated(VC_ALIGNED_PARAMETER(VectorType) v, int amount)
Expand All @@ -1338,7 +1338,7 @@ template<typename VectorType, typename EntryType> struct VectorRotate<32, 4, Vec
template<typename VectorType, typename EntryType> struct VectorRotate<32, 8, VectorType, EntryType>
{
typedef typename SseVectorType<VectorType>::Type SmallV;
enum {
enum JustSomeName__ {
EntryTypeSizeof = sizeof(EntryType)
};
static Vc_INTRINSIC VectorType rotated(VC_ALIGNED_PARAMETER(VectorType) v, int amount)
Expand All @@ -1360,7 +1360,7 @@ template<typename VectorType, typename EntryType> struct VectorRotate<32, 8, Vec
};
template<typename VectorType, typename EntryType> struct VectorRotate<16, 8, VectorType, EntryType>
{
enum {
enum JustSomeName__ {
EntryTypeSizeof = sizeof(EntryType)
};
static Vc_INTRINSIC VectorType rotated(VC_ALIGNED_PARAMETER(VectorType) v, int amount)
Expand Down
32 changes: 16 additions & 16 deletions math/vc/include/Vc/common/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,22 +181,22 @@
#endif

#define unrolled_loop16(_it_, _start_, _end_, _code_) \
if (_start_ + 0 < _end_) { enum { _it_ = (_start_ + 0) < _end_ ? (_start_ + 0) : _start_ }; _code_ } \
if (_start_ + 1 < _end_) { enum { _it_ = (_start_ + 1) < _end_ ? (_start_ + 1) : _start_ }; _code_ } \
if (_start_ + 2 < _end_) { enum { _it_ = (_start_ + 2) < _end_ ? (_start_ + 2) : _start_ }; _code_ } \
if (_start_ + 3 < _end_) { enum { _it_ = (_start_ + 3) < _end_ ? (_start_ + 3) : _start_ }; _code_ } \
if (_start_ + 4 < _end_) { enum { _it_ = (_start_ + 4) < _end_ ? (_start_ + 4) : _start_ }; _code_ } \
if (_start_ + 5 < _end_) { enum { _it_ = (_start_ + 5) < _end_ ? (_start_ + 5) : _start_ }; _code_ } \
if (_start_ + 6 < _end_) { enum { _it_ = (_start_ + 6) < _end_ ? (_start_ + 6) : _start_ }; _code_ } \
if (_start_ + 7 < _end_) { enum { _it_ = (_start_ + 7) < _end_ ? (_start_ + 7) : _start_ }; _code_ } \
if (_start_ + 8 < _end_) { enum { _it_ = (_start_ + 8) < _end_ ? (_start_ + 8) : _start_ }; _code_ } \
if (_start_ + 9 < _end_) { enum { _it_ = (_start_ + 9) < _end_ ? (_start_ + 9) : _start_ }; _code_ } \
if (_start_ + 10 < _end_) { enum { _it_ = (_start_ + 10) < _end_ ? (_start_ + 10) : _start_ }; _code_ } \
if (_start_ + 11 < _end_) { enum { _it_ = (_start_ + 11) < _end_ ? (_start_ + 11) : _start_ }; _code_ } \
if (_start_ + 12 < _end_) { enum { _it_ = (_start_ + 12) < _end_ ? (_start_ + 12) : _start_ }; _code_ } \
if (_start_ + 13 < _end_) { enum { _it_ = (_start_ + 13) < _end_ ? (_start_ + 13) : _start_ }; _code_ } \
if (_start_ + 14 < _end_) { enum { _it_ = (_start_ + 14) < _end_ ? (_start_ + 14) : _start_ }; _code_ } \
if (_start_ + 15 < _end_) { enum { _it_ = (_start_ + 15) < _end_ ? (_start_ + 15) : _start_ }; _code_ } \
if (_start_ + 0 < _end_) { enum JustSomeName__ { _it_ = (_start_ + 0) < _end_ ? (_start_ + 0) : _start_ }; _code_ } \
if (_start_ + 1 < _end_) { enum JustSomeName__ { _it_ = (_start_ + 1) < _end_ ? (_start_ + 1) : _start_ }; _code_ } \
if (_start_ + 2 < _end_) { enum JustSomeName__ { _it_ = (_start_ + 2) < _end_ ? (_start_ + 2) : _start_ }; _code_ } \
if (_start_ + 3 < _end_) { enum JustSomeName__ { _it_ = (_start_ + 3) < _end_ ? (_start_ + 3) : _start_ }; _code_ } \
if (_start_ + 4 < _end_) { enum JustSomeName__ { _it_ = (_start_ + 4) < _end_ ? (_start_ + 4) : _start_ }; _code_ } \
if (_start_ + 5 < _end_) { enum JustSomeName__ { _it_ = (_start_ + 5) < _end_ ? (_start_ + 5) : _start_ }; _code_ } \
if (_start_ + 6 < _end_) { enum JustSomeName__ { _it_ = (_start_ + 6) < _end_ ? (_start_ + 6) : _start_ }; _code_ } \
if (_start_ + 7 < _end_) { enum JustSomeName__ { _it_ = (_start_ + 7) < _end_ ? (_start_ + 7) : _start_ }; _code_ } \
if (_start_ + 8 < _end_) { enum JustSomeName__ { _it_ = (_start_ + 8) < _end_ ? (_start_ + 8) : _start_ }; _code_ } \
if (_start_ + 9 < _end_) { enum JustSomeName__ { _it_ = (_start_ + 9) < _end_ ? (_start_ + 9) : _start_ }; _code_ } \
if (_start_ + 10 < _end_) { enum JustSomeName__ { _it_ = (_start_ + 10) < _end_ ? (_start_ + 10) : _start_ }; _code_ } \
if (_start_ + 11 < _end_) { enum JustSomeName__ { _it_ = (_start_ + 11) < _end_ ? (_start_ + 11) : _start_ }; _code_ } \
if (_start_ + 12 < _end_) { enum JustSomeName__ { _it_ = (_start_ + 12) < _end_ ? (_start_ + 12) : _start_ }; _code_ } \
if (_start_ + 13 < _end_) { enum JustSomeName__ { _it_ = (_start_ + 13) < _end_ ? (_start_ + 13) : _start_ }; _code_ } \
if (_start_ + 14 < _end_) { enum JustSomeName__ { _it_ = (_start_ + 14) < _end_ ? (_start_ + 14) : _start_ }; _code_ } \
if (_start_ + 15 < _end_) { enum JustSomeName__ { _it_ = (_start_ + 15) < _end_ ? (_start_ + 15) : _start_ }; _code_ } \
do {} while ( false )

#define for_all_vector_entries(_it_, _code_) \
Expand Down
8 changes: 4 additions & 4 deletions math/vc/include/Vc/common/operators.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ namespace
template<typename Cond, typename T> struct EnableIfNeitherIntegerNorVector : public EnableIf<!CanConvertToInt<Cond>::Value, T> {};
template<typename Cond, typename T> struct EnableIfNeitherIntegerNorVector<Vector<Cond>, T>;

template<typename T> struct IsVector { enum { Value = false }; };
template<typename T> struct IsVector<Vector<T> > { enum { Value = true }; };
template<typename T> struct IsVector { enum JustSomeName__ { Value = false }; };
template<typename T> struct IsVector<Vector<T> > { enum JustSomeName__ { Value = true }; };

template<typename T0, typename T1, typename V0, typename V1> struct IsTypeCombinationOf
{
enum {
enum JustSomeName__ {
Value = IsVector<V0>::Value ? (IsVector<V1>::Value ? ( // Vec × Vec
( IsEqualType<T0, V0>::Value && HasImplicitCast<T1, V1>::Value && !HasImplicitCast<T1, int>::Value) ||
(HasImplicitCast<T0, V0>::Value && IsEqualType<T1, V1>::Value && !HasImplicitCast<T0, int>::Value) ||
Expand All @@ -32,7 +32,7 @@ template<typename T0, typename T1, typename V0, typename V1> struct IsTypeCombin

template<typename T0, typename T1, typename V> struct IsVectorOperands
{
enum {
enum JustSomeName__ {
Value = (HasImplicitCast<T0, V>::Value && !HasImplicitCast<T0, int>::Value && !IsEqualType<T0, V>::Value && IsEqualType<T1, V>::Value)
|| (HasImplicitCast<T1, V>::Value && !HasImplicitCast<T1, int>::Value && !IsEqualType<T1, V>::Value && IsEqualType<T0, V>::Value)
};
Expand Down
Loading