Browse Source

Fix reference syntax style

tags/v2.0.0
Andrew Belt 4 years ago
parent
commit
80c5fa2b2b
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      include/simd/vector.hpp

+ 3
- 4
include/simd/vector.hpp View File

@@ -192,15 +192,14 @@ inline int movemask(const Vector<int32_t, 4>& a) {


/** `a @ b` */ /** `a @ b` */
#define DECLARE_VECTOR_OPERATOR_INFIX(t, s, operator, func) \ #define DECLARE_VECTOR_OPERATOR_INFIX(t, s, operator, func) \
inline Vector<t, s> operator(const Vector<t, s> &a, const Vector<t, s> &b) { \
inline Vector<t, s> operator(const Vector<t, s>& a, const Vector<t, s>& b) { \
return Vector<t, s>(func(a.v, b.v)); \ return Vector<t, s>(func(a.v, b.v)); \
} }


/** `a @= b` */ /** `a @= b` */
#define DECLARE_VECTOR_OPERATOR_INCREMENT(t, s, operator, opfunc) \ #define DECLARE_VECTOR_OPERATOR_INCREMENT(t, s, operator, opfunc) \
inline Vector<t, s> &operator(Vector<t, s> &a, const Vector<t, s> &b) { \
a = opfunc(a, b); \
return a; \
inline Vector<t, s>& operator(Vector<t, s>& a, const Vector<t, s>& b) { \
return a = opfunc(a, b); \
} }


DECLARE_VECTOR_OPERATOR_INFIX(float, 4, operator+, _mm_add_ps) DECLARE_VECTOR_OPERATOR_INFIX(float, 4, operator+, _mm_add_ps)


Loading…
Cancel
Save