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
plasma_f77.c
Go to the documentation of this file.
1 
14 #include <stdlib.h>
15 #include "common.h"
16 
17 #ifdef ADD_
18  #define PLASMA_INIT plasma_init_
19  #define PLASMA_FINALIZE plasma_finalize_
20  #define PLASMA_ENABLE plasma_enable_
21  #define PLASMA_DISABLE plasma_disable_
22  #define PLASMA_SET plasma_set_
23  #define PLASMA_GET plasma_get_
24  #define PLASMA_DEALLOC_HANDLE plasma_dealloc_handle_
25  #define PLASMA_VERSION plasma_version_
26  #define PLASMA_DESC_CREATE plasma_desc_create_
27  #define PLASMA_DESC_DESTROY plasma_desc_destroy_
28  #define PLASMA_LAPACK_TO_TILE plasma_lapack_to_tile_
29  #define PLASMA_TILE_TO_LAPACK plasma_tile_to_lapack_
30 #elif defined (NOCHANGE)
31  #define PLASMA_INIT plasma_init
32  #define PLASMA_FINALIZE plasma_finalize
33  #define PLASMA_ENABLE plasma_enable
34  #define PLASMA_DISABLE plasma_disable
35  #define PLASMA_SET plasma_set
36  #define PLASMA_GET plasma_get
37  #define PLASMA_DEALLOC_HANDLE plasma_dealloc_handle
38  #define PLASMA_VERSION plasma_version
39  #define PLASMA_DESC_CREATE plasma_desc_create
40  #define PLASMA_DESC_DESTROY plasma_desc_destroy
41  #define PLASMA_LAPACK_TO_TILE plasma_lapack_to_tile
42  #define PLASMA_TILE_TO_LAPACK plasma_tile_to_lapack
43 #endif
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
49 /***************************************************************************/
52 void PLASMA_INIT(int *CORES, int *INFO)
53 { *INFO = PLASMA_Init(*CORES); }
54 
55 void PLASMA_FINALIZE(int *INFO)
56 { *INFO = PLASMA_Finalize(); }
57 
58 void PLASMA_ENABLE(PLASMA_enum *lever, int *INFO)
59 { *INFO = PLASMA_Enable(*lever); }
60 
61 void PLASMA_DISABLE(PLASMA_enum *lever, int *INFO)
62 { *INFO = PLASMA_Disable(*lever); }
63 
64 void PLASMA_SET(PLASMA_enum *param, int *value, int *INFO)
65 { *INFO = PLASMA_Set(*param, *value); }
66 
67 void PLASMA_GET(PLASMA_enum *param, int *value, int *INFO)
68 { *INFO = PLASMA_Get(*param, value); }
69 
70 void PLASMA_DEALLOC_HANDLE(size_t *sp, int *INFO)
71 { free((void *)(*sp));
72  *INFO = PLASMA_SUCCESS; }
73 
74 void PLASMA_VERSION(int *VER_MAJOR, int *VER_MINOR, int *VER_MICRO, int *INFO)
75 {
76  *VER_MAJOR = PLASMA_VERSION_MAJOR;
77  *VER_MINOR = PLASMA_VERSION_MINOR;
78  *VER_MICRO = PLASMA_VERSION_MICRO;
79  *INFO = PLASMA_SUCCESS;
80 }
81 
82 /***************************************************************************/
85 void PLASMA_DESC_CREATE(PLASMA_desc **desc, void *mat, PLASMA_enum *dtyp, int *mb, int *nb, int *bsiz, int *lm, int *ln, int *i, int *j, int *m, int *n, int *INFO)
86 { *INFO = PLASMA_Desc_Create(desc, mat, *dtyp, *mb, *nb, *bsiz, *lm, *ln, *i, *j, *m, *n); }
87 
88 void PLASMA_DESC_DESTROY(PLASMA_desc **desc, int *INFO)
89 { *INFO = PLASMA_Desc_Destroy(desc); }
90 
91 /***************************************************************************/
94 void PLASMA_LAPACK_TO_TILE(intptr_t *Af77, int *LDA, intptr_t *A, int *INFO)
95 { *INFO = PLASMA_Lapack_to_Tile( (void *)Af77, *LDA, (PLASMA_desc *)(*A)); }
96 
97 void PLASMA_TILE_TO_LAPACK(intptr_t *A, intptr_t *Af77, int *LDA, int *INFO)
98 { *INFO = PLASMA_Tile_to_Lapack((PLASMA_desc *)(*A), (void *)Af77, *LDA); }
99 
100 #ifdef __cplusplus
101 }
102 #endif