summaryrefslogtreecommitdiff
path: root/linear.c
diff options
context:
space:
mode:
Diffstat (limited to 'linear.c')
-rw-r--r--linear.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/linear.c b/linear.c
index f7aeecc..96d1a0b 100644
--- a/linear.c
+++ b/linear.c
@@ -65,7 +65,6 @@ static int lusolve(double a[][LUARRAYCOLS],
double
DoLU(void)
{
- const char* context = "FPU:LU";
clock_t total_time = 0;
int iterations = 0;
double* a = NULL;
@@ -110,23 +109,8 @@ DoLU(void)
++num_arrays;
abase = realloc(abase, sizeof(double) * LUARRAYCOLS * LUARRAYROWS * (num_arrays + 1));
- if (!abase) {
- fprintf(stderr, "Error in %s, could not allocate memory. Exitting...\n", context);
- free(a);
- free(b);
- free(LUtempvv);
- exit(1);
- }
bbase = realloc(bbase, sizeof(double) * LUARRAYROWS * (num_arrays + 1));
- if (!bbase) {
- fprintf(stderr, "Error in %s, could not allocate memory. Exitting...\n", context);
- free(a);
- free(b);
- free(abase);
- free(LUtempvv);
- exit(1);
- }
} while ((DoLUIteration(a, b, abase, bbase, num_arrays) <= MINIMUM_TICKS) && (num_arrays <= ARRAY_MAX));
/*
@@ -147,23 +131,8 @@ DoLU(void)
** number of arrays and proceed.
*/
abase = malloc(sizeof(double) * LUARRAYCOLS * LUARRAYROWS * num_arrays);
- if (!abase) {
- fprintf(stderr, "Error in %s, could not allocate memory. Exitting...\n", context);
- free(a);
- free(b);
- free(LUtempvv);
- exit(1);
- }
bbase = malloc(sizeof(double) * LUARRAYROWS * num_arrays);
- if (!bbase) {
- fprintf(stderr, "Error in %s, could not allocate memory. Exitting...\n", context);
- free(a);
- free(b);
- free(abase);
- free(LUtempvv);
- exit(1);
- }
}
do {