File: explicit_use_of_an_instruction_set.cpp

package info (click to toggle)
xsimd 13.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,716 kB
  • sloc: cpp: 36,557; sh: 541; makefile: 184; python: 117
file content (13 lines) | stat: -rw-r--r-- 295 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "xsimd/xsimd.hpp"
#include <iostream>

namespace xs = xsimd;

int main(int, char*[])
{
    xs::batch<double, xs::avx> a = { 1.5, 2.5, 3.5, 4.5 };
    xs::batch<double, xs::avx> b = { 2.5, 3.5, 4.5, 5.5 };
    auto mean = (a + b) / 2;
    std::cout << mean << std::endl;
    return 0;
}