cloudFPGA (cF) API
1.0
The documentation of the source code of cloudFPGA (cF)
Return to the generic documentation of cloudFPGA
config.h
Go to the documentation of this file.
1
17
34
//------------------------------------ USEFUL MACROS --------------------------------------------
35
37
#define CEIL(a, b) (((a) + (b-1)) / (b))
38
39
40
41
//-------------------------------- USER DEFINED OPTIONS ------------------------------------------
42
45
#define PACK_SIZE 1024
46
48
#define BUF_LEN 65540
49
50
/* For HOST TB uncomment this. For normal host execution keep it commented */
51
//#define TB_SIM_CFP_VITIS
52
54
#define NET_TYPE udp
55
57
#define DtUsed double
58
60
#define MCM_NM 6
61
63
#define OUTDEP 1024
64
65
//---------------------------- AUTOMATICALLY DEFINED OPTIONS -------------------------------------
66
68
#define TOT_TRANSFERS_IN (CEIL(INSIZE, PACK_SIZE))
69
#define TOT_TRANSFERS_OUT (CEIL(OUTSIZE, PACK_SIZE))
70
#define TOT_TRANSFERS TOT_TRANSFERS_IN + TOT_TRANSFERS_OUT
71
72
#if DtUsed == double
73
//#define DtUsedInt long unsigned int
74
typedef
long
unsigned
int
DtUsedInt
;
75
#elif DtUsed == float
76
#define DtUsedInt unsigned int
77
#endif
78
79
#define tcp 0
80
#define udp 1
81
82
//--------------------------------- USER DEFINED STRUCTS ------------------------------------------
83
85
struct
varin
{
86
DtUsedInt
loop_nm
;
87
DtUsedInt
seed
;
88
DtUsed
underlying
;
89
DtUsed
volatility
;
90
DtUsed
dividendYield
;
91
DtUsed
riskFreeRate
;
92
DtUsed
timeLength
;
93
DtUsed
strike
;
94
DtUsedInt
optionType
;
95
DtUsed
requiredTolerance
;
96
DtUsedInt
requiredSamples
;
97
DtUsedInt
timeSteps
;
98
DtUsedInt
maxSamples
;
99
};
100
102
union
intToFloatUnion
{
103
DtUsed
f
;
104
DtUsedInt
i
;
105
};
106
107
DtUsedInt
long unsigned int DtUsedInt
Definition:
config.h:74
DtUsed
#define DtUsed
Definition:
config.h:57
varin
Definition:
config.h:85
varin::dividendYield
double dividendYield
Definition:
config.h:90
varin::seed
DtUsedInt seed
Definition:
config.h:87
varin::maxSamples
DtUsedInt maxSamples
Definition:
config.h:98
varin::riskFreeRate
double riskFreeRate
Definition:
config.h:91
varin::volatility
double volatility
Definition:
config.h:89
varin::requiredTolerance
double requiredTolerance
Definition:
config.h:95
varin::loop_nm
DtUsedInt loop_nm
Definition:
config.h:86
varin::underlying
double underlying
Definition:
config.h:88
varin::timeSteps
DtUsedInt timeSteps
Definition:
config.h:97
varin::strike
double strike
Definition:
config.h:93
varin::requiredSamples
DtUsedInt requiredSamples
Definition:
config.h:96
varin::optionType
DtUsedInt optionType
Definition:
config.h:94
varin::timeLength
double timeLength
Definition:
config.h:92
intToFloatUnion
Definition:
config.h:102
intToFloatUnion::f
double f
Definition:
config.h:103
intToFloatUnion::i
DtUsedInt i
Definition:
config.h:104
repos_for_Dox
cFp_Zoo
HOST
quantitative_finance
mceuropeanengine
languages
cplusplus
include
config.h
Generated on Sat Jul 15 2023 05:03:00 for cloudFPGA (cF) API by
1.9.1