Skip to content

Commit ba0dc69

Browse files
authored
Update black_scholes.hpp
1 parent 450b26b commit ba0dc69

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

Libraries/oneMKL/black_scholes/src/black_scholes.hpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
#define MINOR 6
1616
/******* VERSION *******/
1717

18-
#ifndef DATA_TYPE
19-
#define DATA_TYPE double
20-
#endif
18+
// #ifndef DATA_TYPE
19+
// #define DATA_TYPE double
20+
// #endif
2121

2222
#ifndef VERBOSE
2323
#define VERBOSE 1
@@ -47,6 +47,7 @@ constexpr size_t opt_n =
4747
#define __VERSION__ __clang_major__
4848
#endif
4949

50+
template<typename DATA_TYPE>
5051
class BlackScholes {
5152
public:
5253
BlackScholes();
@@ -80,7 +81,8 @@ void BlackScholesRefImpl(
8081
call_result = (S * N_d1 - L * std::exp(-r * t) * N_d2);
8182
}
8283

83-
void BlackScholes::check()
84+
template<typename DATA_TYPE>
85+
void BlackScholes<DATA_TYPE>::check()
8486
{
8587
if (VERBOSE) {
8688
std::printf("Creating the reference result...\n");

0 commit comments

Comments
 (0)