28 #ifndef VC_COMMON_MAKECONTAINER_H_ 
   29 #define VC_COMMON_MAKECONTAINER_H_ 
   31 #include <Vc/vector.h> 
   32 #include <initializer_list> 
   35 namespace Vc_VERSIONED_NAMESPACE
 
   40         template<
typename Container, 
typename T> 
struct make_container_helper
 
   42             static constexpr Container help(std::initializer_list<T> list) { 
return { list }; }
 
   45         template <
typename T_, 
typename Abi, 
typename Alloc,
 
   46                   template <
class, 
class> 
class Container>
 
   47         struct make_container_helper<Container<Vector<T_, Abi>, Alloc>,
 
   48                                      typename Vector<T_, Abi>::EntryType> {
 
   49             typedef Vector<T_, Abi> V;
 
   50             typedef typename V::EntryType T;
 
   51             typedef Container<V, Alloc> C;
 
   52             static inline C help(std::initializer_list<T> list) {
 
   53                 const std::size_t size = (list.size() + (V::Size - 1)) / V::Size;
 
   55                 auto containerIt = v.begin();
 
   56                 auto init = std::begin(list);
 
   57                 const auto initEnd = std::end(list);
 
   58                 for (std::size_t i = 0; i < size - 1; ++i) {
 
   64                 while (init != initEnd) {
 
   65                     (*containerIt)[j++] = *init++;
 
   71         template <
typename T_, 
typename Abi, std::size_t N,
 
   72                   template <
class, std::
size_t> 
class Container>
 
   73         struct make_container_helper<Container<Vector<T_, Abi>, N>,
 
   74                                      typename Vector<T_, Abi>::EntryType> {
 
   75             typedef Vector<T_, Abi> V;
 
   76             typedef typename V::EntryType T;
 
   77             static constexpr std::size_t size = (N + (V::Size - 1)) / V::Size;
 
   80 #if defined Vc_CLANG && Vc_CLANG < 0x30700 // TODO: when did Vc_APPLECLANG fix it? 
   84                 (size == 1 && std::is_same<Abi, VectorAbi::Avx>::value) ? 2 :
 
   87             static inline C help(std::initializer_list<T> list) {
 
   88                 Vc_ASSERT(N == list.size())
 
   89                 Vc_ASSERT(size == (list.size() + (V::Size - 1)) / V::Size)
 
   91                 auto containerIt = v.begin();
 
   92                 auto init = std::begin(list);
 
   93                 const auto initEnd = std::end(list);
 
   94                 for (std::size_t i = 0; i < size - 1; ++i) {
 
  100                 while (init != initEnd) {
 
  101                     (*containerIt)[j++] = *init++;
 
  137     template<
typename Container, 
typename T>
 
  138     constexpr 
auto makeContainer(std::initializer_list<T> list) -> decltype(make_container_helper<Container, T>::help(list))
 
  140         return make_container_helper<Container, T>::help(list);
 
  143     template<
typename Container, 
typename T>
 
  144     constexpr 
auto make_container(std::initializer_list<T> list) -> decltype(makeContainer<Container, T>(list))
 
  146         return makeContainer<Container, T>(list);
 
  151 #endif // VC_COMMON_MAKECONTAINER_H_ 
constexpr auto makeContainer(std::initializer_list< T > list) -> decltype(make_container_helper< Container, T >::help(list))        
Construct a container of Vc vectors from a std::initializer_list of scalar entries. 
constexpr bool all_of(const Mask &m)
Returns whether all entries in the mask m are true. 
constexpr VectorSpecialInitializerZero Zero
The special object Vc::Zero can be used to construct Vector and Mask objects initialized to zero/fals...
constexpr UnalignedTag Unaligned
Use this object for a flags parameter to request unaligned loads and stores.