Abstract the working data type to its own header
This commit is contained in:
parent
a614b03229
commit
da3327ce7e
|
@ -0,0 +1,12 @@
|
|||
#ifndef ACED_INCLUDES_DATA_H
|
||||
#define ACED_INCLUDES_DATA_H
|
||||
|
||||
// Definition of the datatype representing the input.
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#define PRImDATA PRIiFAST32
|
||||
#define SCNmDATA SCNiFAST32
|
||||
typedef int_fast32_t data_t;
|
||||
|
||||
#endif
|
|
@ -2,11 +2,7 @@
|
|||
#define ACED_INCLUDES_MATRIX_H_
|
||||
|
||||
#include <stddef.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#define PRImDATA PRIiFAST32
|
||||
#define SCNmDATA SCNiFAST32
|
||||
typedef int_fast32_t matrix_data_t;
|
||||
#include "../includes/data.h"
|
||||
|
||||
// Struct representing the input matrix.
|
||||
typedef struct
|
||||
|
@ -14,7 +10,7 @@ typedef struct
|
|||
// Number of elements in one row.
|
||||
size_t row_len;
|
||||
// Pointer to the buffer containing the matrix's entries.
|
||||
matrix_data_t *head;
|
||||
data_t *head;
|
||||
// Number of entries in the matrix.
|
||||
size_t len;
|
||||
} matrix_t;
|
||||
|
|
Loading…
Reference in New Issue