| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- // This file is generated by tools/gen_operators.pl. CHANGES WILL BE OVERWRITTEN
- /* Copyright (C) 2013-2014 Povilas Kanapickas <[email protected]>
- Distributed under the Boost Software License, Version 1.0.
- (See accompanying file LICENSE_1_0.txt or copy at
- http://www.boost.org/LICENSE_1_0.txt)
- */
- #ifndef LIBSIMDPP_SIMDPP_CORE_I_SUB_OPERATOR_H
- #define LIBSIMDPP_SIMDPP_CORE_I_SUB_OPERATOR_H
- #ifndef LIBSIMDPP_SIMD_H
- #error "This file must be included through simd.h"
- #endif
- #include <simdpp/types.h>
- #include <simdpp/detail/expr/i_sub.h>
- #include <simdpp/core/detail/get_expr_uint.h>
- #include <simdpp/core/detail/scalar_arg_impl.h>
- #include <simdpp/core/detail/get_expr_uint.h>
- namespace simdpp {
- namespace SIMDPP_ARCH_NAMESPACE {
- /** Subtracts 8-bit integer values.
- @code
- r0 = a0 - b0
- ...
- rN = aN - bN
- @endcode
- @par 256-bit version:
- @icost{SSE2-AVX, NEON, ALTIVEC, 2}
- */
- template<unsigned N, class V1, class V2> SIMDPP_INL
- typename detail::get_expr_uint<expr_isub, V1, V2>::type
- operator-(const any_int8<N,V1>& a,
- const any_int8<N,V2>& b)
- {
- return { { a.wrapped(), b.wrapped() } };
- }
- SIMDPP_SCALAR_ARG_IMPL_INT_UNSIGNED(operator-, expr_isub, any_int8, int8)
- /** Subtracts 16-bit integer values.
- @code
- r0 = a0 - b0
- ...
- rN = aN - bN
- @endcode
- @par 256-bit version:
- @icost{SSE2-AVX, NEON, ALTIVEC, 2}
- */
- template<unsigned N, class V1, class V2> SIMDPP_INL
- typename detail::get_expr_uint<expr_isub, V1, V2>::type
- operator-(const any_int16<N,V1>& a,
- const any_int16<N,V2>& b)
- {
- return { { a.wrapped(), b.wrapped() } };
- }
- SIMDPP_SCALAR_ARG_IMPL_INT_UNSIGNED(operator-, expr_isub, any_int16, int16)
- /** Subtracts 32-bit integer values.
- @code
- r0 = a0 - b0
- ...
- rN = aN - bN
- @endcode
- @par 256-bit version:
- @icost{SSE2-AVX, NEON, ALTIVEC, 2}
- */
- template<unsigned N, class V1, class V2> SIMDPP_INL
- typename detail::get_expr_uint<expr_isub, V1, V2>::type
- operator-(const any_int32<N,V1>& a,
- const any_int32<N,V2>& b)
- {
- return { { a.wrapped(), b.wrapped() } };
- }
- SIMDPP_SCALAR_ARG_IMPL_INT_UNSIGNED(operator-, expr_isub, any_int32, int32)
- /** Subtracts 64-bit integer values.
- @code
- r0 = a0 - b0
- ...
- rN = aN - bN
- @endcode
- @par 128-bit version:
- @icost{ALTIVEC, 5-6}
- @par 256-bit version:
- @icost{SSE2-AVX, NEON, 2}
- @icost{ALTIVEC, 10-11}
- */
- template<unsigned N, class V1, class V2> SIMDPP_INL
- typename detail::get_expr_uint<expr_isub, V1, V2>::type
- operator-(const any_int64<N,V1>& a,
- const any_int64<N,V2>& b)
- {
- return { { a.wrapped(), b.wrapped() } };
- }
- SIMDPP_SCALAR_ARG_IMPL_INT_UNSIGNED(operator-, expr_isub, any_int64, int64)
- } // namespace SIMDPP_ARCH_NAMESPACE
- } // namespace simdpp
- #endif
|