1
2
3
4
5
6
7
8
9
10
11
12
13
14 #ifndef TEST_OPAL_DDT_LIB_H
15 #define TEST_OPAL_DDT_LIB_H
16
17 #include "opal_config.h"
18
19 #include "opal/datatype/opal_datatype.h"
20
21
22 #define TIMER_DATA_TYPE struct timeval
23 #define GET_TIME(TV) gettimeofday( &(TV), NULL )
24 #define ELAPSED_TIME(TSTART, TEND) (((TEND).tv_sec - (TSTART).tv_sec) * 1000000 + ((TEND).tv_usec - (TSTART).tv_usec))
25
26 #define DUMP_DATA_AFTER_COMMIT 0x00000001
27 #define CHECK_PACK_UNPACK 0x00000002
28 #define VALIDATE_DATA 0x00000004
29 #define RESET_CONVERTORS 0x00000010
30 #define QUIT_ON_FIRST_ERROR 0x00000020
31
32 extern uint32_t outputFlags;
33
34 extern void cache_trash( void );
35 extern opal_datatype_t* create_contiguous_type( opal_datatype_t const * const type, int length );
36 extern opal_datatype_t* create_vector_type( opal_datatype_t const* const data, int count, int length, int stride );
37 extern opal_datatype_t* create_strange_dt( void );
38 extern opal_datatype_t* upper_matrix( unsigned int mat_size );
39 extern opal_datatype_t* lower_matrix( unsigned int mat_size );
40 extern opal_datatype_t* test_matrix_borders( unsigned int size, unsigned int width );
41 extern int init_random_upper_matrix( unsigned int N, double* mat );
42 extern int check_diag_matrix( unsigned int N, double* mat1, double* mat2 );
43 extern opal_datatype_t* test_contiguous( void );
44 extern opal_datatype_t* test_struct_char_double( void );
45 extern opal_datatype_t* test_create_twice_two_doubles( void );
46 extern opal_datatype_t* test_struct( void );
47 extern opal_datatype_t* test_create_blacs_type( void );
48 extern opal_datatype_t* test_create_blacs_type1( opal_datatype_t const * const base_type );
49 extern opal_datatype_t* test_create_blacs_type2( opal_datatype_t const * const base_type );
50
51 extern opal_datatype_t* create_struct_constant_gap_resized_ddt( const opal_datatype_t* type );
52
53 #endif