From 317d2131d7fe1abdb8ee2d056b2f967d7b14a4f4 Mon Sep 17 00:00:00 2001 From: pecp45i32 Date: Fri, 29 Nov 2024 20:50:11 +0800 Subject: [PATCH] Delete 'step1' --- step1 | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 step1 diff --git a/step1 b/step1 deleted file mode 100644 index 832577f..0000000 --- a/step1 +++ /dev/null @@ -1,30 +0,0 @@ -#include -#include -#include -#include - -#define SIZE 1024 - -void inArry(float a[]) { - srand(time(NULL)); - for (int i = 0; i < SIZE; i++) - { - a[i] = rand() % 100; - } -} - -void vector_add(float* A, float* B, float* C, int size) { - for (int i = 0; i < SIZE; i++) { - C[i] = A[i] + B[i]; - } -} - -int main() { - float A[SIZE], B[SIZE], C[SIZE]; - inArry(A); - inArry(B); - clock_t start = clock(); - vector_add (A,B,C,SIZE); - clock_t end = clock(); - printf("%f", (double)(end - start) / CLOCKS_PER_SEC); -}