perflab added

This commit is contained in:
2025-04-12 10:18:45 +08:00
parent a04c35be04
commit 4ea99d81a7
51 changed files with 350295 additions and 0 deletions

35
perflab/matrix/rowcol.h Normal file
View File

@@ -0,0 +1,35 @@
/* Matrix row and/or column summation code */
/* Size of matrices */
/* $begin rcdecl */
#define N 512
/* $end rcdecl */
/* Data types */
/* Pointer type for vectors */
typedef int *vecp_t;
/* $begin rcdecl */
/* N x N matrix */
typedef int matrix_t[N][N];
/* Vector of length N */
typedef int vector_t[N];
/* $end rcdecl */
/* Different sum/product function types */
typedef enum { COL, ROWCOL } rc_comp_t;
/* Summation function */
typedef void (*rc_fun)(matrix_t, vector_t, vector_t);
typedef struct {
rc_fun f;
rc_comp_t rc_type; /* What computation does it perform? */
char *descr;
} rc_fun_rec, *rc_fun_ptr;
/* Table of functions to test. Null terminated */
extern rc_fun_rec rc_fun_tab[];