/home/runner/work/kynema/kynema/kynema/src/solver/linear_solver/dss_handle_mkl.hpp Source File

Kynema API: /home/runner/work/kynema/kynema/kynema/src/solver/linear_solver/dss_handle_mkl.hpp Source File
Kynema API
A flexible multibody structural dynamics code for wind turbines
Loading...
Searching...
No Matches
dss_handle_mkl.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include <vector>
5
6#include <mkl_dss.h>
7
8#include "dss_algorithm.hpp"
9
10namespace kynema::dss {
11
12template <>
14 struct mklDssHandleType {
15 _MKL_DSS_HANDLE_t handle{};
16 std::vector<MKL_INT> perm;
17
18 mklDssHandleType() {
19 constexpr MKL_INT opt = MKL_DSS_ZERO_BASED_INDEXING;
20 dss_create(handle, opt);
21 }
22
23 mklDssHandleType(mklDssHandleType&) = delete;
24 void operator=(mklDssHandleType&) = delete;
25 mklDssHandleType(mklDssHandleType&&) = delete;
26 void operator=(mklDssHandleType&&) = delete;
27
28 ~mklDssHandleType() {
29 constexpr MKL_INT opt = 0;
30 dss_delete(handle, opt);
31 }
32 };
33 std::shared_ptr<mklDssHandleType> mkl_dss_handle;
34
35public:
36 Handle() : mkl_dss_handle(std::make_shared<mklDssHandleType>()) {}
37
38 _MKL_DSS_HANDLE_t& get_handle() { return mkl_dss_handle->handle; }
39
40 std::vector<MKL_INT>& get_perm() { return mkl_dss_handle->perm; }
41};
42} // namespace kynema::dss
_MKL_DSS_HANDLE_t & get_handle()
Definition dss_handle_mkl.hpp:38
std::vector< MKL_INT > & get_perm()
Definition dss_handle_mkl.hpp:40
Handle()
Definition dss_handle_mkl.hpp:36
Definition dss_handle.hpp:10
Definition dss_algorithm.hpp:4
Algorithm
Definition dss_algorithm.hpp:6