有没有人来帮我运行一个SIMD的简单程序。多谢了!
SIMD代码:
#include "testfun.h"
#include <intrin.h>
#include <iostream>
using namespace std;
#define dataLen 8000
void testfun()
{
__m256 *buf1 = new __m256[dataLen/8];
__m256 *buf2 = new __m256[dataLen/8];
for(int i=0; i<dataLen/8; i++)
{
buf2[i] = _mm256_set1_ps(i);
cout<<buf2->m256_f32[0]<< endl;
}
}