Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::experimental::simd<T,Abi>::size

      From cppreference.com
      <cpp‎ |experimental‎ |simd‎ |simd
       
       
       
       
       
       
      staticconstexpr size_t size()noexcept;
      (parallelism TS v2)

      Returns the width (the number of values) ofsimd<T, Abi>.

      [edit]Example

      The actual output depends on target and compiler flags.

      Run this code
      #include <experimental/simd>#include <cstdint>#include <iostream>namespace stdx= std::experimental; int main(){    stdx::native_simd<std::int32_t> a=1;std::cout<< a.size()<<'\n';std::cout<< reduce(a)<<'\n';}

      Possible output:

      1616

      [edit]See also

      (parallelism TS v2)
      obtains the number of elements of a given element type and ABI tag
      (class template)[edit]
      [static](parallelism TS v2)
      returns the width / number of elements
      (public static member function ofstd::experimental::simd_mask<T,Abi>)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/experimental/simd/simd/size&oldid=151187"

      [8]ページ先頭

      ©2009-2026 Movatter.jp