cudablas.h 2.07 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/**
 *
 * @copyright (c) 2009-2014 The University of Tennessee and The University
 *                          of Tennessee Research Foundation.
 *                          All rights reserved.
 * @copyright (c) 2012-2015 Inria. All rights reserved.
 * @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
 *
 **/

/**
 *
 * @file cudablas.h
 *
 *  MORSE cudablas headers
 *  MORSE is a software package provided by Univ. of Tennessee,
 *  Univ. of California Berkeley and Univ. of Colorado Denver,
 *  and INRIA Bordeaux Sud-Ouest
 *
 * @author Florent Pruvost
 * @date 2015-09-16
 * @precisions normal z -> c d s
 *
 **/
#ifndef _CUDA_BLAS_H_
#define _CUDA_BLAS_H_

#include <stdio.h>
#include <math.h>
#include <string.h>
31
#include <assert.h>
32
33
34
35

#if defined(CHAMELEON_USE_CUDA)
#include <cuda.h>
#include <cuComplex.h>
36
37
38
39
40
#if defined(CHAMELEON_USE_CUBLAS_V2)
#include <cublas_v2.h>
#else
#include <cublas.h>
#endif
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#if defined(CHAMELEON_USE_MAGMA)
#include <magma.h>
#endif
/** ****************************************************************************
 * CUDA BLAS headers
 **/
#include "cudablas/include/cudablas_z.h"
#include "cudablas/include/cudablas_d.h"
#include "cudablas/include/cudablas_c.h"
#include "cudablas/include/cudablas_s.h"
#endif

/** ****************************************************************************
 * MORSE types and constants
 **/
#include "morse_types.h"
#include "morse_struct.h"
#include "morse_constants.h"

#ifdef __cplusplus
extern "C" {
#endif

/*******************************************************************************
 *  Global utilities
 **/
#ifndef max
#define max(a, b) ((a) > (b) ? (a) : (b))
#endif
#ifndef min
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif
#ifndef roundup
#define roundup(a, b) (b <= 0) ? (a) : (((a) + (b)-1) & ~((b)-1))
#endif

/** ****************************************************************************
 *  LAPACK Constants
 **/
extern char *morse_lapack_constants[];
#define morse_lapack_const(morse_const) morse_lapack_constants[morse_const][0]

#ifdef __cplusplus
}
#endif

#endif