-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathcfdcore_manager.h
61 lines (53 loc) · 1.35 KB
/
cfdcore_manager.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
// Copyright 2019 CryptoGarage
/**
* @file cfdcore_manager.h
*
* @brief Definition of CfdCoreManager class
*
*/
#ifndef CFD_CORE_SRC_CFDCORE_MANAGER_H_
#define CFD_CORE_SRC_CFDCORE_MANAGER_H_
#include <memory>
#include <mutex> // NOLINT
#include <vector>
#include "cfdcore/cfdcore_common.h"
namespace cfd {
namespace core {
/**
* @brief cfdcore manaement class
*/
class CfdCoreManager {
public:
/**
* @brief Construct.
*/
CfdCoreManager();
/**
* @brief Destructor.
*/
virtual ~CfdCoreManager();
/**
* @brief Initialization of cfd core
* @param[out] handle_address cfdcore handle value.
*/
void Initialize(CfdCoreHandle* handle_address);
/**
* @brief Finalize cfdcore
* @param[in] handle cfdcire handle value
* @param[in] is_finish_process boolean check if process is finished
*/
void Finalize(const CfdCoreHandle handle, bool is_finish_process);
/**
* @brief get values of supported LibraryFunction
* @return LibraryFunction bitflag.
*/
uint64_t GetSupportedFunction();
protected:
std::vector<int*> handle_list_; ///< Handle list
bool initialized_; ///< Initalized flag
bool finalized_; ///< Finalized flag
std::mutex mutex_; ///< Exclusive control object
};
} // namespace core
} // namespace cfd
#endif // CFD_CORE_SRC_CFDCORE_MANAGER_H_