Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 6d852b8d authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Aply the same change to link_to_chameleon.c

parent cf114251
No related branches found
No related tags found
1 merge request!87Sonarqube /hotfix
......@@ -132,17 +132,6 @@ static void print_header(char *prog_name, int * iparam) {
return;
}
/**
* Macro to allocate a matrix as a 1D array
*/
#define PASTE_CODE_ALLOCATE_MATRIX(_name_, _type_, _m_, _n_) \
_type_ *_name_ = NULL; \
_name_ = (_type_*)malloc( (_m_) * (_n_) * sizeof(_type_) ); \
if ( ! _name_ ) { \
fprintf(stderr, "Out of Memory for %s\n", #_name_); \
return -1; \
}
/*
* test external application link with chameleon
*/
......@@ -203,10 +192,10 @@ int main(int argc, char *argv[]) {
* - set of RHS vectors B : size N x NRHS
* - set of solutions vectors X : size N x NRHS
*/
PASTE_CODE_ALLOCATE_MATRIX( A, double, N, N );
PASTE_CODE_ALLOCATE_MATRIX( B, double, N, NRHS );
PASTE_CODE_ALLOCATE_MATRIX( X, double, N, NRHS );
PASTE_CODE_ALLOCATE_MATRIX( Acpy, double, N, N );
double *A = malloc( N * N * sizeof(double) );
double *Acpy = malloc( N * N * sizeof(double) );
double *B = malloc( N * NRHS * sizeof(double) );
double *X = malloc( N * NRHS * sizeof(double) );
/* generate A matrix with random values such that it is spd */
MORSE_dplgsy( (double)N, MorseUpperLower, N, A, N, 51 );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment