Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
std::experi...::simd::size(3) C++ Standard Libarystd::experi...::simd::size(3)

NAME
       std::experimental::simd::size - std::experimental::simd::size

Synopsis
	  static constexpr size_t size() noexcept;  (parallelism TS v2)

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

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:
	16
	16

See also
	  simd_size		    obtains  the number	of elements of a given
       element type and
	  (parallelism TS v2)	   ABI tag
				   (class template)
	  size			   returns the width / number of elements
	  [static] (parallelism	TS (public static member function of
	  v2)			   std::experimental::simd_mask<T,Abi>)

http://cppreference.com		  2024.06.10	 std::experi...::simd::size(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=std::experimental::simd::size&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help