morse.h.in 4.18 KB
Newer Older
1 2
/**
 *
3 4
 * @copyright (c) 2009-2014 The University of Tennessee and The University
 *                          of Tennessee Research Foundation.
5
 *                          All rights reserved.
6
 * @copyright (c) 2012-2016 Inria. All rights reserved.
7
 * @copyright (c) 2012-2015 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
8 9 10 11 12 13 14 15 16 17 18 19
 *
 **/

/**
 *
 *  @file morse.h
 *
 *  MORSE main header
 *  MORSE is a software package provided by Univ. of Tennessee,
 *  Univ. of California Berkeley and Univ. of Colorado Denver,
 *  and INRIA Bordeaux Sud-Ouest
 *
20
 *  @version 0.9.0
21 22 23
 *  @author Mathieu Faverge
 *  @author Cedric Augonnet
 *  @author Cedric Castagnede
24
 *  @author Florent Pruvost
25 26 27 28 29 30
 *  @date 2012-09-15
 *
 **/
#ifndef _MORSE_H_
#define _MORSE_H_

31 32 33
#define MORSE_VERSION_MAJOR @MORSE_VERSION_MAJOR@
#define MORSE_VERSION_MINOR @MORSE_VERSION_MINOR@
#define MORSE_VERSION_MICRO @MORSE_VERSION_MICRO@
34 35


36
/* ****************************************************************************
37
 * MORSE types and constants
38
 */
PRUVOST Florent's avatar
@all  
PRUVOST Florent committed
39
#include "chameleon_config.h"
40 41 42 43 44
#include "morse_types.h"
#include "morse_struct.h"
#include "morse_constants.h"


45
/* ****************************************************************************
46 47 48 49 50
 * RUNTIME Functions
 */
#include "runtime.h"


51
/* ****************************************************************************
52 53 54 55
 * For Simulation mode
 */
#include "morse_simulate.h"

56
/* ****************************************************************************
57 58 59 60 61 62 63
 * MORSE Functions
 */
#ifdef __cplusplus
extern "C" {
#endif

/* Auxiliary */
Mathieu Faverge's avatar
Mathieu Faverge committed
64 65 66 67 68 69 70
int MORSE_Version           (int *ver_major, int *ver_minor, int *ver_micro);
int MORSE_My_Mpi_Rank       (void);
int MORSE_Init              (int nworkers, int ncudas);
int MORSE_InitPar           (int nworkers, int ncudas, int nthreads_per_worker);
int MORSE_Finalize          (void);
int MORSE_Pause             (void);
int MORSE_Resume            (void);
71 72
int MORSE_Distributed_start (void);
int MORSE_Distributed_stop  (void);
Mathieu Faverge's avatar
Mathieu Faverge committed
73 74 75 76 77 78 79 80 81
int MORSE_Comm_size         (int *size);
int MORSE_Comm_rank         (int *rank);
int MORSE_Lapack_to_Tile    (void *Af77, int LDA, MORSE_desc_t *A);
int MORSE_Tile_to_Lapack    (MORSE_desc_t *A, void *Af77, int LDA);
int MORSE_Distributed_start (void);
int MORSE_Distributed_stop  (void);
int MORSE_Distributed_size  (int *size);
int MORSE_Distributed_rank  (int *rank);
int MORSE_GetThreadNbr      (void);
82 83

/* Descriptor */
84
int MORSE_Element_Size(int type);
85 86 87
int MORSE_Desc_Create  (MORSE_desc_t **desc, void *mat, MORSE_enum dtyp,
                        int mb, int nb, int bsiz, int lm, int ln,
                        int i, int j, int m, int n, int p, int q);
THIBAULT Samuel's avatar
THIBAULT Samuel committed
88 89 90 91
int MORSE_Desc_Create_OOC (MORSE_desc_t **desc, MORSE_enum dtyp,
                           int mb, int nb, int bsiz, int lm, int ln,
                           int i, int j, int m, int n, int p, int q,
                           int (*get_rankof)( const MORSE_desc_t*, int, int ));
92 93 94 95 96 97 98 99 100
int MORSE_Desc_Create_User(MORSE_desc_t **desc, void *mat, MORSE_enum dtyp, int mb, int nb, int bsiz,
                           int lm, int ln, int i, int j, int m, int n, int p, int q,
                           void* (*get_blkaddr)( const MORSE_desc_t*, int, int ),
                           int (*get_blkldd)( const MORSE_desc_t*, int ),
                           int (*get_rankof)( const MORSE_desc_t*, int, int ));
int MORSE_Desc_Destroy (MORSE_desc_t **desc);
int MORSE_Desc_Acquire (MORSE_desc_t  *desc);
int MORSE_Desc_Release (MORSE_desc_t  *desc);
int MORSE_Desc_Getoncpu(MORSE_desc_t  *desc);
101
void MORSE_user_tag_size(int, int) ;
102 103 104 105 106 107 108 109 110

/* Workspaces */
int MORSE_Dealloc_Workspace (MORSE_desc_t **desc);

/* Options */
int MORSE_Enable  (MORSE_enum option);
int MORSE_Disable (MORSE_enum option);
int MORSE_Set     (MORSE_enum param, int  value);
int MORSE_Get     (MORSE_enum param, int *value);
111
int MORSE_Set_update_progress_callback(void (*p)(int, int)) ;
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129

/* Sequences */
int MORSE_Sequence_Create  (MORSE_sequence_t **sequence);
int MORSE_Sequence_Destroy (MORSE_sequence_t *sequence);
int MORSE_Sequence_Wait    (MORSE_sequence_t *sequence);

#ifdef __cplusplus
}
#endif

#include "morse_z.h"
#include "morse_c.h"
#include "morse_d.h"
#include "morse_s.h"
#include "morse_zc.h"
#include "morse_ds.h"

#endif