50 template <
typename MT,
typename IT>
51 inline void scatterImplementation(MT *mem, IT &&indexes)
const;
57 template <
typename MT,
typename IT>
58 inline void scatterImplementation(MT *mem, IT &&indexes, MaskArgument mask)
const;
61 #define Vc_ASSERT_SCATTER_PARAMETER_TYPES_ \ 63 std::is_convertible<EntryType, MT>::value, \ 64 "The memory pointer needs to point to a type that the EntryType of this " \ 65 "SIMD vector type can be converted to."); \ 67 Vc::Traits::has_subscript_operator<IT>::value, \ 68 "The indexes argument must be a type that implements the subscript operator."); \ 70 !Traits::is_simd_vector<IT>::value || \ 71 Traits::simd_vector_size<IT>::value >= Size, \ 72 "If you use a SIMD vector for the indexes parameter, the index vector must " \ 73 "have at least as many entries as this SIMD vector."); \ 75 !std::is_array<T>::value || \ 76 (std::rank<T>::value == 1 && \ 77 (std::extent<T>::value == 0 || std::extent<T>::value >= Size)), \ 78 "If you use a simple array for the indexes parameter, the array must have " \ 79 "at least as many entries as this SIMD vector.") 95 template <
typename MT,
97 typename = enable_if<Vc::Traits::has_subscript_operator<IT>::value>>
98 Vc_INTRINSIC
void scatter(MT *mem, IT &&indexes)
const 100 Vc_ASSERT_SCATTER_PARAMETER_TYPES_;
101 scatterImplementation(mem, std::forward<IT>(indexes));
105 template <
typename MT,
107 typename = enable_if<Vc::Traits::has_subscript_operator<IT>::value>>
108 Vc_INTRINSIC
void scatter(MT *mem, IT &&indexes, MaskArgument mask)
const 110 Vc_ASSERT_SCATTER_PARAMETER_TYPES_;
111 scatterImplementation(mem, std::forward<IT>(indexes), mask);
115 #include "scatterinterface_deprecated.h" 123 template <
typename MT,
typename IT>
125 Vc_INTRINSIC
void scatter(
const Common::ScatterArguments<MT, IT> &args)
const 127 scatter(args.address, args.indexes);
130 template <
typename MT,
typename IT>
131 Vc_INTRINSIC
void scatter(
const Common::ScatterArguments<MT, IT> &args, MaskArgument mask)
const 133 scatter(args.address, args.indexes, mask);
136 #undef Vc_ASSERT_SCATTER_PARAMETER_TYPES_