source: trunk/lib_ir/test_s2p.cpp

Last change on this file was 3933, checked in by linmengl, 5 years ago

IR inline s2p_bytepack, get the same perf result of SSE2 now.

File size: 564 bytes
Line 
1#include "utility.h"
2#include "s2p.h"
3#include <iostream>
4using namespace std;
5
6int main(int argc, char **argv)
7{
8  SIMD_type s[8];
9  SIMD_type p[8];
10
11  if (argc <= 1 || argc > 2)
12  {
13    cout << "Wrong number of arguments!" << endl << "RUN: [exec] <number> \n";
14    return 0;
15  }
16
17  int x = atoi(argv[1]);
18
19  for (int i = 0; i < 8; ++i) s[i] = mvmd<32>::fill(x);
20
21  s2p(s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7],
22      p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7]);
23
24  for (int i = 0; i < 8; ++i)
25    cout << Store2String(p[i], 1) << endl;
26
27  return 0;
28}
29
Note: See TracBrowser for help on using the repository browser.