Mentions légales du service

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

Add a common header for testings

parent 174d238f
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,8 @@
###
include(RulesPrecisions)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
## Generate the test library files for all required precisions
set(LIB_SOURCES
z_spm_tests.c
......
......@@ -15,7 +15,7 @@
* @precisions normal z -> c d s
*
**/
#include <spm.h>
#include <spm_tests.h>
#include "cblas.h"
/**
......
......@@ -17,7 +17,7 @@
* @precisions normal z -> c d s
*
**/
#include <spm.h>
#include <spm_tests.h>
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#define Rnd64_A 6364136223846793005ULL
......
......@@ -13,7 +13,7 @@
* @date 2017-06-15
*
*/
#include <spm.h>
#include <spm_tests.h>
#include <unistd.h>
#if defined(HAVE_GETOPT_H)
#include <getopt.h>
......
......@@ -22,7 +22,7 @@
#include <math.h>
#include <string.h>
#include <assert.h>
#include <spm.h>
#include <spm_tests.h>
#include "cblas.h"
#include "lapacke.h"
#include <p_spm.h>
......
......@@ -23,7 +23,7 @@
#include <string.h>
#include <assert.h>
#include <time.h>
#include <spm.h>
#include <spm_tests.h>
#define PRINT_RES(_ret_) \
if(_ret_ == -1) { \
......
......@@ -2,7 +2,7 @@
*
* @file spm_dof_expand_tests.c
*
* Tests and validate the spmNorm routines when the spm hold constant and/or variadic dofs.
* Tests and validate the spmNorm routines when the spm_tests.hold constant and/or variadic dofs.
*
* @copyright 2015-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
......@@ -23,7 +23,7 @@
#include <string.h>
#include <assert.h>
#include <time.h>
#include "spm.h"
#include "spm_tests.h"
int z_spm_norm_check( const spmatrix_t *spm );
int c_spm_norm_check( const spmatrix_t *spm );
......
......@@ -2,7 +2,7 @@
*
* @file spm_dof_matvec_tests.c
*
* Tests and validate the spmMatVec routines when the spm hold constant and/or variadic dofs.
* Tests and validate the spmMatVec routines when the spm_tests.hold constant and/or variadic dofs.
*
* @copyright 2015-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
......@@ -21,7 +21,7 @@
#include <string.h>
#include <assert.h>
#include <time.h>
#include "spm.h"
#include "spm_tests.h"
int z_spm_matvec_check( int trans, const spmatrix_t *spm );
int c_spm_matvec_check( int trans, const spmatrix_t *spm );
......
......@@ -2,7 +2,7 @@
*
* @file spm_dof_norm_tests.c
*
* Tests and validate the spm_norm routines when the spm hold constant and/or variadic dofs.
* Tests and validate the spm_norm routines when the spm_tests.hold constant and/or variadic dofs.
*
* @copyright 2015-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
......@@ -20,7 +20,7 @@
#include <string.h>
#include <assert.h>
#include <time.h>
#include <spm.h>
#include <spm_tests.h>
int z_spm_norm_check( const spmatrix_t *spm );
int c_spm_norm_check( const spmatrix_t *spm );
......
......@@ -20,7 +20,7 @@
#include <string.h>
#include <assert.h>
#include <time.h>
#include "spm.h"
#include "spm_tests.h"
int z_spm_matvec_check( int trans, const spmatrix_t *spm );
int c_spm_matvec_check( int trans, const spmatrix_t *spm );
......
......@@ -20,7 +20,7 @@
#include <string.h>
#include <assert.h>
#include <time.h>
#include <spm.h>
#include <spm_tests.h>
int z_spm_norm_check( const spmatrix_t *spm );
int c_spm_norm_check( const spmatrix_t *spm );
......
/**
*
* @file spm_tests.h
*
* SParse Matrix package testings header.
*
* @copyright 2016-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
* @version 1.0.0
* @author Mathieu Faverge
* @date 2013-06-24
*
**/
#ifndef _spm_tests_h_
#define _spm_tests_h_
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>
#include <spm.h>
void spmGetOptions( int argc, char **argv,
spm_driver_t *driver, char **filename );
void core_zplrnt( int m, int n, spm_complex64_t *A, int lda,
int gM, int m0, int n0, unsigned long long int seed );
int core_zgeadd( spm_trans_t trans,
spm_int_t M,
spm_int_t N,
spm_complex64_t alpha,
const spm_complex64_t *A,
spm_int_t LDA,
spm_complex64_t beta,
spm_complex64_t *B,
spm_int_t LDB );
void core_cplrnt( int m, int n, spm_complex32_t *A, int lda,
int gM, int m0, int n0, unsigned long long int seed );
int core_cgeadd( spm_trans_t trans,
spm_int_t M,
spm_int_t N,
spm_complex32_t alpha,
const spm_complex32_t *A,
spm_int_t LDA,
spm_complex32_t beta,
spm_complex32_t *B,
spm_int_t LDB );
void core_dplrnt( int m, int n, double *A, int lda,
int gM, int m0, int n0, unsigned long long int seed );
int core_dgeadd( spm_trans_t trans,
spm_int_t M,
spm_int_t N,
double alpha,
const double *A,
spm_int_t LDA,
double beta,
double *B,
spm_int_t LDB );
void core_splrnt( int m, int n, float *A, int lda,
int gM, int m0, int n0, unsigned long long int seed );
int core_sgeadd( spm_trans_t trans,
spm_int_t M,
spm_int_t N,
float alpha,
const float *A,
spm_int_t LDA,
float beta,
float *B,
spm_int_t LDB );
void z_spm_print_check( char *filename, const spmatrix_t *spm );
int z_spm_matvec_check( int trans, const spmatrix_t *spm );
int z_spm_norm_check( const spmatrix_t *spm );
void c_spm_print_check( char *filename, const spmatrix_t *spm );
int c_spm_matvec_check( int trans, const spmatrix_t *spm );
int c_spm_norm_check( const spmatrix_t *spm );
void d_spm_print_check( char *filename, const spmatrix_t *spm );
int d_spm_matvec_check( int trans, const spmatrix_t *spm );
int d_spm_norm_check( const spmatrix_t *spm );
void s_spm_print_check( char *filename, const spmatrix_t *spm );
int s_spm_matvec_check( int trans, const spmatrix_t *spm );
int s_spm_norm_check( const spmatrix_t *spm );
#endif /* _spm_tests_h_ */
......@@ -24,7 +24,7 @@
#include <math.h>
#include <string.h>
#include <assert.h>
#include <spm.h>
#include <spm_tests.h>
#include "cblas.h"
#include "lapacke.h"
#include <z_spm.h>
......
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