-
Notifications
You must be signed in to change notification settings - Fork 7
/
euro_opt.h
60 lines (45 loc) · 1.75 KB
/
euro_opt.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
/*
* Copyright (C) 2014-2015, 2018 Intel Corporation
*
* SPDX-License-Identifier: MIT
*/
#ifndef __EURO_OPT_BENCH_H
#define __EURO_OPT_BENCH_H
#ifdef __DO_FLOAT__
typedef float tfloat;
#else
typedef double tfloat;
#endif
#define ALIGN_FACTOR 64
#define SEED 7777777
#define S0L 10.0f
#define S0H 50.0f
#define XL 10.0f
#define XH 50.0f
#define TL 1.0f
#define TH 2.0f
#define RISK_FREE 0.1f
#define VOLATILITY 0.2f
void InitData( int nopt, tfloat* *s0, tfloat* *x, tfloat* *t,
tfloat* *vcall_compiler, tfloat* *vput_compiler,
tfloat* *vcall_mkl, tfloat* *vput_mkl
);
void FreeData( tfloat *s0, tfloat *x, tfloat *t,
tfloat *vcall_compiler, tfloat *vput_compiler,
tfloat *vcall_mkl, tfloat *vput_mkl
);
void BlackScholesNaive( int nopt, tfloat r, tfloat sig, const tfloat so[],
const tfloat x[], const tfloat t[], tfloat vcall[], tfloat vput[] );
void BlackScholesFormula_Compiler( int nopt,
tfloat r, tfloat sig, tfloat * restrict s0, tfloat * restrict x,
tfloat * restrict t, tfloat * restrict vcall, tfloat * restrict vput );
void BlackScholesFormula_MKL( int nopt,
tfloat r, tfloat sig, tfloat * restrict s0, tfloat * restrict x,
tfloat * restrict t, tfloat * restrict vcall, tfloat * restrict vput );
void BlackScholesFormula_CND_TBB( int nopt,
tfloat r, tfloat sig, tfloat * restrict s0, tfloat * restrict x,
tfloat * restrict t, tfloat * restrict vcall, tfloat * restrict vput );
void BlackScholesFormula_CND( int nopt,
tfloat r, tfloat sig, tfloat * restrict s0, tfloat * restrict x,
tfloat * restrict t, tfloat * restrict vcall, tfloat * restrict vput );
#endif // #ifndef __EURO_OPT_BENCH_H