forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
THLapack.h
27 lines (21 loc) · 1.32 KB
/
THLapack.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
#ifndef TH_LAPACK_INC
#define TH_LAPACK_INC
#include <TH/THGeneral.h>
#define THLapack_(NAME) TH_CONCAT_4(TH,Real,Lapack_,NAME)
#define THLapackCheck(fmt, func, info , ...) \
if (info < 0) { \
THError("Lapack Error in %s : Illegal Argument %d", func, -info); \
} else if(info > 0) { \
THError(fmt, func, info, ##__VA_ARGS__); \
} \
#define THLapackCheckWithCleanup(fmt, cleanup, func, info , ...) \
if (info < 0) { \
cleanup \
THError("Lapack Error in %s : Illegal Argument %d", func, -info); \
} else if(info > 0) { \
cleanup \
THError(fmt, func, info, ##__VA_ARGS__); \
}
#include <TH/generic/THLapack.h>
#include <TH/THGenerateAllTypes.h>
#endif