PLASMA  2.4.5
PLASMA - Parallel Linear Algebra for Scalable Multi-core Architectures
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
testing_zgecfi.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <lapacke.h>
#include <plasma.h>
#include "testing_zmain.h"
Include dependency graph for testing_zgecfi.c:

Go to the source code of this file.

Functions

int testing_zgecfi (int argc, char **argv)

Detailed Description

PLASMA testings module PLASMA is a software package provided by Univ. of Tennessee, Univ. of California Berkeley and Univ. of Colorado Denver

This program tests the implementation of the inplace format conversion based on the GKK algorithm by Gustavson, Karlsson, Kagstrom.

Version:
2.4.5
Author:
Mathieu Faverge
Date:
2010-11-15

normal z -> c d s

Purpose : Test all the possibilities of matrix conversion (6*6)

Definition in file testing_zgecfi.c.


Function Documentation

int testing_zgecfi ( int  argc,
char **  argv 
)

Definition at line 89 of file testing_zgecfi.c.

References A, B, check_solution(), formatmap, formatstr, ISEED, PLASMA_DYNAMIC_SCHEDULING, PLASMA_Finalize(), PLASMA_Init(), PLASMA_SCHEDULING_MODE, PLASMA_Set(), PLASMA_SUCCESS, PLASMA_zgecfi(), PlasmaCM, and USAGE.

{
int m, n, mb, nb, mb2, nb2;
int i, ret, size;
int f1, f2;
/* Check for number of arguments*/
if (argc != 6){
USAGE("GECFI", "M N MB NB with \n",
" - M : the number of rows of the matrix \n"
" - N : the number of columns of the matrix \n"
" - MB : the number of rows of each block \n"
" - NB : the number of columns of each block \n"
" - MB2 : the number of rows of each block \n"
" - NB2 : the number of columns of each block \n");
return -1;
}
m = atoi(argv[0]);
n = atoi(argv[1]);
mb = atoi(argv[2]);
nb = atoi(argv[3]);
mb2 = atoi(argv[4]);
nb2 = atoi(argv[5]);
/* Initialize Plasma */
size = m*n*sizeof(PLASMA_Complex64_t);
A = (PLASMA_Complex64_t *)malloc(size);
B = (PLASMA_Complex64_t *)malloc(size);
LAPACKE_zlarnv_work(1, ISEED, m*n, A);
for(i=0; i<36; i++) {
memcpy(B, A, size);
f1 = conversions[i][0]-PlasmaCM;
f2 = conversions[i][1]-PlasmaCM;
printf(" - TESTING ZGECFI (%4s => %4s) ...", formatstr[f1], formatstr[f2] );
ret = PLASMA_zgecfi(m, n, B, conversions[i][0], mb, nb, conversions[i][1], mb2, nb2);
if (ret != PLASMA_SUCCESS) {
printf("Failed\n");
continue;
}
if ( check_solution(m, n, mb, nb, mb2, nb2, A, B,
(int (*)(int, int, int, int, int, int))formatmap[f1],
(int (*)(int, int, int, int, int, int))formatmap[f2] ) == 0 )
printf("............ PASSED !\n");
else
printf("... FAILED !\n");
#if 0
{
char cmd[256];
sprintf(cmd, "mv $PWD/dot_dag_file.dot $PWD/zgecfi_%s_%s.dot", formatstr[f1], formatstr[f2]);
system(cmd);
}
#endif
}
free( A ); free( B );
return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function: