-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbsofi.h
74 lines (60 loc) · 2.03 KB
/
bsofi.h
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
31
32
33
34
35
36
37
38
39
40
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
/**********************************************************************
* BSOF/I - Block structured factorization and inversion codes
* for CPU+GPU platforms
* Copyright (c) 2013, Sergiy Gogolenko
* e-mail: [email protected]
**********************************************************************
* Description:
* Host header file
*/
#ifndef __BSOFI_H__
#define __BSOFI_H__
#include "bsofi_flops.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef HAS_LAPACK
#include "bsofi_cpu.h"
/* # ifdef HAS_CUBLAS */
# include "bsofi_hybrid.h"
/* # endif */
#endif
#ifdef HAS_MAGMA
#include "bsofi_gpu.h"
#endif
#ifdef __cplusplus
}
#endif
#undef lapackXbsoi
#define lapackXbsoi lapackXbsoi_ormqr //orgqr //
#ifdef USE_FORTRAN
/* Callback names definitions for use of switches
to the best of CPU and CPU+GPU codes in Fortran */
/* #include <cuda_runtime.h> */
typedef struct bsofiHandle_s {
#ifdef HAS_CUBLAS
cublasHandle_t handle;
#else
int handle;
#endif
scalar_t *dwork;
int ldwork;
int switchBsoftri;
int switchBsoi;
} bsofiHandle_t;
# define cb_hybridXinitH FROUTINE(hybridxinith, HYBRIDXINITH)
# define cb_hybridXfinalizeH FROUTINE(hybridxfinalizeh, HYBRIDXFINALIZEH)
# define cb_hybridXbsofiLWorkH FROUTINE(hybridxbsofilworkh, HYBRIDXBSOFILWORKH)
# define cb_hybridXbsoftriH FROUTINE(hybridxbsoftrih, HYBRIDXBSOFTRIH)
# define cb_hybridXbsoiH FROUTINE(hybridxbsoih, HYBRIDXBSOIH)
int cb_hybridXinitH(/* bsofiHandle_t* handle*/int* _handle, int* n, int* L, int* lda);
int cb_hybridXbsoftriH(/* bsofiHandle_t* handle*/int* _handle,
int* n, int* L, scalar_t A[], int* lda,
scalar_t tau[], scalar_t work[], int* lwork, int* info);
int cb_hybridXbsoiH(/* bsofiHandle_t* handle*/int* _handle,
int* n, int* L, scalar_t A[], int* lda,
scalar_t tau[], scalar_t work[], int* lwork, int* info);
int cb_hybridXfinalizeH(/* bsofiHandle_t* handle*/int* _handle);
int cb_hybridXbsofiLWorkH(/* bsofiHandle_t* handle*/int* _handle, int* n, int* L, int* lda);
#endif
#endif