Example #1
0
	inline SPROUT_CONSTEXPR sprout::valarray<T, N>
	operator%(sprout::valarray<T, N> const& lhs, sprout::valarray<T, N> const& rhs) {
		return sprout::fixed::transform(lhs.begin(), lhs.end(), rhs.begin(), lhs, sprout::modulus<>());
	}
Example #2
0
	inline SPROUT_CONSTEXPR sprout::valarray<T, N>
	operator*(sprout::valarray<T, N> const& lhs, T const& rhs) {
		return sprout::fixed::transform(lhs.begin(), lhs.end(), lhs, sprout::bind2nd(sprout::multiplies<>(), rhs));
	}
Example #3
0
	inline SPROUT_CONSTEXPR sprout::valarray<T, N>
	operator/(T const& lhs, sprout::valarray<T, N> const& rhs) {
		return sprout::fixed::transform(rhs.begin(), rhs.end(), rhs, sprout::bind1st(sprout::divides<>(), lhs));
	}
Example #4
0
	inline SPROUT_CONSTEXPR sprout::valarray<bool, N>
	operator||(T const& lhs, sprout::valarray<T, N> const& rhs) {
		typedef sprout::sized_pit<sprout::valarray<bool, N> > sized_pit_type;
		return sprout::fixed::transform(rhs.begin(), rhs.end(), sized_pit_type(rhs.size()), sprout::bind1st(sprout::logical_or<>(), lhs));
	}