Skip to content

[SIMD] Provide ostream inserters.

Jö Fahlke requested to merge simd-io into master

Apparently, output of Vc vectors does not work with libc++. I suspect it has to do with some hackery Vc does in relation to the standard output streams.

This introduces syntax like

  std::cout << Dune::Simd::io(simd_vec) << std::endl;
  std::cout << Dune::Simd::vio(simd_vec) << std::endl;

to produce output like

<1, 2, 3, 4>

The difference between the two versions is that io() will skip the angle bracket for one-component vectors, while vio() will always print them.

Merge request reports