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_cgetmi.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <lapacke.h>
#include <plasma.h>
#include "testing_cmain.h"
Include dependency graph for testing_cgetmi.c:

Go to the source code of this file.

Functions

int testing_cgetmi (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

c Tue Nov 22 14:35:50 2011

Purpose : Test the in place matrix transposition with the 6 different formats of input.

Definition in file testing_cgetmi.c.


Function Documentation

int testing_cgetmi ( int  argc,
char **  argv 
)

Definition at line 46 of file testing_cgetmi.c.

References A, B, check_solution(), format, formatmap, formatstr, ISEED, PLASMA_cgetmi(), PLASMA_SUCCESS, and USAGE.

{
int m, n, mb, nb;
int i, ret, size;
/* Check for number of arguments*/
if (argc != 4){
USAGE("GETMI", "M N MB NB ntdbypb 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");
return -1;
}
m = atoi(argv[0]);
n = atoi(argv[1]);
mb = atoi(argv[2]);
nb = atoi(argv[3]);
size = m*n*sizeof(PLASMA_Complex32_t);
A = (PLASMA_Complex32_t *)malloc(size);
B = (PLASMA_Complex32_t *)malloc(size);
LAPACKE_clarnv_work(1, ISEED, m*n, A);
for(i=0; i<6; i++) {
memcpy(B, A, size);
printf(" - TESTING CGETMI (%4s) ...", formatstr[i]);
ret = PLASMA_cgetmi( m, n, A, format[i], mb, nb );
if (ret != PLASMA_SUCCESS) {
printf("Failed\n");
continue;
}
if ( check_solution(m, n, mb, nb, B, A,
(int (*)(int, int, int, int, int, int))formatmap[i]) == 0 )
printf("............ PASSED !\n");
else
printf("... FAILED !\n");
}
free( A ); free( B );
return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function: