77class DistributedDirectSolverRuntime
81 typedef typename Backend::value_type value_type;
85 template <
class Matrix>
87 : s(prm.get(
"type", eDistributedDirectSolverType::skyline_lu))
89 if (!prm.erase(
"type"))
90 ARCCORE_ALINA_PARAM_MISSING(
"type");
93 case eDistributedDirectSolverType::skyline_lu: {
94 handle =
static_cast<void*
>(
new SkylineSolverType(comm, A, prm));
101 static size_t coarse_enough()
106 template <
class Vec1,
class Vec2>
107 void operator()(
const Vec1& rhs, Vec2& x)
const
110 case eDistributedDirectSolverType::skyline_lu: {
111 static_cast<const SkylineSolverType*
>(handle)->
operator()(rhs, x);
118 ~DistributedDirectSolverRuntime()
121 case eDistributedDirectSolverType::skyline_lu: {
122 delete static_cast<SkylineSolverType*
>(handle);
131 eDistributedDirectSolverType type()
const {
return s; }
135 eDistributedDirectSolverType s;
136 void* handle =
nullptr;
138 template <
class S,
class V,
class Matrix>
139 typename std::enable_if<std::is_same<V, float>::value || std::is_same<V, double>::value,
void>::type
142 handle =
static_cast<void*
>(
new S(comm, A, prm));
145 template <
class S,
class V,
class Matrix>
146 typename std::enable_if<!std::is_same<V, float>::value && !std::is_same<V, double>::value,
void>::type
149 throw std::logic_error(
"The direct solver does not support the value type");
152 template <
class S,
class V,
class Vec1,
class Vec2>
153 typename std::enable_if<std::is_same<V, float>::value || std::is_same<V, double>::value,
void>::type
154 do_solve(
const Vec1& rhs, Vec2& x)
const
156 static_cast<const S*
>(handle)->
operator()(rhs, x);
159 template <
class S,
class V,
class Vec1,
class Vec2>
160 typename std::enable_if<!std::is_same<V, float>::value && !std::is_same<V, double>::value,
void>::type
161 do_solve(
const Vec1&, Vec2&)
const
163 throw std::logic_error(
"The direct solver does not support the value type");
166 template <
class S,
class V>
167 typename std::enable_if<std::is_same<V, float>::value || std::is_same<V, double>::value,
void>::type
170 delete static_cast<S*
>(handle);
173 template <
class S,
class V>
174 typename std::enable_if<!std::is_same<V, float>::value && !std::is_same<V, double>::value,
void>::type