diff --git a/task7.cpp b/task7.cpp new file mode 100644 index 0000000..0adf254 --- /dev/null +++ b/task7.cpp @@ -0,0 +1,179 @@ +#include +#include +#include +#include //启用 NEON 指令 + +#define SIZE 102400000 + +// 基础向量加法函数 +void vector_add(float* A, float* B, float* C, int size) +{ + for (int i = 0; i < size; ++i) + { + C[i] = A[i] + B[i]; + } +} +//优化的向量加法函数 +void vector_add_optimized(float* A, float* B, float* C, int size) +{ + for(int i=0;i