MAGMA  magma-1.4.0
Matrix Algebra on GPU and Multicore Architectures
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
auxiliary.h
Go to the documentation of this file.
1 /*
2  -- MAGMA (version 1.4.0) --
3  Univ. of Tennessee, Knoxville
4  Univ. of California, Berkeley
5  Univ. of Colorado, Denver
6  August 2013
7 */
8 
9 #ifndef MAGMA_AUXILIARY_H
10 #define MAGMA_AUXILIARY_H
11 
12 #include "magma_types.h"
13 
14 /* ------------------------------------------------------------
15  * -- MAGMA Auxiliary structures and functions
16  * --------------------------------------------------------- */
17 typedef struct magma_timestr_s
18 {
19  unsigned int sec;
20  unsigned int usec;
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
28 double GetTimerValue(magma_timestr_t time_1, magma_timestr_t time_2);
29 
31 real_Double_t magma_sync_wtime( magma_queue_t queue );
32 
33 size_t magma_strlcpy(char *dst, const char *src, size_t siz);
34 
36 
37 double magma_cabs(magmaDoubleComplex x);
38 float magma_cabsf(magmaFloatComplex x);
39 
40 magma_int_t magma_is_devptr( const void* A );
41 
42 // magma GPU-complex PCIe connection
44 
46  magma_int_t j0, magma_int_t j1,
47  magma_int_t* dj0, magma_int_t* dj1 );
48 
49 void magma_print_devices();
50 
51 void swp2pswp(magma_trans_t trans, magma_int_t n, magma_int_t *ipiv, magma_int_t *newipiv);
52 
53 #ifdef __cplusplus
54 }
55 #endif
56 
57 #endif // MAGMA_AUXILIARY_H
size_t magma_strlcpy(char *dst, const char *src, size_t siz)
Definition: strlcpy.cpp:47
magma_int_t magma_buildconnection_mgpu(magma_int_t gnode[MagmaMaxGPUs+2][MagmaMaxGPUs+2], magma_int_t *nbcmplx, magma_int_t ngpu)
magma_int_t magma_num_gpus(void)
Definition: auxiliary.cpp:83
int magma_int_t
Definition: magmablas.h:12
struct magma_timestr_s magma_timestr_t
unsigned int usec
Definition: auxiliary.h:15
char magma_trans_t
Definition: magma_types.h:377
void swp2pswp(magma_trans_t trans, magma_int_t n, magma_int_t *ipiv, magma_int_t *newipiv)
Definition: auxiliary.cpp:117
unsigned int sec
Definition: auxiliary.h:14
void magma_indices_1D_bcyclic(magma_int_t nb, magma_int_t ngpu, magma_int_t dev, magma_int_t j0, magma_int_t j1, magma_int_t *dj0, magma_int_t *dj1)
Definition: auxiliary.cpp:220
#define MagmaMaxGPUs
Definition: magma_types.h:255
void magma_print_devices()
float magma_cabsf(magmaFloatComplex x)
double magma_sync_wtime(magma_queue_t queue)
Definition: timer.cpp:119
double magma_wtime(void)
Definition: timer.cpp:110
#define A(i, j)
Definition: cprint.cpp:16
double magma_cabs(magmaDoubleComplex x)
double GetTimerValue(magma_timestr_t start, magma_timestr_t end)
Definition: timer.cpp:94
double real_Double_t
Definition: magma_types.h:27
magma_int_t magma_is_devptr(const void *A)
Definition: auxiliary.cpp:47
magma_timestr_t get_current_time(void)
Definition: timer.cpp:76