chameleon.h 5.24 KB
Newer Older
1
/**
2
 *
3
 * @file chameleon.h
4
 *
Mathieu Faverge's avatar
Mathieu Faverge committed
5 6
 * @copyright 2009-2014 The University of Tennessee and The University of
 *                      Tennessee Research Foundation. All rights reserved.
Mathieu Faverge's avatar
Mathieu Faverge committed
7
 * @copyright 2012-2018 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
8
 *                      Univ. Bordeaux. All rights reserved.
9
 *
10
 ***
11
 *
12
 * @brief Chameleon main header
13
 *
Mathieu Faverge's avatar
Mathieu Faverge committed
14
 * @version 1.0.0
15 16 17 18 19
 * @author Mathieu Faverge
 * @author Cedric Augonnet
 * @author Cedric Castagnede
 * @author Florent Pruvost
 * @date 2012-09-15
20
 *
21
 */
Mathieu Faverge's avatar
Mathieu Faverge committed
22 23
#ifndef _chameleon_h_
#define _chameleon_h_
24

25
/* ****************************************************************************
26
 * CHAMELEON types and constants
27
 */
28 29 30 31
#include "chameleon/config.h"
#include "chameleon/constants.h"
#include "chameleon/types.h"
#include "chameleon/struct.h"
32

33
/* ****************************************************************************
34
 * CHAMELEON runtime common API
35
 */
36
#include "chameleon/runtime.h"
37 38


39
/* ****************************************************************************
40
 * CHAMELEON Simulation mode
41
 */
42
#include "chameleon/simulate.h"
43 44 45 46 47 48 49

/* ****************************************************************************
 * Include LibHQR for hierarchical trees QR/LQ factorizations
 */
#include "libhqr.h"

/* ****************************************************************************
50
 * CHAMELEON Tasks
51
 */
52
#include "chameleon/tasks.h"
53 54

/* ****************************************************************************
55
 * CHAMELEON functionnalities
56
 */
Mathieu Faverge's avatar
Mathieu Faverge committed
57 58
int CHAMELEON_map_Tile( cham_uplo_t           uplo,
                        CHAM_desc_t          *A,
59
                        cham_unary_operator_t op_fct,
Mathieu Faverge's avatar
Mathieu Faverge committed
60 61 62
                        void                 *op_args );
int CHAMELEON_map_Tile_Async( cham_uplo_t           uplo,
                              CHAM_desc_t          *A,
63
                              cham_unary_operator_t op_fct,
Mathieu Faverge's avatar
Mathieu Faverge committed
64 65 66 67
                              void                 *op_args,
                              RUNTIME_sequence_t   *sequence,
                              RUNTIME_request_t    *request );

68 69 70 71 72 73
#include "chameleon/chameleon_z.h"
#include "chameleon/chameleon_c.h"
#include "chameleon/chameleon_d.h"
#include "chameleon/chameleon_s.h"
#include "chameleon/chameleon_zc.h"
#include "chameleon/chameleon_ds.h"
74

75
/* ****************************************************************************
76
 * CHAMELEON Functions
77
 */
78
BEGIN_C_DECLS
79 80

/* Auxiliary */
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
int CHAMELEON_Version           (int *ver_major, int *ver_minor, int *ver_micro);
int CHAMELEON_My_Mpi_Rank       (void);
int CHAMELEON_Init              (int nworkers, int ncudas);
int CHAMELEON_InitPar           (int nworkers, int ncudas, int nthreads_per_worker);
int CHAMELEON_Finalize          (void);
int CHAMELEON_Pause             (void);
int CHAMELEON_Resume            (void);
int CHAMELEON_Distributed_start (void);
int CHAMELEON_Distributed_stop  (void);
int CHAMELEON_Comm_size         (void);
int CHAMELEON_Comm_rank         (void);
int CHAMELEON_Lapack_to_Tile    (void *Af77, int LDA, CHAM_desc_t *A);
int CHAMELEON_Tile_to_Lapack    (CHAM_desc_t *A, void *Af77, int LDA);
int CHAMELEON_Distributed_start (void);
int CHAMELEON_Distributed_stop  (void);
int CHAMELEON_Distributed_size  (int *size);
int CHAMELEON_Distributed_rank  (int *rank);
int CHAMELEON_GetThreadNbr      (void);
99 100

/* Descriptor */
101 102
int CHAMELEON_Element_Size(int type);
int CHAMELEON_Desc_Create  (CHAM_desc_t **desc, void *mat, cham_flttype_t dtyp,
103 104
                        int mb, int nb, int bsiz, int lm, int ln,
                        int i, int j, int m, int n, int p, int q);
105
int CHAMELEON_Desc_Create_User(CHAM_desc_t **desc, void *mat, cham_flttype_t dtyp, int mb, int nb, int bsiz,
106
                           int lm, int ln, int i, int j, int m, int n, int p, int q,
107 108 109 110
                           void* (*get_blkaddr)( const CHAM_desc_t*, int, int ),
                           int (*get_blkldd)( const CHAM_desc_t*, int ),
                           int (*get_rankof)( const CHAM_desc_t*, int, int ));
int CHAMELEON_Desc_Create_OOC(CHAM_desc_t **desc, cham_flttype_t dtyp,
111 112
                          int mb, int nb, int bsiz, int lm, int ln,
                          int i, int j, int m, int n, int p, int q);
113
int CHAMELEON_Desc_Create_OOC_User(CHAM_desc_t **desc, cham_flttype_t dtyp,
114 115
                               int mb, int nb, int bsiz, int lm, int ln,
                               int i, int j, int m, int n, int p, int q,
116 117 118 119 120 121
                               int (*get_rankof)( const CHAM_desc_t*, int, int ));
int CHAMELEON_Desc_Destroy (CHAM_desc_t **desc);
int CHAMELEON_Desc_Acquire (CHAM_desc_t  *desc);
int CHAMELEON_Desc_Release (CHAM_desc_t  *desc);
int CHAMELEON_Desc_Flush   (CHAM_desc_t  *desc, RUNTIME_sequence_t *sequence);
void CHAMELEON_user_tag_size(int, int) ;
122 123

/* Workspaces */
124
int CHAMELEON_Dealloc_Workspace (CHAM_desc_t **desc);
125 126

/* Options */
127 128 129 130 131
int CHAMELEON_Enable  (int option);
int CHAMELEON_Disable (int option);
int CHAMELEON_Set     (int param, int  value);
int CHAMELEON_Get     (int param, int *value);
int CHAMELEON_Set_update_progress_callback(void (*p)(int, int)) ;
132 133

/* Sequences */
134 135 136
int CHAMELEON_Sequence_Create  (RUNTIME_sequence_t **sequence);
int CHAMELEON_Sequence_Destroy (RUNTIME_sequence_t *sequence);
int CHAMELEON_Sequence_Wait    (RUNTIME_sequence_t *sequence);
137

138
END_C_DECLS
139

Mathieu Faverge's avatar
Mathieu Faverge committed
140
#endif /* _chameleon_h_ */