// Hint files help the Visual Studio IDE interpret Visual C++ identifiers // such as names of functions and macros. // For more information see https://go.microsoft.com/fwlink/?linkid=865984 #define Ops(o) template vector_type::type> operator##o(const vector_type& r) { [[likely]] if (r.size == size) { return add(r); } else if (r.size == 1 || size == 1) { const bool lr = size == 1; const uint32_t& _size = lr ? r.size : size; const auto& _container = lr ? r.container : container; const auto& scalar = *(lr ? container : r.container); vector_type::type> ret(_size); for (int i = 0; i < _size; ++i) ret[i] = _container[i] o scalar; return ret; } } #define Op(o, x) template vector_type::type> inline x(const vector_type& r) { vector_type::type> ret(size); for (int i = 0; i < size; ++i) ret[i] = container[i] o r[i]; return ret; } #define _Make_Ops(M) M(+, add) M(-, minus) M(*, multi) M(/, div) M(%, mod) M(&, and) M(|, or) M(^, xor) #define QUERY_DECLSPEC