|
@@ -0,0 +1,23 @@
|
|
|
+#include "pal.h"
|
|
|
+#include "pal_debug.h"
|
|
|
+#include <immintrin.h>
|
|
|
+#include <stdio.h>
|
|
|
+
|
|
|
+int main(){
|
|
|
+
|
|
|
+ __m256 evens = _mm256_set_ps(2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0);
|
|
|
+ __m256 odds = _mm256_set_ps(1.0, 3.0, 5.0, 7.0, 9.0, 11.0, 13.0, 15.0);
|
|
|
+
|
|
|
+
|
|
|
+ __m256 result = _mm256_sub_ps(evens, odds);
|
|
|
+
|
|
|
+
|
|
|
+ float f = result[0];
|
|
|
+
|
|
|
+ PAL_HANDLE file1 = DkStreamOpen("file:avxRes", PAL_ACCESS_RDWR, 0, 0, 0);
|
|
|
+ if (file1) {
|
|
|
+ DkStreamWrite(file1, 0, sizeof(f), &f, NULL);
|
|
|
+ DkObjectClose(file1);
|
|
|
+ }
|
|
|
+ return 1;
|
|
|
+}
|