14 template<
typename AFIELD,
typename AFIELD2>
16 =
"APrecond_Mixedprec";
18 template<
typename AFIELD,
typename AFIELD2>
23 int nin = m_solver->get_fopr()->field_nin();
24 int nvol = m_solver->get_fopr()->field_nvol();
25 int nex = m_solver->get_fopr()->field_nex();
27 m_v2.reset(nin, nvol, nex);
28 m_w2.reset(nin, nvol, nex);
32 m_field_type = LEXICAL;
33 }
else if (nvol == Nvol / 2) {
34 m_field_type = EVEN_ODD;
36 vout.
crucial(
"%s: unsupported field_type.\n", class_name.c_str());
45 template<
typename AFIELD,
typename AFIELD2>
54 template<
typename AFIELD,
typename AFIELD2>
62 assert(m_v2.check_size(nin, nvol, nex));
63 assert(m_w2.check_size(nin, nvol, nex));
70 if (m_field_type == LEXICAL) {
73 convert(index_f, m_w2, index_d, w);
74 }
else if (m_field_type == EVEN_ODD) {
79 vout.
crucial(
"%s: unsupported field_type.\n", class_name.c_str());
85 m_solver->solve(m_v2, m_w2, nconv, diff);
90 m_accum_flop += m_solver->flop_count();
94 class_name.c_str(), nconv, diff);
96 if (m_field_type == LEXICAL) {
99 convert(index_d, v, index_f, m_v2);
100 }
else if (m_field_type == EVEN_ODD) {
111 template<
typename AFIELD,
typename AFIELD2>
122 template<
typename AFIELD,
typename AFIELD2>