diff --git a/utils/sislin.h b/utils/sislin.h index c02806a07591bb1a7c802ddf7f2a447e3dce8f8a..e861beecb8040ad3b012862a9bbd5d471d727650 100644 --- a/utils/sislin.h +++ b/utils/sislin.h @@ -4,11 +4,6 @@ #define COEF_MAX 32.0 // Valor máximo usado para gerar valores aleatórios de // coeficientes nos sistemas lineares. -#define ABS(num) ((num) < 0.0 ? -(num) : (num)) // Valor absoluto de um número - -// tipo usado para representar valores em ponto flutuante -typedef double real_t; - // Tipo de alocação para matrizes typedef enum { pontPont=0, // Matriz como vetor de N ponteiros para vetores de tamanho N @@ -26,11 +21,11 @@ typedef struct { // Tipos de matrizes de coeficientes usados pela função 'inicializaSistLinear()' typedef enum { generico = 0, + hilbert, + diagDominante, eqNula, eqProporcional, - eqCombLinear, - hilbert, - diagDominante + eqCombLinear } tipoSistLinear_t; diff --git a/utils/utils.h b/utils/utils.h index 09764d2e8a4886567220e89271be6c9d394331ea..38c99279104252f338e6e8e923b331463ee5d299 100644 --- a/utils/utils.h +++ b/utils/utils.h @@ -4,11 +4,18 @@ #include <stdlib.h> #include <time.h> + // Valor absoluto de um número. Alternativa ao uso da função 'fabs()' +#define ABS(num) ((num) < 0.0 ? -(num) : (num)) +// real_t: tipo usado para representar valores em ponto flutuante typedef double real_t; -typedef double rtime_t; + +// string_t: tipo usado para representar ponteiros para char/strings typedef char * string_t; +// rtime_t: tipo usado para representar valores de tempo em ponto flutuante +typedef double rtime_t; + // SIMD alignment macros #define ALIGN_64 __attribute__((aligned(64))) #define ALIGN_32 __attribute__((aligned(32))) @@ -20,6 +27,7 @@ typedef char * string_t; // Macro para verificar de valor 'n' é potência de 2 ou não #define isPot2(n) (n && !(n & (n - 1))) +// Funções double timestamp(void); string_t markerName(string_t baseName, int n);