diff --git a/benchmark/utils/formats.hpp b/benchmark/utils/formats.hpp index 13f2cee1056..58b66e06f14 100644 --- a/benchmark/utils/formats.hpp +++ b/benchmark/utils/formats.hpp @@ -129,7 +129,7 @@ using hybrid = gko::matrix::Hybrid; using csr = gko::matrix::Csr; using coo = gko::matrix::Coo; using ell = gko::matrix::Ell; -using ell_mixed = gko::matrix::Ell, itype>; +using ell_mixed = gko::matrix::Ell, itype>; /** @@ -274,7 +274,7 @@ std::unique_ptr matrix_factory( check_ell_admissibility(data); } if (format == "ell_mixed") { - gko::matrix_data, itype> conv_data; + gko::matrix_data, itype> conv_data; conv_data.size = data.size; conv_data.nonzeros.resize(data.nonzeros.size()); auto it = conv_data.nonzeros.begin(); @@ -284,8 +284,8 @@ std::unique_ptr matrix_factory( it->value = el.value; ++it; } - gko::as, itype>>( - mat.get()) + gko::as, + itype>>(mat.get()) ->read(conv_data); } else { gko::as>(mat.get())->read( diff --git a/core/base/batch_multi_vector.cpp b/core/base/batch_multi_vector.cpp index 1eb3cd8f60d..4cd6b81d5bb 100644 --- a/core/base/batch_multi_vector.cpp +++ b/core/base/batch_multi_vector.cpp @@ -281,7 +281,7 @@ void MultiVector::compute_norm2( template void MultiVector::convert_to( - MultiVector>* result) const + MultiVector>* result) const { result->values_ = this->values_; result->set_size(this->get_size()); @@ -290,7 +290,7 @@ void MultiVector::convert_to( template void MultiVector::move_to( - MultiVector>* result) + MultiVector>* result) { this->convert_to(result); } @@ -299,8 +299,7 @@ void MultiVector::move_to( #if GINKGO_ENABLE_HALF template void MultiVector::convert_to( - MultiVector>>* - result) const + MultiVector>>* result) const { result->values_ = this->values_; result->set_size(this->get_size()); @@ -309,8 +308,7 @@ void MultiVector::convert_to( template void MultiVector::move_to( - MultiVector>>* - result) + MultiVector>>* result) { this->convert_to(result); } diff --git a/core/distributed/matrix.cpp b/core/distributed/matrix.cpp index 442771c66b5..191c3cc0add 100644 --- a/core/distributed/matrix.cpp +++ b/core/distributed/matrix.cpp @@ -203,8 +203,8 @@ Matrix::create( template void Matrix::convert_to( - Matrix, local_index_type, global_index_type>* - result) const + Matrix, local_index_type, + global_index_type>* result) const { GKO_ASSERT(this->get_communicator().size() == result->get_communicator().size()); @@ -222,8 +222,8 @@ void Matrix::convert_to( template void Matrix::move_to( - Matrix, local_index_type, global_index_type>* - result) + Matrix, local_index_type, + global_index_type>* result) { GKO_ASSERT(this->get_communicator().size() == result->get_communicator().size()); diff --git a/core/distributed/vector.cpp b/core/distributed/vector.cpp index ae7ab182a85..0f2aeda7b5e 100644 --- a/core/distributed/vector.cpp +++ b/core/distributed/vector.cpp @@ -283,7 +283,7 @@ void Vector::fill(const ValueType value) template void Vector::convert_to( - Vector>* result) const + Vector>* result) const { GKO_ASSERT(this->get_communicator().size() == result->get_communicator().size()); @@ -293,7 +293,7 @@ void Vector::convert_to( template -void Vector::move_to(Vector>* result) +void Vector::move_to(Vector>* result) { this->convert_to(result); } diff --git a/core/matrix/batch_csr.cpp b/core/matrix/batch_csr.cpp index 141c5b86d02..3abd1856ce2 100644 --- a/core/matrix/batch_csr.cpp +++ b/core/matrix/batch_csr.cpp @@ -246,7 +246,7 @@ void Csr::add_scaled_identity( template void Csr::convert_to( - Csr, IndexType>* result) const + Csr, IndexType>* result) const { result->values_ = this->values_; result->col_idxs_ = this->col_idxs_; @@ -257,7 +257,7 @@ void Csr::convert_to( template void Csr::move_to( - Csr, IndexType>* result) + Csr, IndexType>* result) { this->convert_to(result); } @@ -266,8 +266,7 @@ void Csr::move_to( #if GINKGO_ENABLE_HALF template void Csr::convert_to( - Csr>, - IndexType>* result) const + Csr>, IndexType>* result) const { result->values_ = this->values_; result->col_idxs_ = this->col_idxs_; @@ -278,8 +277,7 @@ void Csr::convert_to( template void Csr::move_to( - Csr>, - IndexType>* result) + Csr>, IndexType>* result) { this->convert_to(result); } diff --git a/core/matrix/batch_dense.cpp b/core/matrix/batch_dense.cpp index 0c1838abb56..c256dad59cc 100644 --- a/core/matrix/batch_dense.cpp +++ b/core/matrix/batch_dense.cpp @@ -245,7 +245,7 @@ void Dense::add_scaled_identity( template void Dense::convert_to( - Dense>* result) const + Dense>* result) const { result->values_ = this->values_; result->set_size(this->get_size()); @@ -253,8 +253,7 @@ void Dense::convert_to( template -void Dense::move_to( - Dense>* result) +void Dense::move_to(Dense>* result) { this->convert_to(result); } @@ -263,8 +262,7 @@ void Dense::move_to( #if GINKGO_ENABLE_HALF template void Dense::convert_to( - Dense>>* - result) const + Dense>>* result) const { result->values_ = this->values_; result->set_size(this->get_size()); @@ -273,8 +271,7 @@ void Dense::convert_to( template void Dense::move_to( - Dense>>* - result) + Dense>>* result) { this->convert_to(result); } diff --git a/core/matrix/batch_ell.cpp b/core/matrix/batch_ell.cpp index 3b829d3ba4c..7d18cc1e0ea 100644 --- a/core/matrix/batch_ell.cpp +++ b/core/matrix/batch_ell.cpp @@ -266,7 +266,7 @@ void Ell::add_scaled_identity( template void Ell::convert_to( - Ell, IndexType>* result) const + Ell, IndexType>* result) const { result->values_ = this->values_; result->col_idxs_ = this->col_idxs_; @@ -277,7 +277,7 @@ void Ell::convert_to( template void Ell::move_to( - Ell, IndexType>* result) + Ell, IndexType>* result) { this->convert_to(result); } @@ -286,8 +286,7 @@ void Ell::move_to( #if GINKGO_ENABLE_HALF template void Ell::convert_to( - Ell>, - IndexType>* result) const + Ell>, IndexType>* result) const { result->values_ = this->values_; result->col_idxs_ = this->col_idxs_; @@ -298,8 +297,7 @@ void Ell::convert_to( template void Ell::move_to( - Ell>, - IndexType>* result) + Ell>, IndexType>* result) { this->convert_to(result); } diff --git a/core/matrix/coo.cpp b/core/matrix/coo.cpp index 7b3b3876295..38894bdb447 100644 --- a/core/matrix/coo.cpp +++ b/core/matrix/coo.cpp @@ -214,7 +214,7 @@ void Coo::apply2_impl(const LinOp* alpha, const LinOp* b, template void Coo::convert_to( - Coo, IndexType>* result) const + Coo, IndexType>* result) const { result->values_ = this->values_; result->row_idxs_ = this->row_idxs_; @@ -225,7 +225,7 @@ void Coo::convert_to( template void Coo::move_to( - Coo, IndexType>* result) + Coo, IndexType>* result) { this->convert_to(result); } @@ -234,8 +234,7 @@ void Coo::move_to( #if GINKGO_ENABLE_HALF template void Coo::convert_to( - Coo>, - IndexType>* result) const + Coo>, IndexType>* result) const { result->values_ = this->values_; result->row_idxs_ = this->row_idxs_; @@ -246,8 +245,7 @@ void Coo::convert_to( template void Coo::move_to( - Coo>, - IndexType>* result) + Coo>, IndexType>* result) { this->convert_to(result); } diff --git a/core/matrix/csr.cpp b/core/matrix/csr.cpp index 1bb3e778478..4097fbed1a0 100644 --- a/core/matrix/csr.cpp +++ b/core/matrix/csr.cpp @@ -304,7 +304,7 @@ void Csr::apply_impl(const LinOp* alpha, const LinOp* b, template void Csr::convert_to( - Csr, IndexType>* result) const + Csr, IndexType>* result) const { result->values_ = this->values_; result->col_idxs_ = this->col_idxs_; @@ -316,7 +316,7 @@ void Csr::convert_to( template void Csr::move_to( - Csr, IndexType>* result) + Csr, IndexType>* result) { this->convert_to(result); } @@ -324,8 +324,7 @@ void Csr::move_to( #if GINKGO_ENABLE_HALF template void Csr::convert_to( - Csr>, - IndexType>* result) const + Csr>, IndexType>* result) const { result->values_ = this->values_; result->col_idxs_ = this->col_idxs_; @@ -337,8 +336,7 @@ void Csr::convert_to( template void Csr::move_to( - Csr>, - IndexType>* result) + Csr>, IndexType>* result) { this->convert_to(result); } diff --git a/core/matrix/dense.cpp b/core/matrix/dense.cpp index 071e689232e..1fd20a1db3d 100644 --- a/core/matrix/dense.cpp +++ b/core/matrix/dense.cpp @@ -582,7 +582,7 @@ Dense::Dense(Dense&& other) : Dense(other.get_executor()) template void Dense::convert_to( - Dense>* result) const + Dense>* result) const { if (result->get_size() != this->get_size()) { result->set_size(this->get_size()); @@ -597,8 +597,7 @@ void Dense::convert_to( template -void Dense::move_to( - Dense>* result) +void Dense::move_to(Dense>* result) { this->convert_to(result); } @@ -607,8 +606,7 @@ void Dense::move_to( #if GINKGO_ENABLE_HALF template void Dense::convert_to( - Dense>>* - result) const + Dense>>* result) const { if (result->get_size() != this->get_size()) { result->set_size(this->get_size()); @@ -624,8 +622,7 @@ void Dense::convert_to( template void Dense::move_to( - Dense>>* - result) + Dense>>* result) { this->convert_to(result); } @@ -1548,8 +1545,8 @@ template void gather_mixed_real_complex(Function fn, LinOp* out) { #ifdef GINKGO_MIXED_PRECISION - run, - next_precision_with_half>>(out, fn); + run, + next_precision>>(out, fn); #else precision_dispatch(fn, out); #endif diff --git a/core/matrix/diagonal.cpp b/core/matrix/diagonal.cpp index 85c5739b529..6a0c4edc1b5 100644 --- a/core/matrix/diagonal.cpp +++ b/core/matrix/diagonal.cpp @@ -149,7 +149,7 @@ std::unique_ptr Diagonal::conj_transpose() const template void Diagonal::convert_to( - Diagonal>* result) const + Diagonal>* result) const { result->values_ = this->values_; result->set_size(this->get_size()); @@ -157,8 +157,7 @@ void Diagonal::convert_to( template -void Diagonal::move_to( - Diagonal>* result) +void Diagonal::move_to(Diagonal>* result) { this->convert_to(result); } @@ -167,8 +166,7 @@ void Diagonal::move_to( #if GINKGO_ENABLE_HALF template void Diagonal::convert_to( - Diagonal>>* - result) const + Diagonal>>* result) const { result->values_ = this->values_; result->set_size(this->get_size()); @@ -177,8 +175,7 @@ void Diagonal::convert_to( template void Diagonal::move_to( - Diagonal>>* - result) + Diagonal>>* result) { this->convert_to(result); } diff --git a/core/matrix/ell.cpp b/core/matrix/ell.cpp index eafd9fa9cad..98fbfc94c7d 100644 --- a/core/matrix/ell.cpp +++ b/core/matrix/ell.cpp @@ -154,7 +154,7 @@ void Ell::apply_impl(const LinOp* alpha, const LinOp* b, template void Ell::convert_to( - Ell, IndexType>* result) const + Ell, IndexType>* result) const { result->values_ = this->values_; result->col_idxs_ = this->col_idxs_; @@ -166,7 +166,7 @@ void Ell::convert_to( template void Ell::move_to( - Ell, IndexType>* result) + Ell, IndexType>* result) { this->convert_to(result); } @@ -175,8 +175,7 @@ void Ell::move_to( #if GINKGO_ENABLE_HALF template void Ell::convert_to( - Ell>, - IndexType>* result) const + Ell>, IndexType>* result) const { result->values_ = this->values_; result->col_idxs_ = this->col_idxs_; @@ -188,8 +187,7 @@ void Ell::convert_to( template void Ell::move_to( - Ell>, - IndexType>* result) + Ell>, IndexType>* result) { this->convert_to(result); } diff --git a/core/matrix/fbcsr.cpp b/core/matrix/fbcsr.cpp index f1612be10e0..b9e8c6b00b6 100644 --- a/core/matrix/fbcsr.cpp +++ b/core/matrix/fbcsr.cpp @@ -145,7 +145,7 @@ void Fbcsr::apply_impl(const LinOp* alpha, const LinOp* b, template void Fbcsr::convert_to( - Fbcsr, IndexType>* const result) const + Fbcsr, IndexType>* const result) const { result->values_ = this->values_; result->col_idxs_ = this->col_idxs_; @@ -158,7 +158,7 @@ void Fbcsr::convert_to( template void Fbcsr::move_to( - Fbcsr, IndexType>* const result) + Fbcsr, IndexType>* const result) { this->convert_to(result); } @@ -167,8 +167,8 @@ void Fbcsr::move_to( #if GINKGO_ENABLE_HALF template void Fbcsr::convert_to( - Fbcsr>, - IndexType>* const result) const + Fbcsr>, IndexType>* const result) + const { result->values_ = this->values_; result->col_idxs_ = this->col_idxs_; @@ -181,8 +181,7 @@ void Fbcsr::convert_to( template void Fbcsr::move_to( - Fbcsr>, - IndexType>* const result) + Fbcsr>, IndexType>* const result) { this->convert_to(result); } diff --git a/core/matrix/hybrid.cpp b/core/matrix/hybrid.cpp index 72137558a10..95a95b3a619 100644 --- a/core/matrix/hybrid.cpp +++ b/core/matrix/hybrid.cpp @@ -203,7 +203,7 @@ void Hybrid::apply_impl(const LinOp* alpha, template void Hybrid::convert_to( - Hybrid, IndexType>* result) const + Hybrid, IndexType>* result) const { this->ell_->convert_to(result->ell_); this->coo_->convert_to(result->coo_); @@ -216,7 +216,7 @@ void Hybrid::convert_to( template void Hybrid::move_to( - Hybrid, IndexType>* result) + Hybrid, IndexType>* result) { this->convert_to(result); } @@ -225,8 +225,7 @@ void Hybrid::move_to( #if GINKGO_ENABLE_HALF template void Hybrid::convert_to( - Hybrid>, - IndexType>* result) const + Hybrid>, IndexType>* result) const { this->ell_->convert_to(result->ell_.get()); this->coo_->convert_to(result->coo_.get()); @@ -239,8 +238,7 @@ void Hybrid::convert_to( template void Hybrid::move_to( - Hybrid>, - IndexType>* result) + Hybrid>, IndexType>* result) { this->convert_to(result); } diff --git a/core/matrix/sellp.cpp b/core/matrix/sellp.cpp index bd81b08bada..3422d249b40 100644 --- a/core/matrix/sellp.cpp +++ b/core/matrix/sellp.cpp @@ -176,7 +176,7 @@ void Sellp::apply_impl(const LinOp* alpha, const LinOp* b, template void Sellp::convert_to( - Sellp, IndexType>* result) const + Sellp, IndexType>* result) const { result->values_ = this->values_; result->col_idxs_ = this->col_idxs_; @@ -190,7 +190,7 @@ void Sellp::convert_to( template void Sellp::move_to( - Sellp, IndexType>* result) + Sellp, IndexType>* result) { this->convert_to(result); } @@ -199,8 +199,7 @@ void Sellp::move_to( #if GINKGO_ENABLE_HALF template void Sellp::convert_to( - Sellp>, - IndexType>* result) const + Sellp>, IndexType>* result) const { result->values_ = this->values_; result->col_idxs_ = this->col_idxs_; @@ -214,8 +213,7 @@ void Sellp::convert_to( template void Sellp::move_to( - Sellp>, - IndexType>* result) + Sellp>, IndexType>* result) { this->convert_to(result); } diff --git a/core/preconditioner/jacobi.cpp b/core/preconditioner/jacobi.cpp index 3f773710ceb..556fb9bc0df 100644 --- a/core/preconditioner/jacobi.cpp +++ b/core/preconditioner/jacobi.cpp @@ -328,11 +328,12 @@ void Jacobi::generate(const LinOp* system_matrix, if (parameters_.max_block_size == 1) { auto diag = share(as(system_matrix) ->extract_diagonal_linop()); - auto diag_vt = ::gko::detail:: - temporary_conversion>::template create< - matrix::Diagonal>, - matrix::Diagonal>>>(diag.get()); + auto diag_vt = + ::gko::detail::temporary_conversion>:: + template create>, + matrix::Diagonal>>>( + diag.get()); if (!diag_vt) { GKO_NOT_SUPPORTED(system_matrix); } diff --git a/include/ginkgo/core/base/batch_multi_vector.hpp b/include/ginkgo/core/base/batch_multi_vector.hpp index bd641f057a1..be47c8a3ee8 100644 --- a/include/ginkgo/core/base/batch_multi_vector.hpp +++ b/include/ginkgo/core/base/batch_multi_vector.hpp @@ -53,21 +53,19 @@ class MultiVector : public EnablePolymorphicObject>, public EnablePolymorphicAssignment>, #if GINKGO_ENABLE_HALF - public ConvertibleTo>>>, + public ConvertibleTo< + MultiVector>>>, #endif - public ConvertibleTo>> { + public ConvertibleTo>> { friend class EnablePolymorphicObject; friend class MultiVector>; - friend class MultiVector>; + friend class MultiVector>; public: using EnablePolymorphicAssignment::convert_to; using EnablePolymorphicAssignment::move_to; - using ConvertibleTo< - MultiVector>>::convert_to; - using ConvertibleTo< - MultiVector>>::move_to; + using ConvertibleTo>>::convert_to; + using ConvertibleTo>>::move_to; using value_type = ValueType; using index_type = int32; @@ -84,27 +82,23 @@ class MultiVector static std::unique_ptr create_with_config_of( ptr_param other); - void convert_to(MultiVector>* result) - const override; + void convert_to( + MultiVector>* result) const override; - void move_to( - MultiVector>* result) override; + void move_to(MultiVector>* result) override; #if GINKGO_ENABLE_HALF - friend class MultiVector< - previous_precision_with_half>>; - using ConvertibleTo>>>::convert_to; - using ConvertibleTo>>>::move_to; + friend class MultiVector>>; + using ConvertibleTo< + MultiVector>>>::convert_to; + using ConvertibleTo< + MultiVector>>>::move_to; - void convert_to( - MultiVector< - next_precision_with_half>>* - result) const override; + void convert_to(MultiVector>>* + result) const override; - void move_to(MultiVector>>* result) override; + void move_to(MultiVector>>* result) + override; #endif /** diff --git a/include/ginkgo/core/base/math.hpp b/include/ginkgo/core/base/math.hpp index e308b092ea6..8f063d8c2fe 100644 --- a/include/ginkgo/core/base/math.hpp +++ b/include/ginkgo/core/base/math.hpp @@ -293,46 +293,46 @@ namespace detail { // singly linked list of all our supported precisions template -struct next_precision_impl {}; +struct next_precision_base_impl {}; template <> -struct next_precision_impl { +struct next_precision_base_impl { using type = double; }; template <> -struct next_precision_impl { +struct next_precision_base_impl { using type = float; }; template -struct next_precision_impl> { - using type = std::complex::type>; +struct next_precision_base_impl> { + using type = std::complex::type>; }; template -struct next_precision_with_half_impl {}; +struct next_precision_impl {}; template <> -struct next_precision_with_half_impl { +struct next_precision_impl { using type = float; }; template <> -struct next_precision_with_half_impl { +struct next_precision_impl { using type = double; }; template <> -struct next_precision_with_half_impl { +struct next_precision_impl { using type = gko::half; }; template -struct next_precision_with_half_impl> { - using type = std::complex::type>; +struct next_precision_impl> { + using type = std::complex::type>; }; @@ -418,7 +418,7 @@ struct highest_precision_variadic { * Obtains the next type in the singly-linked precision list. */ template -using next_precision = typename detail::next_precision_impl::type; +using next_precision_base = typename detail::next_precision_base_impl::type; /** @@ -428,26 +428,24 @@ using next_precision = typename detail::next_precision_impl::type; * next_precision. */ template -using previous_precision = next_precision; +using previous_precision_base = next_precision_base; /** * Obtains the next type in the singly-linked precision list with half. */ #if GINKGO_ENABLE_HALF template -using next_precision_with_half = - typename detail::next_precision_with_half_impl::type; +using next_precision = typename detail::next_precision_impl::type; template -using previous_precision_with_half = - next_precision_with_half>; +using previous_precision = next_precision>; #else // fallback to float/double list template -using next_precision_with_half = next_precision; +using next_precision = next_precision_base; template -using previous_precision_with_half = previous_precision; +using previous_precision = previous_precision_base; #endif diff --git a/include/ginkgo/core/base/precision_dispatch.hpp b/include/ginkgo/core/base/precision_dispatch.hpp index 4adc02763f0..29aa4bfcab1 100644 --- a/include/ginkgo/core/base/precision_dispatch.hpp +++ b/include/ginkgo/core/base/precision_dispatch.hpp @@ -19,9 +19,9 @@ namespace gko { /** * Convert the given LinOp from matrix::Dense<...> to matrix::Dense. * The conversion tries to convert the input LinOp to all Dense types with value - * type recursively reachable by next_precision<...> starting from the ValueType - * template parameter. This means that all real-to-real and complex-to-complex - * conversions for default precisions are being considered. + * type recursively reachable by next_precision_base<...> starting from the + * ValueType template parameter. This means that all real-to-real and + * complex-to-complex conversions for default precisions are being considered. * If the input matrix is non-const, the contents of the modified converted * object will be converted back to the input matrix when the returned object is * destroyed. This may lead to a loss of precision! @@ -48,9 +48,9 @@ make_temporary_conversion(Ptr&& matrix) { using Pointee = detail::pointee; using Dense = matrix::Dense; - using NextDense = matrix::Dense>; - using NextNextDense = matrix::Dense< - next_precision_with_half>>; + using NextDense = matrix::Dense>; + using NextNextDense = + matrix::Dense>>; using MaybeConstDense = std::conditional_t::value, const Dense, Dense>; auto result = detail::temporary_conversion< @@ -201,7 +201,7 @@ void precision_dispatch_real_complex(Function fn, const LinOp* alpha, * If GINKGO_MIXED_PRECISION is defined, this means that the function will be * called with its dynamic type as a static type, so the (templated/generic) * function will be instantiated with all pairs of Dense and - * Dense> parameter types, and the appropriate + * Dense> parameter types, and the appropriate * overload will be called based on the dynamic type of the parameter. * * If GINKGO_MIXED_PRECISION is not defined, it will behave exactly like @@ -228,9 +228,8 @@ void mixed_precision_dispatch(Function fn, const LinOp* in, LinOp* out) { #ifdef GINKGO_MIXED_PRECISION using fst_type = matrix::Dense; - using snd_type = matrix::Dense>; - using trd_type = matrix::Dense< - next_precision_with_half>>; + using snd_type = matrix::Dense>; + using trd_type = matrix::Dense>>; auto dispatch_out_vector = [&](auto dense_in) { if (auto dense_out = dynamic_cast(out)) { fn(dense_in, dense_out); @@ -314,7 +313,7 @@ namespace distributed { * Convert the given LinOp from experimental::distributed::Vector<...> to * experimental::distributed::Vector. The conversion tries to convert * the input LinOp to all Dense types with value type recursively reachable by - * next_precision<...> starting from the ValueType template parameter. This + * next_precision_base<...> starting from the ValueType template parameter. This * means that all real-to-real and complex-to-complex conversions for default * precisions are being considered. If the input matrix is non-const, the * contents of the modified converted object will be converted back to the input @@ -341,7 +340,7 @@ gko::detail::temporary_conversion> make_temporary_conversion( { auto result = gko::detail::temporary_conversion>::template create< - Vector>>(matrix); + Vector>>(matrix); if (!result) { GKO_NOT_SUPPORTED(matrix); } @@ -357,7 +356,7 @@ gko::detail::temporary_conversion> make_temporary_conversion(const LinOp* matrix) { auto result = gko::detail::temporary_conversion>:: - template create>>(matrix); + template create>>(matrix); if (!result) { GKO_NOT_SUPPORTED(matrix); } diff --git a/include/ginkgo/core/distributed/matrix.hpp b/include/ginkgo/core/distributed/matrix.hpp index 2f2f470a4ed..1bb7f2315fd 100644 --- a/include/ginkgo/core/distributed/matrix.hpp +++ b/include/ginkgo/core/distributed/matrix.hpp @@ -257,14 +257,13 @@ class Vector; */ template -class Matrix - : public EnableDistributedLinOp< - Matrix>, - public ConvertibleTo< - Matrix, LocalIndexType, GlobalIndexType>>, - public DistributedBase { +class Matrix : public EnableDistributedLinOp< + Matrix>, + public ConvertibleTo, + LocalIndexType, GlobalIndexType>>, + public DistributedBase { friend class EnableDistributedPolymorphicObject; - friend class Matrix, LocalIndexType, + friend class Matrix, LocalIndexType, GlobalIndexType>; friend class multigrid::Pgm; @@ -279,15 +278,15 @@ class Matrix using EnableDistributedLinOp::convert_to; using EnableDistributedLinOp::move_to; - using ConvertibleTo, LocalIndexType, + using ConvertibleTo, LocalIndexType, GlobalIndexType>>::convert_to; - using ConvertibleTo, LocalIndexType, + using ConvertibleTo, LocalIndexType, GlobalIndexType>>::move_to; - void convert_to(Matrix, local_index_type, + void convert_to(Matrix, local_index_type, global_index_type>* result) const override; - void move_to(Matrix, local_index_type, + void move_to(Matrix, local_index_type, global_index_type>* result) override; /** diff --git a/include/ginkgo/core/distributed/vector.hpp b/include/ginkgo/core/distributed/vector.hpp index 17b8d0f944b..a3dd460bd43 100644 --- a/include/ginkgo/core/distributed/vector.hpp +++ b/include/ginkgo/core/distributed/vector.hpp @@ -66,20 +66,20 @@ class Partition; template class Vector : public EnableDistributedLinOp>, - public ConvertibleTo>>, + public ConvertibleTo>>, public EnableAbsoluteComputation>>, public DistributedBase { friend class EnableDistributedPolymorphicObject; friend class Vector>; friend class Vector>; - friend class Vector>; + friend class Vector>; friend class detail::VectorCache; public: using EnableDistributedLinOp::convert_to; using EnableDistributedLinOp::move_to; - using ConvertibleTo>>::convert_to; - using ConvertibleTo>>::move_to; + using ConvertibleTo>>::convert_to; + using ConvertibleTo>>::move_to; using value_type = ValueType; using absolute_type = remove_complex; @@ -168,9 +168,10 @@ class Vector void read_distributed(const matrix_data& data, ptr_param> partition); - void convert_to(Vector>* result) const override; + void convert_to( + Vector>* result) const override; - void move_to(Vector>* result) override; + void move_to(Vector>* result) override; std::unique_ptr compute_absolute() const override; @@ -672,7 +673,7 @@ template struct conversion_target_helper> { using target_type = experimental::distributed::Vector; using source_type = - experimental::distributed::Vector>; + experimental::distributed::Vector>; static std::unique_ptr create_empty(const source_type* source) { diff --git a/include/ginkgo/core/matrix/batch_csr.hpp b/include/ginkgo/core/matrix/batch_csr.hpp index 49eb5e4d7cd..766ad1facb1 100644 --- a/include/ginkgo/core/matrix/batch_csr.hpp +++ b/include/ginkgo/core/matrix/batch_csr.hpp @@ -48,14 +48,12 @@ class Csr final : public EnableBatchLinOp>, #if GINKGO_ENABLE_HALF public ConvertibleTo< - Csr>, - IndexType>>, + Csr>, IndexType>>, #endif - public ConvertibleTo< - Csr, IndexType>> { + public ConvertibleTo, IndexType>> { friend class EnablePolymorphicObject; friend class Csr, IndexType>; - friend class Csr, IndexType>; + friend class Csr, IndexType>; static_assert(std::is_same::value, "IndexType must be a 32 bit integer"); @@ -69,30 +67,24 @@ class Csr final using absolute_type = remove_complex; using complex_type = to_complex; - void convert_to(Csr, IndexType>* result) - const override; + void convert_to( + Csr, IndexType>* result) const override; - void move_to( - Csr, IndexType>* result) override; + void move_to(Csr, IndexType>* result) override; #if GINKGO_ENABLE_HALF - friend class Csr< - previous_precision_with_half>, - IndexType>; + friend class Csr>, + IndexType>; using ConvertibleTo< - Csr>, - IndexType>>::convert_to; + Csr>, IndexType>>::convert_to; using ConvertibleTo< - Csr>, - IndexType>>::move_to; + Csr>, IndexType>>::move_to; - void convert_to( - Csr>, - IndexType>* result) const override; + void convert_to(Csr>, IndexType>* + result) const override; - void move_to( - Csr>, - IndexType>* result) override; + void move_to(Csr>, IndexType>* + result) override; #endif /** diff --git a/include/ginkgo/core/matrix/batch_dense.hpp b/include/ginkgo/core/matrix/batch_dense.hpp index c1340e482f4..ad4db6d0a84 100644 --- a/include/ginkgo/core/matrix/batch_dense.hpp +++ b/include/ginkgo/core/matrix/batch_dense.hpp @@ -48,13 +48,12 @@ template class Dense final : public EnableBatchLinOp>, #if GINKGO_ENABLE_HALF - public ConvertibleTo< - Dense>>>, + public ConvertibleTo>>>, #endif - public ConvertibleTo>> { + public ConvertibleTo>> { friend class EnablePolymorphicObject; friend class Dense>; - friend class Dense>; + friend class Dense>; public: using EnableBatchLinOp::convert_to; @@ -67,26 +66,22 @@ class Dense final using absolute_type = remove_complex; using complex_type = to_complex; - void convert_to( - Dense>* result) const override; + void convert_to(Dense>* result) const override; - void move_to(Dense>* result) override; + void move_to(Dense>* result) override; #if GINKGO_ENABLE_HALF - friend class Dense< - previous_precision_with_half>>; - using ConvertibleTo>>>::convert_to; - using ConvertibleTo>>>::move_to; + friend class Dense>>; + using ConvertibleTo< + Dense>>>::convert_to; + using ConvertibleTo< + Dense>>>::move_to; - void convert_to( - Dense>>* - result) const override; + void convert_to(Dense>>* result) + const override; void move_to( - Dense>>* - result) override; + Dense>>* result) override; #endif /** diff --git a/include/ginkgo/core/matrix/batch_ell.hpp b/include/ginkgo/core/matrix/batch_ell.hpp index 872b8ce2db9..c52da8f8f9d 100644 --- a/include/ginkgo/core/matrix/batch_ell.hpp +++ b/include/ginkgo/core/matrix/batch_ell.hpp @@ -53,14 +53,12 @@ class Ell final : public EnableBatchLinOp>, #if GINKGO_ENABLE_HALF public ConvertibleTo< - Ell>, - IndexType>>, + Ell>, IndexType>>, #endif - public ConvertibleTo< - Ell, IndexType>> { + public ConvertibleTo, IndexType>> { friend class EnablePolymorphicObject; friend class Ell, IndexType>; - friend class Ell, IndexType>; + friend class Ell, IndexType>; static_assert(std::is_same::value, "IndexType must be a 32 bit integer"); @@ -74,30 +72,24 @@ class Ell final using absolute_type = remove_complex; using complex_type = to_complex; - void convert_to(Ell, IndexType>* result) - const override; + void convert_to( + Ell, IndexType>* result) const override; - void move_to( - Ell, IndexType>* result) override; + void move_to(Ell, IndexType>* result) override; #if GINKGO_ENABLE_HALF - friend class Ell< - previous_precision_with_half>, - IndexType>; + friend class Ell>, + IndexType>; using ConvertibleTo< - Ell>, - IndexType>>::convert_to; + Ell>, IndexType>>::convert_to; using ConvertibleTo< - Ell>, - IndexType>>::move_to; + Ell>, IndexType>>::move_to; - void convert_to( - Ell>, - IndexType>* result) const override; + void convert_to(Ell>, IndexType>* + result) const override; - void move_to( - Ell>, - IndexType>* result) override; + void move_to(Ell>, IndexType>* + result) override; #endif /** diff --git a/include/ginkgo/core/matrix/coo.hpp b/include/ginkgo/core/matrix/coo.hpp index a0edf5aa862..89e94568f0f 100644 --- a/include/ginkgo/core/matrix/coo.hpp +++ b/include/ginkgo/core/matrix/coo.hpp @@ -47,21 +47,19 @@ class Hybrid; * @ingroup LinOp */ template -class Coo - : public EnableLinOp>, - public ConvertibleTo, IndexType>>, +class Coo : public EnableLinOp>, + public ConvertibleTo, IndexType>>, #if GINKGO_ENABLE_HALF - public ConvertibleTo< - Coo>, - IndexType>>, + public ConvertibleTo< + Coo>, IndexType>>, #endif - public ConvertibleTo>, - public ConvertibleTo>, - public DiagonalExtractable, - public ReadableFromMatrixData, - public WritableToMatrixData, - public EnableAbsoluteComputation< - remove_complex>> { + public ConvertibleTo>, + public ConvertibleTo>, + public DiagonalExtractable, + public ReadableFromMatrixData, + public WritableToMatrixData, + public EnableAbsoluteComputation< + remove_complex>> { friend class EnablePolymorphicObject; friend class Csr; friend class Dense; @@ -72,10 +70,8 @@ class Coo public: using EnableLinOp::convert_to; using EnableLinOp::move_to; - using ConvertibleTo< - Coo, IndexType>>::convert_to; - using ConvertibleTo< - Coo, IndexType>>::move_to; + using ConvertibleTo, IndexType>>::convert_to; + using ConvertibleTo, IndexType>>::move_to; using ConvertibleTo>::convert_to; using ConvertibleTo>::move_to; using ConvertibleTo>::convert_to; @@ -88,32 +84,26 @@ class Coo using device_mat_data = device_matrix_data; using absolute_type = remove_complex; - friend class Coo, IndexType>; + friend class Coo, IndexType>; - void convert_to(Coo, IndexType>* result) - const override; + void convert_to( + Coo, IndexType>* result) const override; - void move_to( - Coo, IndexType>* result) override; + void move_to(Coo, IndexType>* result) override; #if GINKGO_ENABLE_HALF - friend class Coo< - previous_precision_with_half>, - IndexType>; + friend class Coo>, + IndexType>; using ConvertibleTo< - Coo>, - IndexType>>::convert_to; + Coo>, IndexType>>::convert_to; using ConvertibleTo< - Coo>, - IndexType>>::move_to; + Coo>, IndexType>>::move_to; - void convert_to( - Coo>, - IndexType>* result) const override; + void convert_to(Coo>, IndexType>* + result) const override; - void move_to( - Coo>, - IndexType>* result) override; + void move_to(Coo>, IndexType>* + result) override; #endif void convert_to(Csr* other) const override; diff --git a/include/ginkgo/core/matrix/csr.hpp b/include/ginkgo/core/matrix/csr.hpp index 2f66683085f..9c620f10ded 100644 --- a/include/ginkgo/core/matrix/csr.hpp +++ b/include/ginkgo/core/matrix/csr.hpp @@ -98,29 +98,27 @@ void strategy_rebuild_helper(Csr* result); * @ingroup LinOp */ template -class Csr - : public EnableLinOp>, - public ConvertibleTo, IndexType>>, +class Csr : public EnableLinOp>, + public ConvertibleTo, IndexType>>, #if GINKGO_ENABLE_HALF - public ConvertibleTo< - Csr>, - IndexType>>, + public ConvertibleTo< + Csr>, IndexType>>, #endif - public ConvertibleTo>, - public ConvertibleTo>, - public ConvertibleTo>, - public ConvertibleTo>, - public ConvertibleTo>, - public ConvertibleTo>, - public ConvertibleTo>, - public DiagonalExtractable, - public ReadableFromMatrixData, - public WritableToMatrixData, - public Transposable, - public Permutable, - public EnableAbsoluteComputation< - remove_complex>>, - public ScaledIdentityAddable { + public ConvertibleTo>, + public ConvertibleTo>, + public ConvertibleTo>, + public ConvertibleTo>, + public ConvertibleTo>, + public ConvertibleTo>, + public ConvertibleTo>, + public DiagonalExtractable, + public ReadableFromMatrixData, + public WritableToMatrixData, + public Transposable, + public Permutable, + public EnableAbsoluteComputation< + remove_complex>>, + public ScaledIdentityAddable { friend class EnablePolymorphicObject; friend class Coo; friend class Dense; @@ -136,10 +134,8 @@ class Csr public: using EnableLinOp::convert_to; using EnableLinOp::move_to; - using ConvertibleTo< - Csr, IndexType>>::convert_to; - using ConvertibleTo< - Csr, IndexType>>::move_to; + using ConvertibleTo, IndexType>>::convert_to; + using ConvertibleTo, IndexType>>::move_to; using ConvertibleTo>::convert_to; using ConvertibleTo>::move_to; using ConvertibleTo>::convert_to; @@ -696,32 +692,26 @@ class Csr index_type max_length_per_row_; }; - friend class Csr, IndexType>; + friend class Csr, IndexType>; - void convert_to(Csr, IndexType>* result) - const override; + void convert_to( + Csr, IndexType>* result) const override; - void move_to( - Csr, IndexType>* result) override; + void move_to(Csr, IndexType>* result) override; #if GINKGO_ENABLE_HALF - friend class Csr< - previous_precision_with_half>, - IndexType>; + friend class Csr>, + IndexType>; using ConvertibleTo< - Csr>, - IndexType>>::convert_to; + Csr>, IndexType>>::convert_to; using ConvertibleTo< - Csr>, - IndexType>>::move_to; + Csr>, IndexType>>::move_to; - void convert_to( - Csr>, - IndexType>* result) const override; + void convert_to(Csr>, IndexType>* + result) const override; - void move_to( - Csr>, - IndexType>* result) override; + void move_to(Csr>, IndexType>* + result) override; #endif void convert_to(Dense* other) const override; diff --git a/include/ginkgo/core/matrix/dense.hpp b/include/ginkgo/core/matrix/dense.hpp index 9ae96ca46d6..9e19109e82a 100644 --- a/include/ginkgo/core/matrix/dense.hpp +++ b/include/ginkgo/core/matrix/dense.hpp @@ -87,10 +87,9 @@ class SparsityCsr; template class Dense : public EnableLinOp>, - public ConvertibleTo>>, + public ConvertibleTo>>, #if GINKGO_ENABLE_HALF - public ConvertibleTo< - Dense>>>, + public ConvertibleTo>>>, #endif public ConvertibleTo>, public ConvertibleTo>, @@ -139,8 +138,8 @@ class Dense public: using EnableLinOp::convert_to; using EnableLinOp::move_to; - using ConvertibleTo>>::convert_to; - using ConvertibleTo>>::move_to; + using ConvertibleTo>>::convert_to; + using ConvertibleTo>>::move_to; using ConvertibleTo>::convert_to; using ConvertibleTo>::move_to; using ConvertibleTo>::convert_to; @@ -280,28 +279,24 @@ class Dense return other->create_const_view_of_impl(); } - friend class Dense>; + friend class Dense>; - void convert_to( - Dense>* result) const override; + void convert_to(Dense>* result) const override; - void move_to(Dense>* result) override; + void move_to(Dense>* result) override; #if GINKGO_ENABLE_HALF - friend class Dense< - previous_precision_with_half>>; - using ConvertibleTo>>>::convert_to; - using ConvertibleTo>>>::move_to; + friend class Dense>>; + using ConvertibleTo< + Dense>>>::convert_to; + using ConvertibleTo< + Dense>>>::move_to; - void convert_to( - Dense>>* - result) const override; + void convert_to(Dense>>* result) + const override; void move_to( - Dense>>* - result) override; + Dense>>* result) override; #endif void convert_to(Coo* result) const override; diff --git a/include/ginkgo/core/matrix/diagonal.hpp b/include/ginkgo/core/matrix/diagonal.hpp index 3b11399138b..03a485f3ff3 100644 --- a/include/ginkgo/core/matrix/diagonal.hpp +++ b/include/ginkgo/core/matrix/diagonal.hpp @@ -41,10 +41,9 @@ class Diagonal : public EnableLinOp>, public ConvertibleTo>, public ConvertibleTo>, - public ConvertibleTo>>, + public ConvertibleTo>>, #if GINKGO_ENABLE_HALF - public ConvertibleTo>>>, + public ConvertibleTo>>>, #endif public Transposable, public WritableToMatrixData, @@ -64,9 +63,8 @@ class Diagonal using ConvertibleTo>::move_to; using ConvertibleTo>::convert_to; using ConvertibleTo>::move_to; - using ConvertibleTo< - Diagonal>>::convert_to; - using ConvertibleTo>>::move_to; + using ConvertibleTo>>::convert_to; + using ConvertibleTo>>::move_to; using value_type = ValueType; using index_type = int64; @@ -76,33 +74,28 @@ class Diagonal using device_mat_data32 = device_matrix_data; using absolute_type = remove_complex; - friend class Diagonal>; + friend class Diagonal>; std::unique_ptr transpose() const override; std::unique_ptr conj_transpose() const override; - void convert_to( - Diagonal>* result) const override; + void convert_to(Diagonal>* result) const override; - void move_to( - Diagonal>* result) override; + void move_to(Diagonal>* result) override; #if GINKGO_ENABLE_HALF - friend class Diagonal< - previous_precision_with_half>>; - using ConvertibleTo>>>::convert_to; - using ConvertibleTo>>>::move_to; + friend class Diagonal>>; + using ConvertibleTo< + Diagonal>>>::convert_to; + using ConvertibleTo< + Diagonal>>>::move_to; - void convert_to( - Diagonal>>* - result) const override; + void convert_to(Diagonal>>* result) + const override; void move_to( - Diagonal>>* - result) override; + Diagonal>>* result) override; #endif void convert_to(Csr* result) const override; diff --git a/include/ginkgo/core/matrix/ell.hpp b/include/ginkgo/core/matrix/ell.hpp index adbd3505855..8a1512e3f51 100644 --- a/include/ginkgo/core/matrix/ell.hpp +++ b/include/ginkgo/core/matrix/ell.hpp @@ -49,36 +49,32 @@ class Hybrid; * @ingroup LinOp */ template -class Ell - : public EnableLinOp>, - public ConvertibleTo, IndexType>>, +class Ell : public EnableLinOp>, + public ConvertibleTo, IndexType>>, #if GINKGO_ENABLE_HALF - public ConvertibleTo< - Ell>, - IndexType>>, + public ConvertibleTo< + Ell>, IndexType>>, #endif - public ConvertibleTo>, - public ConvertibleTo>, - public DiagonalExtractable, - public ReadableFromMatrixData, - public WritableToMatrixData, - public EnableAbsoluteComputation< - remove_complex>> { + public ConvertibleTo>, + public ConvertibleTo>, + public DiagonalExtractable, + public ReadableFromMatrixData, + public WritableToMatrixData, + public EnableAbsoluteComputation< + remove_complex>> { friend class EnablePolymorphicObject; friend class Dense; friend class Coo; friend class Csr; friend class Ell, IndexType>; - friend class Ell, IndexType>; + friend class Ell, IndexType>; friend class Hybrid; public: using EnableLinOp::convert_to; using EnableLinOp::move_to; - using ConvertibleTo< - Ell, IndexType>>::convert_to; - using ConvertibleTo< - Ell, IndexType>>::move_to; + using ConvertibleTo, IndexType>>::convert_to; + using ConvertibleTo, IndexType>>::move_to; using ConvertibleTo>::convert_to; using ConvertibleTo>::move_to; using ConvertibleTo>::convert_to; @@ -91,30 +87,24 @@ class Ell using device_mat_data = device_matrix_data; using absolute_type = remove_complex; - void convert_to(Ell, IndexType>* result) - const override; + void convert_to( + Ell, IndexType>* result) const override; - void move_to( - Ell, IndexType>* result) override; + void move_to(Ell, IndexType>* result) override; #if GINKGO_ENABLE_HALF - friend class Ell< - previous_precision_with_half>, - IndexType>; + friend class Ell>, + IndexType>; using ConvertibleTo< - Ell>, - IndexType>>::convert_to; + Ell>, IndexType>>::convert_to; using ConvertibleTo< - Ell>, - IndexType>>::move_to; + Ell>, IndexType>>::move_to; - void convert_to( - Ell>, - IndexType>* result) const override; + void convert_to(Ell>, IndexType>* + result) const override; - void move_to( - Ell>, - IndexType>* result) override; + void move_to(Ell>, IndexType>* + result) override; #endif void convert_to(Dense* other) const override; diff --git a/include/ginkgo/core/matrix/fbcsr.hpp b/include/ginkgo/core/matrix/fbcsr.hpp index 283807b242c..ae11dec6843 100644 --- a/include/ginkgo/core/matrix/fbcsr.hpp +++ b/include/ginkgo/core/matrix/fbcsr.hpp @@ -96,24 +96,21 @@ inline IndexType get_num_blocks(const int block_size, const IndexType size) * @ingroup LinOp */ template -class Fbcsr - : public EnableLinOp>, - public ConvertibleTo< - Fbcsr, IndexType>>, +class Fbcsr : public EnableLinOp>, + public ConvertibleTo, IndexType>>, #if GINKGO_ENABLE_HALF - public ConvertibleTo< - Fbcsr>, - IndexType>>, + public ConvertibleTo< + Fbcsr>, IndexType>>, #endif - public ConvertibleTo>, - public ConvertibleTo>, - public ConvertibleTo>, - public DiagonalExtractable, - public ReadableFromMatrixData, - public WritableToMatrixData, - public Transposable, - public EnableAbsoluteComputation< - remove_complex>> { + public ConvertibleTo>, + public ConvertibleTo>, + public ConvertibleTo>, + public DiagonalExtractable, + public ReadableFromMatrixData, + public WritableToMatrixData, + public Transposable, + public EnableAbsoluteComputation< + remove_complex>> { friend class EnablePolymorphicObject; friend class Csr; friend class Dense; @@ -143,9 +140,8 @@ class Fbcsr using EnableLinOp>::convert_to; using ConvertibleTo< - Fbcsr, IndexType>>::convert_to; - using ConvertibleTo< - Fbcsr, IndexType>>::move_to; + Fbcsr, IndexType>>::convert_to; + using ConvertibleTo, IndexType>>::move_to; using ConvertibleTo>::convert_to; using ConvertibleTo>::move_to; using ConvertibleTo>::convert_to; @@ -153,32 +149,26 @@ class Fbcsr using ConvertibleTo>::convert_to; using ConvertibleTo>::move_to; - friend class Fbcsr, IndexType>; + friend class Fbcsr, IndexType>; - void convert_to(Fbcsr, IndexType>* - result) const override; + void convert_to( + Fbcsr, IndexType>* result) const override; - void move_to( - Fbcsr, IndexType>* result) override; + void move_to(Fbcsr, IndexType>* result) override; #if GINKGO_ENABLE_HALF - friend class Fbcsr< - previous_precision_with_half>, - IndexType>; + friend class Fbcsr>, + IndexType>; + using ConvertibleTo>, + IndexType>>::convert_to; using ConvertibleTo< - Fbcsr>, - IndexType>>::convert_to; - using ConvertibleTo< - Fbcsr>, - IndexType>>::move_to; + Fbcsr>, IndexType>>::move_to; - void convert_to( - Fbcsr>, - IndexType>* result) const override; + void convert_to(Fbcsr>, IndexType>* + result) const override; - void move_to( - Fbcsr>, - IndexType>* result) override; + void move_to(Fbcsr>, IndexType>* + result) override; #endif void convert_to(Dense* other) const override; diff --git a/include/ginkgo/core/matrix/hybrid.hpp b/include/ginkgo/core/matrix/hybrid.hpp index 24cb3ed26c7..8432e856319 100644 --- a/include/ginkgo/core/matrix/hybrid.hpp +++ b/include/ginkgo/core/matrix/hybrid.hpp @@ -41,12 +41,10 @@ class Csr; template class Hybrid : public EnableLinOp>, - public ConvertibleTo< - Hybrid, IndexType>>, + public ConvertibleTo, IndexType>>, #if GINKGO_ENABLE_HALF public ConvertibleTo< - Hybrid>, - IndexType>>, + Hybrid>, IndexType>>, #endif public ConvertibleTo>, public ConvertibleTo>, @@ -65,9 +63,8 @@ class Hybrid using EnableLinOp::convert_to; using EnableLinOp::move_to; using ConvertibleTo< - Hybrid, IndexType>>::convert_to; - using ConvertibleTo< - Hybrid, IndexType>>::move_to; + Hybrid, IndexType>>::convert_to; + using ConvertibleTo, IndexType>>::move_to; using ConvertibleTo>::convert_to; using ConvertibleTo>::move_to; using ConvertibleTo>::convert_to; @@ -362,32 +359,26 @@ class Hybrid imbalance_bounded_limit strategy_; }; - friend class Hybrid, IndexType>; + friend class Hybrid, IndexType>; - void convert_to(Hybrid, IndexType>* - result) const override; + void convert_to( + Hybrid, IndexType>* result) const override; - void move_to(Hybrid, IndexType>* result) - override; + void move_to(Hybrid, IndexType>* result) override; #if GINKGO_ENABLE_HALF - friend class Hybrid< - previous_precision_with_half>, - IndexType>; + friend class Hybrid>, + IndexType>; + using ConvertibleTo>, + IndexType>>::convert_to; using ConvertibleTo< - Hybrid>, - IndexType>>::convert_to; - using ConvertibleTo< - Hybrid>, - IndexType>>::move_to; + Hybrid>, IndexType>>::move_to; - void convert_to( - Hybrid>, - IndexType>* result) const override; + void convert_to(Hybrid>, + IndexType>* result) const override; - void move_to( - Hybrid>, - IndexType>* result) override; + void move_to(Hybrid>, IndexType>* + result) override; #endif void convert_to(Dense* other) const override; diff --git a/include/ginkgo/core/matrix/sellp.hpp b/include/ginkgo/core/matrix/sellp.hpp index 6140a832c85..529df8e9f25 100644 --- a/include/ginkgo/core/matrix/sellp.hpp +++ b/include/ginkgo/core/matrix/sellp.hpp @@ -40,22 +40,19 @@ class Csr; * @ingroup LinOp */ template -class Sellp - : public EnableLinOp>, - public ConvertibleTo< - Sellp, IndexType>>, +class Sellp : public EnableLinOp>, + public ConvertibleTo, IndexType>>, #if GINKGO_ENABLE_HALF - public ConvertibleTo< - Sellp>, - IndexType>>, + public ConvertibleTo< + Sellp>, IndexType>>, #endif - public ConvertibleTo>, - public ConvertibleTo>, - public DiagonalExtractable, - public ReadableFromMatrixData, - public WritableToMatrixData, - public EnableAbsoluteComputation< - remove_complex>> { + public ConvertibleTo>, + public ConvertibleTo>, + public DiagonalExtractable, + public ReadableFromMatrixData, + public WritableToMatrixData, + public EnableAbsoluteComputation< + remove_complex>> { friend class EnablePolymorphicObject; friend class Dense; friend class Csr; @@ -65,9 +62,8 @@ class Sellp using EnableLinOp::convert_to; using EnableLinOp::move_to; using ConvertibleTo< - Sellp, IndexType>>::convert_to; - using ConvertibleTo< - Sellp, IndexType>>::move_to; + Sellp, IndexType>>::convert_to; + using ConvertibleTo, IndexType>>::move_to; using ConvertibleTo>::convert_to; using ConvertibleTo>::move_to; using ConvertibleTo>::convert_to; @@ -80,32 +76,26 @@ class Sellp using device_mat_data = device_matrix_data; using absolute_type = remove_complex; - friend class Sellp, IndexType>; + friend class Sellp, IndexType>; - void convert_to(Sellp, IndexType>* - result) const override; + void convert_to( + Sellp, IndexType>* result) const override; - void move_to( - Sellp, IndexType>* result) override; + void move_to(Sellp, IndexType>* result) override; #if GINKGO_ENABLE_HALF - friend class Sellp< - previous_precision_with_half>, - IndexType>; + friend class Sellp>, + IndexType>; + using ConvertibleTo>, + IndexType>>::convert_to; using ConvertibleTo< - Sellp>, - IndexType>>::convert_to; - using ConvertibleTo< - Sellp>, - IndexType>>::move_to; + Sellp>, IndexType>>::move_to; - void convert_to( - Sellp>, - IndexType>* result) const override; + void convert_to(Sellp>, IndexType>* + result) const override; - void move_to( - Sellp>, - IndexType>* result) override; + void move_to(Sellp>, IndexType>* + result) override; #endif void convert_to(Dense* other) const override; diff --git a/reference/test/base/batch_multi_vector_kernels.cpp b/reference/test/base/batch_multi_vector_kernels.cpp index a860c3c4b24..7ef9b77601d 100644 --- a/reference/test/base/batch_multi_vector_kernels.cpp +++ b/reference/test/base/batch_multi_vector_kernels.cpp @@ -343,7 +343,7 @@ TYPED_TEST(MultiVector, ConvertsToPrecision) { using MultiVector = typename TestFixture::Mtx; using T = typename TestFixture::value_type; - using OtherT = typename gko::next_precision_with_half; + using OtherT = typename gko::next_precision; using OtherMultiVector = typename gko::batch::MultiVector; auto tmp = OtherMultiVector::create(this->exec); auto res = MultiVector::create(this->exec); @@ -367,7 +367,7 @@ TYPED_TEST(MultiVector, MovesToPrecision) { using MultiVector = typename TestFixture::Mtx; using T = typename TestFixture::value_type; - using OtherT = typename gko::next_precision_with_half; + using OtherT = typename gko::next_precision; using OtherMultiVector = typename gko::batch::MultiVector; auto tmp = OtherMultiVector::create(this->exec); auto res = MultiVector::create(this->exec); @@ -391,7 +391,7 @@ TYPED_TEST(MultiVector, ConvertsEmptyToPrecision) { using MultiVector = typename TestFixture::Mtx; using T = typename TestFixture::value_type; - using OtherT = typename gko::next_precision_with_half; + using OtherT = typename gko::next_precision; using OtherMultiVector = typename gko::batch::MultiVector; auto empty = OtherMultiVector::create(this->exec); auto res = MultiVector::create(this->exec); @@ -406,7 +406,7 @@ TYPED_TEST(MultiVector, MovesEmptyToPrecision) { using MultiVector = typename TestFixture::Mtx; using T = typename TestFixture::value_type; - using OtherT = typename gko::next_precision_with_half; + using OtherT = typename gko::next_precision; using OtherMultiVector = typename gko::batch::MultiVector; auto empty = OtherMultiVector::create(this->exec); auto res = MultiVector::create(this->exec); diff --git a/reference/test/base/combination.cpp b/reference/test/base/combination.cpp index 149aaa33256..cfb5abcdba0 100644 --- a/reference/test/base/combination.cpp +++ b/reference/test/base/combination.cpp @@ -115,7 +115,7 @@ TYPED_TEST(Combination, AppliesToMixedVector) cmb = [ 8 7 ] [ 5 4 ] */ - using value_type = gko::next_precision_with_half; + using value_type = gko::next_precision; using Mtx = gko::matrix::Dense; auto cmb = gko::Combination::create( this->coefficients[0], this->operators[0], this->coefficients[1], @@ -157,8 +157,7 @@ TYPED_TEST(Combination, AppliesToMixedComplexVector) cmb = [ 8 7 ] [ 5 4 ] */ - using value_type = - gko::to_complex>; + using value_type = gko::to_complex>; using Mtx = gko::matrix::Dense; auto cmb = gko::Combination::create( this->coefficients[0], this->operators[0], this->coefficients[1], @@ -202,7 +201,7 @@ TYPED_TEST(Combination, AppliesLinearCombinationToMixedVector) cmb = [ 8 7 ] [ 5 4 ] */ - using value_type = gko::next_precision_with_half; + using value_type = gko::next_precision; using Mtx = gko::matrix::Dense; auto cmb = gko::Combination::create( this->coefficients[0], this->operators[0], this->coefficients[1], @@ -250,8 +249,7 @@ TYPED_TEST(Combination, AppliesLinearCombinationToMixedComplexVector) cmb = [ 8 7 ] [ 5 4 ] */ - using MixedDense = - gko::matrix::Dense>; + using MixedDense = gko::matrix::Dense>; using MixedDenseComplex = gko::to_complex; using value_type = typename MixedDenseComplex::value_type; auto cmb = gko::Combination::create( diff --git a/reference/test/base/composition.cpp b/reference/test/base/composition.cpp index d17b8602ce8..9767fab466c 100644 --- a/reference/test/base/composition.cpp +++ b/reference/test/base/composition.cpp @@ -143,7 +143,7 @@ TYPED_TEST(Composition, AppliesSingleToMixedVector) cmp = [ -9 -2 ] [ 27 26 ] */ - using Mtx = gko::matrix::Dense>; + using Mtx = gko::matrix::Dense>; using value_type = typename Mtx::value_type; auto cmp = gko::Composition::create(this->product); auto x = gko::initialize({1.0, 2.0}, this->exec); @@ -183,8 +183,7 @@ TYPED_TEST(Composition, AppliesSingleToMixedComplexVector) cmp = [ -9 -2 ] [ 27 26 ] */ - using value_type = - gko::next_precision_with_half>; + using value_type = gko::next_precision>; using Mtx = gko::matrix::Dense; auto cmp = gko::Composition::create(this->product); auto x = gko::initialize( @@ -224,7 +223,7 @@ TYPED_TEST(Composition, AppliesSingleLinearCombinationToMixedVector) cmp = [ -9 -2 ] [ 27 26 ] */ - using value_type = gko::next_precision_with_half; + using value_type = gko::next_precision; using Mtx = gko::matrix::Dense; auto cmp = gko::Composition::create(this->product); auto alpha = gko::initialize({3.0}, this->exec); @@ -269,8 +268,7 @@ TYPED_TEST(Composition, AppliesSingleLinearCombinationToMixedComplexVector) cmp = [ -9 -2 ] [ 27 26 ] */ - using MixedDense = - gko::matrix::Dense>; + using MixedDense = gko::matrix::Dense>; using MixedDenseComplex = gko::to_complex; using value_type = typename MixedDenseComplex::value_type; auto cmp = gko::Composition::create(this->product); diff --git a/reference/test/base/perturbation.cpp b/reference/test/base/perturbation.cpp index 50a5fe7db20..1563f22e175 100644 --- a/reference/test/base/perturbation.cpp +++ b/reference/test/base/perturbation.cpp @@ -102,7 +102,7 @@ TYPED_TEST(Perturbation, AppliesToMixedVector) cmp = I + 2 * [ 2 ] * [ 3 2 ] [ 1 ] */ - using Mtx = gko::matrix::Dense>; + using Mtx = gko::matrix::Dense>; using value_type = typename Mtx::value_type; auto cmp = gko::Perturbation::create(this->scalar, this->basis, this->projector); @@ -144,8 +144,7 @@ TYPED_TEST(Perturbation, AppliesToMixedComplexVector) cmp = I + 2 * [ 2 ] * [ 3 2 ] [ 1 ] */ - using value_type = - gko::to_complex>; + using value_type = gko::to_complex>; using Mtx = gko::matrix::Dense; auto cmp = gko::Perturbation::create(this->scalar, this->basis, this->projector); @@ -187,7 +186,7 @@ TYPED_TEST(Perturbation, AppliesLinearCombinationToMixedVector) cmp = I + 2 * [ 2 ] * [ 3 2 ] [ 1 ] */ - using value_type = gko::next_precision_with_half; + using value_type = gko::next_precision; using Mtx = gko::matrix::Dense; auto cmp = gko::Perturbation::create(this->scalar, this->basis, this->projector); @@ -234,8 +233,7 @@ TYPED_TEST(Perturbation, AppliesLinearCombinationToMixedComplexVector) cmp = I + 2 * [ 2 ] * [ 3 2 ] [ 1 ] */ - using MixedDense = - gko::matrix::Dense>; + using MixedDense = gko::matrix::Dense>; using MixedDenseComplex = gko::to_complex; using value_type = typename MixedDenseComplex::value_type; auto cmp = gko::Perturbation::create(this->scalar, this->basis, diff --git a/reference/test/matrix/coo_kernels.cpp b/reference/test/matrix/coo_kernels.cpp index 6ffea5d0e7d..b3f58ec3083 100644 --- a/reference/test/matrix/coo_kernels.cpp +++ b/reference/test/matrix/coo_kernels.cpp @@ -32,8 +32,7 @@ class Coo : public ::testing::Test { using Csr = gko::matrix::Csr; using Mtx = gko::matrix::Coo; using Vec = gko::matrix::Dense; - using MixedVec = - gko::matrix::Dense>; + using MixedVec = gko::matrix::Dense>; Coo() : exec(gko::ReferenceExecutor::create()), mtx(Mtx::create(exec)) { @@ -81,7 +80,7 @@ TYPED_TEST(Coo, ConvertsToPrecision) { using ValueType = typename TestFixture::value_type; using IndexType = typename TestFixture::index_type; - using OtherType = gko::next_precision_with_half; + using OtherType = gko::next_precision; using Coo = typename TestFixture::Mtx; using OtherCoo = gko::matrix::Coo; auto tmp = OtherCoo::create(this->exec); @@ -103,7 +102,7 @@ TYPED_TEST(Coo, MovesToPrecision) { using ValueType = typename TestFixture::value_type; using IndexType = typename TestFixture::index_type; - using OtherType = gko::next_precision_with_half; + using OtherType = gko::next_precision; using Coo = typename TestFixture::Mtx; using OtherCoo = gko::matrix::Coo; auto tmp = OtherCoo::create(this->exec); @@ -216,7 +215,7 @@ TYPED_TEST(Coo, ConvertsEmptyToPrecision) { using ValueType = typename TestFixture::value_type; using IndexType = typename TestFixture::index_type; - using OtherType = gko::next_precision_with_half; + using OtherType = gko::next_precision; using Coo = typename TestFixture::Mtx; using OtherCoo = gko::matrix::Coo; auto empty = OtherCoo::create(this->exec); @@ -233,7 +232,7 @@ TYPED_TEST(Coo, MovesEmptyToPrecision) { using ValueType = typename TestFixture::value_type; using IndexType = typename TestFixture::index_type; - using OtherType = gko::next_precision_with_half; + using OtherType = gko::next_precision; using Coo = typename TestFixture::Mtx; using OtherCoo = gko::matrix::Coo; auto empty = OtherCoo::create(this->exec); @@ -704,7 +703,7 @@ TYPED_TEST(Coo, AppliesToComplex) TYPED_TEST(Coo, AppliesToMixedComplex) { using mixed_value_type = - gko::next_precision_with_half; + gko::next_precision; using mixed_complex_type = gko::to_complex; using Vec = gko::matrix::Dense; auto exec = gko::ReferenceExecutor::create(); @@ -760,7 +759,7 @@ TYPED_TEST(Coo, AdvancedAppliesToComplex) TYPED_TEST(Coo, AdvancedAppliesToMixedComplex) { using mixed_value_type = - gko::next_precision_with_half; + gko::next_precision; using mixed_complex_type = gko::to_complex; using MixedDense = gko::matrix::Dense; using MixedDenseComplex = gko::matrix::Dense; @@ -818,7 +817,7 @@ TYPED_TEST(Coo, ApplyAddsToComplex) TYPED_TEST(Coo, ApplyAddsToMixedComplex) { using mixed_value_type = - gko::next_precision_with_half; + gko::next_precision; using mixed_complex_type = gko::to_complex; using MixedVec = gko::matrix::Dense; auto exec = gko::ReferenceExecutor::create(); @@ -875,7 +874,7 @@ TYPED_TEST(Coo, ApplyAddsScaledToComplex) TYPED_TEST(Coo, ApplyAddsScaledToMixedComplex) { using mixed_value_type = - gko::next_precision_with_half; + gko::next_precision; using mixed_complex_type = gko::to_complex; using MixedDense = gko::matrix::Dense; using MixedDenseComplex = gko::matrix::Dense; diff --git a/reference/test/matrix/csr_kernels.cpp b/reference/test/matrix/csr_kernels.cpp index b417eb93f52..61018563769 100644 --- a/reference/test/matrix/csr_kernels.cpp +++ b/reference/test/matrix/csr_kernels.cpp @@ -46,8 +46,7 @@ class Csr : public ::testing::Test { using Ell = gko::matrix::Ell; using Hybrid = gko::matrix::Hybrid; using Vec = gko::matrix::Dense; - using MixedVec = - gko::matrix::Dense>; + using MixedVec = gko::matrix::Dense>; using Perm = gko::matrix::Permutation; using ScaledPerm = gko::matrix::ScaledPermutation; @@ -370,7 +369,7 @@ TYPED_TEST(Csr, MixedAppliesToDenseVector1) { // Both vectors have the same value type which differs from the matrix using T = typename TestFixture::value_type; - using next_T = gko::next_precision_with_half; + using next_T = gko::next_precision; using Vec = typename gko::matrix::Dense; auto x = gko::initialize({2.0, 1.0, 4.0}, this->exec); auto y = Vec::create(this->exec, gko::dim<2>{2, 1}); @@ -385,7 +384,7 @@ TYPED_TEST(Csr, MixedAppliesToDenseVector2) { // Input vector has same value type as matrix using T = typename TestFixture::value_type; - using next_T = gko::next_precision_with_half; + using next_T = gko::next_precision; using Vec1 = typename TestFixture::Vec; using Vec2 = gko::matrix::Dense; auto x = gko::initialize({2.0, 1.0, 4.0}, this->exec); @@ -401,9 +400,9 @@ TYPED_TEST(Csr, MixedAppliesToDenseVector3) { // Output vector has same value type as matrix using T = typename TestFixture::value_type; - using next_T = gko::next_precision_with_half; + using next_T = gko::next_precision; using Vec1 = typename TestFixture::Vec; - using Vec2 = gko::matrix::Dense>; + using Vec2 = gko::matrix::Dense>; auto x = gko::initialize({2.0, 1.0, 4.0}, this->exec); auto y = Vec1::create(this->exec, gko::dim<2>{2, 1}); @@ -434,7 +433,7 @@ TYPED_TEST(Csr, MixedAppliesToDenseMatrix1) { // Both vectors have the same value type which differs from the matrix using T = typename TestFixture::value_type; - using next_T = gko::next_precision_with_half; + using next_T = gko::next_precision; using Vec = gko::matrix::Dense; // clang-format off auto x = gko::initialize( @@ -458,7 +457,7 @@ TYPED_TEST(Csr, MixedAppliesToDenseMatrix2) { // Input vector has same value type as matrix using T = typename TestFixture::value_type; - using next_T = gko::next_precision_with_half; + using next_T = gko::next_precision; using Vec1 = typename TestFixture::Vec; using Vec2 = gko::matrix::Dense; // clang-format off @@ -483,7 +482,7 @@ TYPED_TEST(Csr, MixedAppliesToDenseMatrix3) { // Output vector has same value type as matrix using T = typename TestFixture::value_type; - using next_T = gko::next_precision_with_half; + using next_T = gko::next_precision; using Vec1 = typename TestFixture::Vec; using Vec2 = gko::matrix::Dense; // clang-format off @@ -524,7 +523,7 @@ TYPED_TEST(Csr, MixedAppliesLinearCombinationToDenseVector1) { // Both vectors have the same value type which differs from the matrix using T = typename TestFixture::value_type; - using next_T = gko::next_precision_with_half; + using next_T = gko::next_precision; using Vec = gko::matrix::Dense; auto alpha = gko::initialize({-1.0}, this->exec); auto beta = gko::initialize({2.0}, this->exec); @@ -541,7 +540,7 @@ TYPED_TEST(Csr, MixedAppliesLinearCombinationToDenseVector2) { // Input vector has same value type as matrix using T = typename TestFixture::value_type; - using next_T = gko::next_precision_with_half; + using next_T = gko::next_precision; using Vec1 = typename TestFixture::Vec; using Vec2 = gko::matrix::Dense; auto alpha = gko::initialize({-1.0}, this->exec); @@ -559,7 +558,7 @@ TYPED_TEST(Csr, MixedAppliesLinearCombinationToDenseVector3) { // Output vector has same value type as matrix using T = typename TestFixture::value_type; - using next_T = gko::next_precision_with_half; + using next_T = gko::next_precision; using Vec1 = typename TestFixture::Vec; using Vec2 = gko::matrix::Dense; auto alpha = gko::initialize({-1.0}, this->exec); @@ -597,7 +596,7 @@ TYPED_TEST(Csr, MixedAppliesLinearCombinationToDenseMatrix1) { // Both vectors have the same value type which differs from the matrix using T = typename TestFixture::value_type; - using next_T = gko::next_precision_with_half; + using next_T = gko::next_precision; using Vec = gko::matrix::Dense; auto alpha = gko::initialize({-1.0}, this->exec); auto beta = gko::initialize({2.0}, this->exec); @@ -621,7 +620,7 @@ TYPED_TEST(Csr, MixedAppliesLinearCombinationToDenseMatrix2) { // Input vector has same value type as matrix using T = typename TestFixture::value_type; - using next_T = gko::next_precision_with_half; + using next_T = gko::next_precision; using Vec1 = typename TestFixture::Vec; using Vec2 = gko::matrix::Dense; auto alpha = gko::initialize({-1.0}, this->exec); @@ -641,7 +640,7 @@ TYPED_TEST(Csr, MixedAppliesLinearCombinationToDenseMatrix3) { // Output vector has same value type as matrix using T = typename TestFixture::value_type; - using next_T = gko::next_precision_with_half; + using next_T = gko::next_precision; using Vec1 = typename TestFixture::Vec; using Vec2 = gko::matrix::Dense; auto alpha = gko::initialize({-1.0}, this->exec); @@ -790,7 +789,7 @@ TYPED_TEST(Csr, ConvertsToPrecision) { using ValueType = typename TestFixture::value_type; using IndexType = typename TestFixture::index_type; - using OtherType = gko::next_precision_with_half; + using OtherType = gko::next_precision; using Csr = typename TestFixture::Mtx; using OtherCsr = gko::matrix::Csr; auto tmp = OtherCsr::create(this->exec); @@ -816,7 +815,7 @@ TYPED_TEST(Csr, MovesToPrecision) { using ValueType = typename TestFixture::value_type; using IndexType = typename TestFixture::index_type; - using OtherType = gko::next_precision_with_half; + using OtherType = gko::next_precision; using Csr = typename TestFixture::Mtx; using OtherCsr = gko::matrix::Csr; auto tmp = OtherCsr::create(this->exec); @@ -994,7 +993,7 @@ TYPED_TEST(Csr, ConvertsEmptyToPrecision) { using ValueType = typename TestFixture::value_type; using IndexType = typename TestFixture::index_type; - using OtherType = gko::next_precision_with_half; + using OtherType = gko::next_precision; using Csr = typename TestFixture::Mtx; using OtherCsr = gko::matrix::Csr; auto empty = OtherCsr::create(this->exec); @@ -1013,7 +1012,7 @@ TYPED_TEST(Csr, MovesEmptyToPrecision) { using ValueType = typename TestFixture::value_type; using IndexType = typename TestFixture::index_type; - using OtherType = gko::next_precision_with_half; + using OtherType = gko::next_precision; using Csr = typename TestFixture::Mtx; using OtherCsr = gko::matrix::Csr; auto empty = OtherCsr::create(this->exec); @@ -2050,7 +2049,7 @@ TYPED_TEST(Csr, AppliesToComplex) TYPED_TEST(Csr, AppliesToMixedComplex) { using mixed_value_type = - gko::next_precision_with_half; + gko::next_precision; using mixed_complex_type = gko::to_complex; using Vec = gko::matrix::Dense; auto exec = gko::ReferenceExecutor::create(); @@ -2106,7 +2105,7 @@ TYPED_TEST(Csr, AdvancedAppliesToComplex) TYPED_TEST(Csr, AdvancedAppliesToMixedComplex) { using mixed_value_type = - gko::next_precision_with_half; + gko::next_precision; using mixed_complex_type = gko::to_complex; using MixedDense = gko::matrix::Dense; using MixedDenseComplex = gko::matrix::Dense; diff --git a/reference/test/matrix/dense_kernels.cpp b/reference/test/matrix/dense_kernels.cpp index 3854cd56dff..9ab59b0b4b8 100644 --- a/reference/test/matrix/dense_kernels.cpp +++ b/reference/test/matrix/dense_kernels.cpp @@ -37,8 +37,7 @@ class Dense : public ::testing::Test { protected: using value_type = T; using Mtx = gko::matrix::Dense; - using MixedMtx = - gko::matrix::Dense>; + using MixedMtx = gko::matrix::Dense>; using ComplexMtx = gko::to_complex; using RealMtx = gko::remove_complex; Dense() @@ -746,7 +745,7 @@ TYPED_TEST(Dense, ConvertsToPrecision) { using Dense = typename TestFixture::Mtx; using T = typename TestFixture::value_type; - using OtherT = typename gko::next_precision_with_half; + using OtherT = typename gko::next_precision; using OtherDense = typename gko::matrix::Dense; auto tmp = OtherDense::create(this->exec); auto res = Dense::create(this->exec); @@ -768,7 +767,7 @@ TYPED_TEST(Dense, MovesToPrecision) { using Dense = typename TestFixture::Mtx; using T = typename TestFixture::value_type; - using OtherT = typename gko::next_precision_with_half; + using OtherT = typename gko::next_precision; using OtherDense = typename gko::matrix::Dense; auto tmp = OtherDense::create(this->exec); auto res = Dense::create(this->exec); @@ -1067,7 +1066,7 @@ TYPED_TEST(Dense, AppliesToComplex) TYPED_TEST(Dense, AppliesToMixedComplex) { using mixed_value_type = - gko::next_precision_with_half; + gko::next_precision; using mixed_complex_type = gko::to_complex; using Vec = gko::matrix::Dense; auto exec = gko::ReferenceExecutor::create(); @@ -1121,7 +1120,7 @@ TYPED_TEST(Dense, AdvancedAppliesToComplex) TYPED_TEST(Dense, AdvancedAppliesToMixedComplex) { using mixed_value_type = - gko::next_precision_with_half; + gko::next_precision; using mixed_complex_type = gko::to_complex; using MixedDense = gko::matrix::Dense; using MixedDenseComplex = gko::matrix::Dense; @@ -2014,7 +2013,7 @@ TYPED_TEST(Dense, ConvertsEmptyToPrecision) { using Dense = typename TestFixture::Mtx; using T = typename TestFixture::value_type; - using OtherT = typename gko::next_precision_with_half; + using OtherT = typename gko::next_precision; using OtherDense = typename gko::matrix::Dense; auto empty = OtherDense::create(this->exec); auto res = Dense::create(this->exec); @@ -2029,7 +2028,7 @@ TYPED_TEST(Dense, MovesEmptyToPrecision) { using Dense = typename TestFixture::Mtx; using T = typename TestFixture::value_type; - using OtherT = typename gko::next_precision_with_half; + using OtherT = typename gko::next_precision; using OtherDense = typename gko::matrix::Dense; auto empty = OtherDense::create(this->exec); auto res = Dense::create(this->exec); diff --git a/reference/test/matrix/diagonal_kernels.cpp b/reference/test/matrix/diagonal_kernels.cpp index d1208e96178..b25c3593595 100644 --- a/reference/test/matrix/diagonal_kernels.cpp +++ b/reference/test/matrix/diagonal_kernels.cpp @@ -30,8 +30,7 @@ class Diagonal : public ::testing::Test { using Csr = gko::matrix::Csr; using Diag = gko::matrix::Diagonal; using Dense = gko::matrix::Dense; - using MixedDense = - gko::matrix::Dense>; + using MixedDense = gko::matrix::Dense>; Diagonal() : exec(gko::ReferenceExecutor::create()), @@ -87,7 +86,7 @@ TYPED_TEST_SUITE(Diagonal, gko::test::ValueTypesWithHalf, TYPED_TEST(Diagonal, ConvertsToPrecision) { using ValueType = typename TestFixture::value_type; - using OtherType = gko::next_precision_with_half; + using OtherType = gko::next_precision; using Diagonal = typename TestFixture::Diag; using OtherDiagonal = gko::matrix::Diagonal; auto tmp = OtherDiagonal::create(this->exec); @@ -109,7 +108,7 @@ TYPED_TEST(Diagonal, ConvertsToPrecision) TYPED_TEST(Diagonal, MovesToPrecision) { using ValueType = typename TestFixture::value_type; - using OtherType = gko::next_precision_with_half; + using OtherType = gko::next_precision; using Diagonal = typename TestFixture::Diag; using OtherDiagonal = gko::matrix::Diagonal; auto tmp = OtherDiagonal::create(this->exec); @@ -576,7 +575,7 @@ TYPED_TEST(Diagonal, AppliesToComplex) TYPED_TEST(Diagonal, AppliesToMixedComplex) { using mixed_value_type = - gko::next_precision_with_half; + gko::next_precision; using mixed_complex_type = gko::to_complex; using Vec = gko::matrix::Dense; auto exec = gko::ReferenceExecutor::create(); @@ -636,7 +635,7 @@ TYPED_TEST(Diagonal, AppliesLinearCombinationToComplex) TYPED_TEST(Diagonal, AppliesLinearCombinationToMixedComplex) { using mixed_value_type = - gko::next_precision_with_half; + gko::next_precision; using mixed_complex_type = gko::to_complex; using Vec = gko::matrix::Dense; using Scalar = gko::matrix::Dense; diff --git a/reference/test/matrix/ell_kernels.cpp b/reference/test/matrix/ell_kernels.cpp index 7f3c770c603..4f96742d3f7 100644 --- a/reference/test/matrix/ell_kernels.cpp +++ b/reference/test/matrix/ell_kernels.cpp @@ -30,8 +30,7 @@ class Ell : public ::testing::Test { using Mtx = gko::matrix::Ell; using Csr = gko::matrix::Csr; using Vec = gko::matrix::Dense; - using MixedVec = - gko::matrix::Dense>; + using MixedVec = gko::matrix::Dense>; Ell() : exec(gko::ReferenceExecutor::create()), @@ -93,7 +92,7 @@ TYPED_TEST(Ell, MixedAppliesToDenseVector1) { // Both vectors have the same value type which differs from the matrix using T = typename TestFixture::value_type; - using next_T = gko::next_precision_with_half; + using next_T = gko::next_precision; using Vec = typename gko::matrix::Dense; auto x = gko::initialize({2.0, 1.0, 4.0}, this->exec); auto y = Vec::create(this->exec, gko::dim<2>{2, 1}); @@ -108,7 +107,7 @@ TYPED_TEST(Ell, MixedAppliesToDenseVector2) { // Input vector has same value type as matrix using T = typename TestFixture::value_type; - using next_T = gko::next_precision_with_half; + using next_T = gko::next_precision; using Vec1 = typename TestFixture::Vec; using Vec2 = gko::matrix::Dense; auto x = gko::initialize({2.0, 1.0, 4.0}, this->exec); @@ -124,9 +123,9 @@ TYPED_TEST(Ell, MixedAppliesToDenseVector3) { // Output vector has same value type as matrix using T = typename TestFixture::value_type; - using next_T = gko::next_precision_with_half; + using next_T = gko::next_precision; using Vec1 = typename TestFixture::Vec; - using Vec2 = gko::matrix::Dense>; + using Vec2 = gko::matrix::Dense>; auto x = gko::initialize({2.0, 1.0, 4.0}, this->exec); auto y = Vec1::create(this->exec, gko::dim<2>{2, 1}); @@ -162,7 +161,7 @@ TYPED_TEST(Ell, MixedAppliesToDenseMatrix1) { // Both vectors have the same value type which differs from the matrix using T = typename TestFixture::value_type; - using next_T = gko::next_precision_with_half; + using next_T = gko::next_precision; using Vec = gko::matrix::Dense; // clang-format off auto x = gko::initialize( @@ -186,7 +185,7 @@ TYPED_TEST(Ell, MixedAppliesToDenseMatrix2) { // Input vector has same value type as matrix using T = typename TestFixture::value_type; - using next_T = gko::next_precision_with_half; + using next_T = gko::next_precision; using Vec1 = typename TestFixture::Vec; using Vec2 = gko::matrix::Dense; // clang-format off @@ -211,7 +210,7 @@ TYPED_TEST(Ell, MixedAppliesToDenseMatrix3) { // Output vector has same value type as matrix using T = typename TestFixture::value_type; - using next_T = gko::next_precision_with_half; + using next_T = gko::next_precision; using Vec1 = typename TestFixture::Vec; using Vec2 = gko::matrix::Dense; // clang-format off @@ -250,7 +249,7 @@ TYPED_TEST(Ell, MixedAppliesLinearCombinationToDenseVector1) { // Both vectors have the same value type which differs from the matrix using T = typename TestFixture::value_type; - using next_T = gko::next_precision_with_half; + using next_T = gko::next_precision; using Vec = gko::matrix::Dense; auto alpha = gko::initialize({-1.0}, this->exec); auto beta = gko::initialize({2.0}, this->exec); @@ -267,7 +266,7 @@ TYPED_TEST(Ell, MixedAppliesLinearCombinationToDenseVector2) { // Input vector has same value type as matrix using T = typename TestFixture::value_type; - using next_T = gko::next_precision_with_half; + using next_T = gko::next_precision; using Vec1 = typename TestFixture::Vec; using Vec2 = gko::matrix::Dense; auto alpha = gko::initialize({-1.0}, this->exec); @@ -285,7 +284,7 @@ TYPED_TEST(Ell, MixedAppliesLinearCombinationToDenseVector3) { // Output vector has same value type as matrix using T = typename TestFixture::value_type; - using next_T = gko::next_precision_with_half; + using next_T = gko::next_precision; using Vec1 = typename TestFixture::Vec; using Vec2 = gko::matrix::Dense; auto alpha = gko::initialize({-1.0}, this->exec); @@ -329,7 +328,7 @@ TYPED_TEST(Ell, MixedAppliesLinearCombinationToDenseMatrix1) { // Both vectors have the same value type which differs from the matrix using T = typename TestFixture::value_type; - using next_T = gko::next_precision_with_half; + using next_T = gko::next_precision; using Vec = gko::matrix::Dense; auto alpha = gko::initialize({-1.0}, this->exec); auto beta = gko::initialize({2.0}, this->exec); @@ -357,7 +356,7 @@ TYPED_TEST(Ell, MixedAppliesLinearCombinationToDenseMatrix2) { // Input vector has same value type as matrix using T = typename TestFixture::value_type; - using next_T = gko::next_precision_with_half; + using next_T = gko::next_precision; using Vec1 = typename TestFixture::Vec; using Vec2 = gko::matrix::Dense; auto alpha = gko::initialize({-1.0}, this->exec); @@ -386,7 +385,7 @@ TYPED_TEST(Ell, MixedAppliesLinearCombinationToDenseMatrix3) { // Output vector has same value type as matrix using T = typename TestFixture::value_type; - using next_T = gko::next_precision_with_half; + using next_T = gko::next_precision; using Vec1 = typename TestFixture::Vec; using Vec2 = gko::matrix::Dense; auto alpha = gko::initialize({-1.0}, this->exec); @@ -445,7 +444,7 @@ TYPED_TEST(Ell, ConvertsToPrecision) { using ValueType = typename TestFixture::value_type; using IndexType = typename TestFixture::index_type; - using OtherType = gko::next_precision_with_half; + using OtherType = gko::next_precision; using Ell = typename TestFixture::Mtx; using OtherEll = gko::matrix::Ell; auto tmp = OtherEll::create(this->exec); @@ -468,7 +467,7 @@ TYPED_TEST(Ell, MovesToPrecision) { using ValueType = typename TestFixture::value_type; using IndexType = typename TestFixture::index_type; - using OtherType = gko::next_precision_with_half; + using OtherType = gko::next_precision; using Ell = typename TestFixture::Mtx; using OtherEll = gko::matrix::Ell; auto tmp = OtherEll::create(this->exec); @@ -737,7 +736,7 @@ TYPED_TEST(Ell, ConvertsEmptyToPrecision) { using ValueType = typename TestFixture::value_type; using IndexType = typename TestFixture::index_type; - using OtherType = gko::next_precision_with_half; + using OtherType = gko::next_precision; using Ell = typename TestFixture::Mtx; using OtherEll = gko::matrix::Ell; auto empty = Ell::create(this->exec); @@ -754,7 +753,7 @@ TYPED_TEST(Ell, MovesEmptyToPrecision) { using ValueType = typename TestFixture::value_type; using IndexType = typename TestFixture::index_type; - using OtherType = gko::next_precision_with_half; + using OtherType = gko::next_precision; using Ell = typename TestFixture::Mtx; using OtherEll = gko::matrix::Ell; auto empty = Ell::create(this->exec); @@ -899,7 +898,7 @@ TYPED_TEST(Ell, AppliesToComplex) TYPED_TEST(Ell, AppliesToMixedComplex) { using mixed_value_type = - gko::next_precision_with_half; + gko::next_precision; using mixed_complex_type = gko::to_complex; using Vec = gko::matrix::Dense; auto exec = gko::ReferenceExecutor::create(); @@ -956,7 +955,7 @@ TYPED_TEST(Ell, AdvancedAppliesToComplex) TYPED_TEST(Ell, AdvancedAppliesToMixedComplex) { using mixed_value_type = - gko::next_precision_with_half; + gko::next_precision; using mixed_complex_type = gko::to_complex; using MixedDense = gko::matrix::Dense; using MixedDenseComplex = gko::matrix::Dense; diff --git a/reference/test/matrix/fbcsr_kernels.cpp b/reference/test/matrix/fbcsr_kernels.cpp index 9d9e2144cc3..decae21b986 100644 --- a/reference/test/matrix/fbcsr_kernels.cpp +++ b/reference/test/matrix/fbcsr_kernels.cpp @@ -272,7 +272,7 @@ TYPED_TEST(Fbcsr, ConvertsToPrecision) { using ValueType = typename TestFixture::value_type; using IndexType = typename TestFixture::index_type; - using OtherType = gko::next_precision_with_half; + using OtherType = gko::next_precision; using Fbcsr = typename TestFixture::Mtx; using OtherFbcsr = gko::matrix::Fbcsr; auto tmp = OtherFbcsr::create(this->exec); @@ -295,7 +295,7 @@ TYPED_TEST(Fbcsr, MovesToPrecision) { using ValueType = typename TestFixture::value_type; using IndexType = typename TestFixture::index_type; - using OtherType = gko::next_precision_with_half; + using OtherType = gko::next_precision; using Fbcsr = typename TestFixture::Mtx; using OtherFbcsr = gko::matrix::Fbcsr; auto tmp = OtherFbcsr::create(this->exec); @@ -393,7 +393,7 @@ TYPED_TEST(Fbcsr, ConvertsEmptyToPrecision) { using ValueType = typename TestFixture::value_type; using IndexType = typename TestFixture::index_type; - using OtherType = gko::next_precision_with_half; + using OtherType = gko::next_precision; using Fbcsr = typename TestFixture::Mtx; using OtherFbcsr = gko::matrix::Fbcsr; auto empty = OtherFbcsr::create(this->exec); @@ -412,7 +412,7 @@ TYPED_TEST(Fbcsr, MovesEmptyToPrecision) { using ValueType = typename TestFixture::value_type; using IndexType = typename TestFixture::index_type; - using OtherType = gko::next_precision_with_half; + using OtherType = gko::next_precision; using Fbcsr = typename TestFixture::Mtx; using OtherFbcsr = gko::matrix::Fbcsr; auto empty = OtherFbcsr::create(this->exec); diff --git a/reference/test/matrix/hybrid_kernels.cpp b/reference/test/matrix/hybrid_kernels.cpp index c5e6496dce1..bdc2724e1de 100644 --- a/reference/test/matrix/hybrid_kernels.cpp +++ b/reference/test/matrix/hybrid_kernels.cpp @@ -32,8 +32,7 @@ class Hybrid : public ::testing::Test { using Mtx = gko::matrix::Hybrid; using Vec = gko::matrix::Dense; using Csr = gko::matrix::Csr; - using MixedVec = - gko::matrix::Dense>; + using MixedVec = gko::matrix::Dense>; Hybrid() : exec(gko::ReferenceExecutor::create()), @@ -235,7 +234,7 @@ TYPED_TEST(Hybrid, ConvertsToPrecision) { using ValueType = typename TestFixture::value_type; using IndexType = typename TestFixture::index_type; - using OtherType = gko::next_precision_with_half; + using OtherType = gko::next_precision; using Hybrid = typename TestFixture::Mtx; using OtherHybrid = gko::matrix::Hybrid; auto tmp = OtherHybrid::create(this->exec); @@ -258,7 +257,7 @@ TYPED_TEST(Hybrid, MovesToPrecision) { using ValueType = typename TestFixture::value_type; using IndexType = typename TestFixture::index_type; - using OtherType = gko::next_precision_with_half; + using OtherType = gko::next_precision; using Hybrid = typename TestFixture::Mtx; using OtherHybrid = gko::matrix::Hybrid; auto tmp = OtherHybrid::create(this->exec); @@ -369,7 +368,7 @@ TYPED_TEST(Hybrid, ConvertsEmptyToPrecision) { using ValueType = typename TestFixture::value_type; using IndexType = typename TestFixture::index_type; - using OtherType = gko::next_precision_with_half; + using OtherType = gko::next_precision; using Hybrid = typename TestFixture::Mtx; using OtherHybrid = gko::matrix::Hybrid; auto other = Hybrid::create(this->exec); @@ -386,7 +385,7 @@ TYPED_TEST(Hybrid, MovesEmptyToPrecision) { using ValueType = typename TestFixture::value_type; using IndexType = typename TestFixture::index_type; - using OtherType = gko::next_precision_with_half; + using OtherType = gko::next_precision; using Hybrid = typename TestFixture::Mtx; using OtherHybrid = gko::matrix::Hybrid; auto other = Hybrid::create(this->exec); @@ -701,7 +700,7 @@ TYPED_TEST(Hybrid, AppliesToComplex) TYPED_TEST(Hybrid, AppliesToMixedComplex) { using mixed_value_type = - gko::next_precision_with_half; + gko::next_precision; using mixed_complex_type = gko::to_complex; using Vec = gko::matrix::Dense; auto exec = gko::ReferenceExecutor::create(); @@ -758,7 +757,7 @@ TYPED_TEST(Hybrid, AdvancedAppliesToComplex) TYPED_TEST(Hybrid, AdvancedAppliesToMixedComplex) { using mixed_value_type = - gko::next_precision_with_half; + gko::next_precision; using mixed_complex_type = gko::to_complex; using MixedDense = gko::matrix::Dense; using MixedDenseComplex = gko::matrix::Dense; diff --git a/reference/test/matrix/identity.cpp b/reference/test/matrix/identity.cpp index 82704145978..dc0f799ba70 100644 --- a/reference/test/matrix/identity.cpp +++ b/reference/test/matrix/identity.cpp @@ -19,8 +19,7 @@ class Identity : public ::testing::Test { using value_type = T; using Id = gko::matrix::Identity; using Vec = gko::matrix::Dense; - using MixedVec = - gko::matrix::Dense>; + using MixedVec = gko::matrix::Dense>; using ComplexVec = gko::to_complex; using MixedComplexVec = gko::to_complex; diff --git a/reference/test/matrix/sellp_kernels.cpp b/reference/test/matrix/sellp_kernels.cpp index 23251c63b8f..5e056997163 100644 --- a/reference/test/matrix/sellp_kernels.cpp +++ b/reference/test/matrix/sellp_kernels.cpp @@ -68,8 +68,7 @@ TYPED_TEST(Sellp, AppliesToDenseVector) TYPED_TEST(Sellp, AppliesToMixedDenseVector) { - using value_type = - gko::next_precision_with_half; + using value_type = gko::next_precision; using Vec = gko::matrix::Dense; auto x = gko::initialize({2.0, 1.0, 4.0}, this->exec); auto y = Vec::create(this->exec, gko::dim<2>{2, 1}); @@ -118,8 +117,7 @@ TYPED_TEST(Sellp, AppliesLinearCombinationToDenseVector) TYPED_TEST(Sellp, AppliesLinearCombinationToMixedDenseVector) { - using value_type = - gko::next_precision_with_half; + using value_type = gko::next_precision; using Vec = gko::matrix::Dense; auto alpha = gko::initialize({-1.0}, this->exec); auto beta = gko::initialize({2.0}, this->exec); @@ -192,7 +190,7 @@ TYPED_TEST(Sellp, ConvertsToPrecision) { using ValueType = typename TestFixture::value_type; using IndexType = typename TestFixture::index_type; - using OtherType = gko::next_precision_with_half; + using OtherType = gko::next_precision; using Sellp = typename TestFixture::Mtx; using OtherSellp = gko::matrix::Sellp; auto tmp = OtherSellp::create(this->exec); @@ -215,7 +213,7 @@ TYPED_TEST(Sellp, MovesToPrecision) { using ValueType = typename TestFixture::value_type; using IndexType = typename TestFixture::index_type; - using OtherType = gko::next_precision_with_half; + using OtherType = gko::next_precision; using Sellp = typename TestFixture::Mtx; using OtherSellp = gko::matrix::Sellp; auto tmp = OtherSellp::create(this->exec); @@ -313,7 +311,7 @@ TYPED_TEST(Sellp, ConvertsEmptyToPrecision) { using ValueType = typename TestFixture::value_type; using IndexType = typename TestFixture::index_type; - using OtherType = gko::next_precision_with_half; + using OtherType = gko::next_precision; using Sellp = typename TestFixture::Mtx; using OtherSellp = gko::matrix::Sellp; auto empty = OtherSellp::create(this->exec); @@ -332,7 +330,7 @@ TYPED_TEST(Sellp, MovesEmptyToPrecision) { using ValueType = typename TestFixture::value_type; using IndexType = typename TestFixture::index_type; - using OtherType = gko::next_precision_with_half; + using OtherType = gko::next_precision; using Sellp = typename TestFixture::Mtx; using OtherSellp = gko::matrix::Sellp; auto empty = OtherSellp::create(this->exec); diff --git a/reference/test/matrix/sparsity_csr_kernels.cpp b/reference/test/matrix/sparsity_csr_kernels.cpp index 30805d033ab..03adbece035 100644 --- a/reference/test/matrix/sparsity_csr_kernels.cpp +++ b/reference/test/matrix/sparsity_csr_kernels.cpp @@ -145,7 +145,7 @@ TYPED_TEST(SparsityCsr, AppliesToDenseVector) TYPED_TEST(SparsityCsr, AppliesToMixedDenseVector) { - using T = gko::next_precision_with_half; + using T = gko::next_precision; using Vec = gko::matrix::Dense; auto x = gko::initialize({2.0, 1.0, 4.0}, this->exec); auto y = Vec::create(this->exec, gko::dim<2>{2, 1}); @@ -192,7 +192,7 @@ TYPED_TEST(SparsityCsr, AppliesLinearCombinationToDenseVector) TYPED_TEST(SparsityCsr, AppliesLinearCombinationToMixedDenseVector) { - using T = gko::next_precision_with_half; + using T = gko::next_precision; using Vec = gko::matrix::Dense; auto alpha = gko::initialize({-1.0}, this->exec); auto beta = gko::initialize({2.0}, this->exec); @@ -243,8 +243,8 @@ TYPED_TEST(SparsityCsr, AppliesToComplex) TYPED_TEST(SparsityCsr, AppliesToMixedComplex) { - using T = gko::next_precision_with_half< - gko::to_complex>; + using T = + gko::next_precision>; using Vec = gko::matrix::Dense; auto x = gko::initialize({T{2.0, 4.0}, T{1.0, 2.0}, T{4.0, 8.0}}, this->exec); @@ -279,7 +279,7 @@ TYPED_TEST(SparsityCsr, AppliesLinearCombinationToComplex) TYPED_TEST(SparsityCsr, AppliesLinearCombinationToMixedComplex) { using Vec = gko::matrix::Dense< - gko::next_precision_with_half>; + gko::next_precision>; using ComplexVec = gko::to_complex; using T = typename ComplexVec::value_type; auto alpha = gko::initialize({-1.0}, this->exec); diff --git a/reference/test/preconditioner/ic.cpp b/reference/test/preconditioner/ic.cpp index aabd6c64d73..3084f60ca1c 100644 --- a/reference/test/preconditioner/ic.cpp +++ b/reference/test/preconditioner/ic.cpp @@ -246,7 +246,7 @@ TYPED_TEST(Ic, SolvesSingleRhsMixed) { using ic_prec_type = typename TestFixture::ic_prec_type; using T = typename TestFixture::value_type; - using Vec = gko::matrix::Dense>; + using Vec = gko::matrix::Dense>; const auto b = gko::initialize({1.0, 3.0, 6.0}, this->exec); auto x = Vec::create(this->exec, gko::dim<2>{3, 1}); auto preconditioner = @@ -279,8 +279,8 @@ TYPED_TEST(Ic, SolvesSingleRhsComplex) TYPED_TEST(Ic, SolvesSingleRhsComplexMixed) { using ic_prec_type = typename TestFixture::ic_prec_type; - using Vec = gko::matrix::Dense>>; + using Vec = gko::matrix::Dense< + gko::next_precision>>; using T = typename Vec::value_type; const auto b = gko::initialize( {T{1.0, 2.0}, T{3.0, 6.0}, T{6.0, 12.0}}, this->exec); @@ -316,7 +316,7 @@ TYPED_TEST(Ic, AdvancedSolvesSingleRhsMixed) { using ic_prec_type = typename TestFixture::ic_prec_type; using T = typename TestFixture::value_type; - using Vec = gko::matrix::Dense>; + using Vec = gko::matrix::Dense>; const auto b = gko::initialize({1.0, 3.0, 6.0}, this->exec); const auto alpha = gko::initialize({2.0}, this->exec); const auto beta = gko::initialize({-1.0}, this->exec); @@ -356,7 +356,7 @@ TYPED_TEST(Ic, AdvancedSolvesSingleRhsComplexMixed) { using ic_prec_type = typename TestFixture::ic_prec_type; using MixedDense = gko::matrix::Dense< - gko::next_precision_with_half>; + gko::next_precision>; using MixedDenseComplex = gko::to_complex; using T = typename MixedDenseComplex::value_type; const auto b = gko::initialize( diff --git a/reference/test/preconditioner/ilu.cpp b/reference/test/preconditioner/ilu.cpp index e4c4809f084..1c7deddf56c 100644 --- a/reference/test/preconditioner/ilu.cpp +++ b/reference/test/preconditioner/ilu.cpp @@ -316,7 +316,7 @@ TYPED_TEST(Ilu, SolvesSingleRhsWithMtx) TYPED_TEST(Ilu, SolvesSingleRhsWithMixedMtx) { using Mtx = gko::matrix::Dense< - gko::next_precision_with_half>; + gko::next_precision>; const auto b = gko::initialize({1.0, 3.0, 6.0}, this->exec); auto x = Mtx::create(this->exec, gko::dim<2>{3, 1}); x->copy_from(b); @@ -349,8 +349,8 @@ TYPED_TEST(Ilu, SolvesSingleRhsWithComplexMtx) TYPED_TEST(Ilu, SolvesSingleRhsWithMixedComplexMtx) { - using Mtx = gko::matrix::Dense>>; + using Mtx = gko::matrix::Dense< + gko::to_complex>>; using T = typename Mtx::value_type; const auto b = gko::initialize( {T{1.0, 2.0}, T{3.0, 6.0}, T{6.0, 12.0}}, this->exec); @@ -403,8 +403,7 @@ TYPED_TEST(Ilu, SolvesAdvancedSingleRhs) TYPED_TEST(Ilu, SolvesAdvancedSingleRhsMixed) { - using value_type = - gko::next_precision_with_half; + using value_type = gko::next_precision; using Mtx = gko::matrix::Dense; const value_type alpha{2.0}; const auto alpha_linop = gko::initialize({alpha}, this->exec); @@ -454,8 +453,7 @@ TYPED_TEST(Ilu, SolvesAdvancedSingleRhsComplex) TYPED_TEST(Ilu, SolvesAdvancedSingleRhsMixedComplex) { - using value_type = - gko::next_precision_with_half; + using value_type = gko::next_precision; using complex_type = gko::to_complex; using MixedDense = gko::matrix::Dense; using MixedDenseComplex = gko::to_complex; diff --git a/reference/test/preconditioner/jacobi.cpp b/reference/test/preconditioner/jacobi.cpp index 1bc0aa37470..2697efc3cd5 100644 --- a/reference/test/preconditioner/jacobi.cpp +++ b/reference/test/preconditioner/jacobi.cpp @@ -478,7 +478,7 @@ TYPED_TEST(Jacobi, ScalarJacobiGeneratesOnDifferentPrecision) { using value_type = typename TestFixture::value_type; using index_type = typename TestFixture::index_type; - using next_type = gko::next_precision_with_half; + using next_type = gko::next_precision; using Bj = typename TestFixture::Bj; auto csr = gko::share(gko::matrix::Csr::create(this->exec)); diff --git a/reference/test/preconditioner/jacobi_kernels.cpp b/reference/test/preconditioner/jacobi_kernels.cpp index 2b75c2a5590..d5f9346eab6 100644 --- a/reference/test/preconditioner/jacobi_kernels.cpp +++ b/reference/test/preconditioner/jacobi_kernels.cpp @@ -649,8 +649,7 @@ TYPED_TEST(Jacobi, ScalarJacobiAppliesToVector) TYPED_TEST(Jacobi, AppliesToMixedVector) { - using value_type = - gko::next_precision_with_half; + using value_type = gko::next_precision; using Vec = gko::matrix::Dense; auto x = gko::initialize({1.0, -1.0, 2.0, -2.0, 3.0}, this->exec); auto b = gko::initialize({4.0, -1.0, -2.0, 4.0, -1.0}, this->exec); @@ -690,8 +689,8 @@ TYPED_TEST(Jacobi, AppliesToComplexVector) TYPED_TEST(Jacobi, AppliesToMixedComplexVector) { - using value_type = gko::to_complex< - gko::next_precision_with_half>; + using value_type = + gko::to_complex>; using Vec = gko::matrix::Dense; auto x = gko::initialize( {value_type{1.0, 2.0}, value_type{-1.0, -2.0}, value_type{2.0, 4.0}, @@ -896,8 +895,7 @@ TYPED_TEST(Jacobi, ScalarJacobiAppliesLinearCombinationToVector) TYPED_TEST(Jacobi, AppliesLinearCombinationToMixedVector) { - using value_type = - gko::next_precision_with_half; + using value_type = gko::next_precision; using Vec = gko::matrix::Dense; auto x = gko::initialize({1.0, -1.0, 2.0, -2.0, 3.0}, this->exec); auto b = gko::initialize({4.0, -1.0, -2.0, 4.0, -1.0}, this->exec); @@ -940,8 +938,7 @@ TYPED_TEST(Jacobi, AppliesLinearCombinationToComplexVector) TYPED_TEST(Jacobi, AppliesLinearCombinationToMixedComplexVector) { - using value_type = - gko::next_precision_with_half; + using value_type = gko::next_precision; using MixedDense = gko::matrix::Dense; using MixedDenseComplex = gko::to_complex; using T = gko::to_complex; diff --git a/reference/test/reorder/scaled_reordered.cpp b/reference/test/reorder/scaled_reordered.cpp index b9924cd9418..8fb3c885cf3 100644 --- a/reference/test/reorder/scaled_reordered.cpp +++ b/reference/test/reorder/scaled_reordered.cpp @@ -451,7 +451,7 @@ TYPED_TEST(ScaledReordered, SolvesSingleRhsWithScalingAndRcmReorderingMixed) { using SR = typename TestFixture::SR; using T = typename TestFixture::value_type; - using OtherT = gko::next_precision_with_half; + using OtherT = gko::next_precision; using Vec = gko::matrix::Dense; auto scaled_reordered_fact = SR::build() .with_row_scaling(this->diag2) @@ -500,7 +500,7 @@ TYPED_TEST(ScaledReordered, { using SR = typename TestFixture::SR; using T = typename TestFixture::value_type; - using OtherT = gko::next_precision_with_half; + using OtherT = gko::next_precision; using Vec = gko::matrix::Dense; auto scaled_reordered_fact = SR::build() .with_row_scaling(this->diag2) diff --git a/reference/test/solver/bicg_kernels.cpp b/reference/test/solver/bicg_kernels.cpp index 13d81de0c7a..a8f397aed1e 100644 --- a/reference/test/solver/bicg_kernels.cpp +++ b/reference/test/solver/bicg_kernels.cpp @@ -266,8 +266,7 @@ TYPED_TEST(Bicg, SolvesStencilSystem) TYPED_TEST(Bicg, SolvesStencilSystemMixed) { - using value_type = - gko::next_precision_with_half; + using value_type = gko::next_precision; using Mtx = gko::matrix::Dense; auto solver = this->bicg_factory->generate(this->mtx); auto b = gko::initialize({-1.0, 3.0, 1.0}, this->exec); @@ -303,8 +302,8 @@ TYPED_TEST(Bicg, SolvesStencilSystemComplex) TYPED_TEST(Bicg, SolvesStencilSystemMixedComplex) { - using value_type = gko::to_complex< - gko::next_precision_with_half>; + using value_type = + gko::to_complex>; using Mtx = gko::matrix::Dense; auto solver = this->bicg_factory->generate(this->mtx); auto b = gko::initialize( @@ -359,8 +358,7 @@ TYPED_TEST(Bicg, SolvesStencilSystemUsingAdvancedApply) TYPED_TEST(Bicg, SolvesStencilSystemUsingAdvancedApplyMixed) { - using value_type = - gko::next_precision_with_half; + using value_type = gko::next_precision; using Mtx = gko::matrix::Dense; auto solver = this->bicg_factory->generate(this->mtx); auto alpha = gko::initialize({2.0}, this->exec); @@ -402,7 +400,7 @@ TYPED_TEST(Bicg, SolvesStencilSystemUsingAdvancedApplyComplex) TYPED_TEST(Bicg, SolvesStencilSystemUsingAdvancedApplyMixedComplex) { using Scalar = gko::matrix::Dense< - gko::next_precision_with_half>; + gko::next_precision>; using Mtx = gko::to_complex; using value_type = typename Mtx::value_type; auto solver = this->bicg_factory->generate(this->mtx); diff --git a/reference/test/solver/bicgstab_kernels.cpp b/reference/test/solver/bicgstab_kernels.cpp index ce17f25f47e..5bbff5b1a5e 100644 --- a/reference/test/solver/bicgstab_kernels.cpp +++ b/reference/test/solver/bicgstab_kernels.cpp @@ -384,8 +384,7 @@ TYPED_TEST(Bicgstab, SolvesDenseSystem) TYPED_TEST(Bicgstab, SolvesDenseSystemMixed) { - using value_type = - gko::next_precision_with_half; + using value_type = gko::next_precision; using Mtx = gko::matrix::Dense; auto solver = this->bicgstab_factory->generate(this->mtx); auto b = gko::initialize({-1.0, 3.0, 1.0}, this->exec); @@ -421,8 +420,8 @@ TYPED_TEST(Bicgstab, SolvesDenseSystemComplex) TYPED_TEST(Bicgstab, SolvesDenseSystemMixedComplex) { - using value_type = gko::to_complex< - gko::next_precision_with_half>; + using value_type = + gko::to_complex>; using Mtx = gko::matrix::Dense; auto solver = this->bicgstab_factory->generate(this->mtx); auto b = gko::initialize( @@ -497,8 +496,7 @@ TYPED_TEST(Bicgstab, SolvesDenseSystemUsingAdvancedApply) TYPED_TEST(Bicgstab, SolvesDenseSystemUsingAdvancedApplyMixed) { - using value_type = - gko::next_precision_with_half; + using value_type = gko::next_precision; using Mtx = gko::matrix::Dense; auto solver = this->bicgstab_factory->generate(this->mtx); auto alpha = gko::initialize({2.0}, this->exec); @@ -540,7 +538,7 @@ TYPED_TEST(Bicgstab, SolvesDenseSystemUsingAdvancedApplyComplex) TYPED_TEST(Bicgstab, SolvesDenseSystemUsingAdvancedApplyMixedComplex) { using Scalar = gko::matrix::Dense< - gko::next_precision_with_half>; + gko::next_precision>; using Mtx = gko::to_complex; using value_type = typename Mtx::value_type; auto solver = this->bicgstab_factory->generate(this->mtx); diff --git a/reference/test/solver/cb_gmres_kernels.cpp b/reference/test/solver/cb_gmres_kernels.cpp index ae3ecce9963..cee760f7840 100644 --- a/reference/test/solver/cb_gmres_kernels.cpp +++ b/reference/test/solver/cb_gmres_kernels.cpp @@ -160,7 +160,8 @@ TYPED_TEST(CbGmres, SolvesStencilSystem) TYPED_TEST(CbGmres, SolvesStencilSystemMixed) { - using value_type = gko::next_precision; + using value_type = + gko::next_precision_base; using Mtx = gko::matrix::Dense; auto solver = this->cb_gmres_factory->generate(this->mtx); auto b = gko::initialize({13.0, 7.0, 1.0}, this->exec); @@ -198,8 +199,8 @@ TYPED_TEST(CbGmres, SolvesStencilSystemComplex) TYPED_TEST(CbGmres, SolvesStencilSystemMixedComplex) { - using value_type = - gko::to_complex>; + using value_type = gko::to_complex< + gko::next_precision_base>; using Mtx = gko::matrix::Dense; auto solver = this->cb_gmres_factory->generate(this->mtx); auto b = @@ -280,7 +281,8 @@ TYPED_TEST(CbGmres, SolvesStencilSystemUsingAdvancedApply) TYPED_TEST(CbGmres, SolvesStencilSystemUsingAdvancedApplyMixed) { - using value_type = gko::next_precision; + using value_type = + gko::next_precision_base; using Mtx = gko::matrix::Dense; auto solver = this->cb_gmres_factory->generate(this->mtx); auto alpha = gko::initialize({2.0}, this->exec); @@ -324,7 +326,7 @@ TYPED_TEST(CbGmres, SolvesStencilSystemUsingAdvancedApplyComplex) TYPED_TEST(CbGmres, SolvesStencilSystemUsingAdvancedApplyMixedComplex) { using Scalar = gko::matrix::Dense< - gko::next_precision>; + gko::next_precision_base>; using Mtx = gko::to_complex; using value_type = typename Mtx::value_type; auto solver = this->cb_gmres_factory->generate(this->mtx); diff --git a/reference/test/solver/cg_kernels.cpp b/reference/test/solver/cg_kernels.cpp index fd708d736bc..8cbc9a09c18 100644 --- a/reference/test/solver/cg_kernels.cpp +++ b/reference/test/solver/cg_kernels.cpp @@ -228,8 +228,7 @@ TYPED_TEST(Cg, SolvesStencilSystem) TYPED_TEST(Cg, SolvesStencilSystemMixed) { - using value_type = - gko::next_precision_with_half; + using value_type = gko::next_precision; using Mtx = gko::matrix::Dense; auto solver = this->cg_factory->generate(this->mtx); auto b = gko::initialize({-1.0, 3.0, 1.0}, this->exec); @@ -265,8 +264,8 @@ TYPED_TEST(Cg, SolvesStencilSystemComplex) TYPED_TEST(Cg, SolvesStencilSystemMixedComplex) { - using value_type = gko::to_complex< - gko::next_precision_with_half>; + using value_type = + gko::to_complex>; using Mtx = gko::matrix::Dense; auto solver = this->cg_factory->generate(this->mtx); auto b = gko::initialize( @@ -321,8 +320,7 @@ TYPED_TEST(Cg, SolvesStencilSystemUsingAdvancedApply) TYPED_TEST(Cg, SolvesStencilSystemUsingAdvancedApplyMixed) { - using value_type = - gko::next_precision_with_half; + using value_type = gko::next_precision; using Mtx = gko::matrix::Dense; auto solver = this->cg_factory->generate(this->mtx); auto alpha = gko::initialize({2.0}, this->exec); @@ -364,7 +362,7 @@ TYPED_TEST(Cg, SolvesStencilSystemUsingAdvancedApplyComplex) TYPED_TEST(Cg, SolvesStencilSystemUsingAdvancedApplyMixedComplex) { using Scalar = gko::matrix::Dense< - gko::next_precision_with_half>; + gko::next_precision>; using Mtx = gko::to_complex; using value_type = typename Mtx::value_type; auto solver = this->cg_factory->generate(this->mtx); diff --git a/reference/test/solver/cgs_kernels.cpp b/reference/test/solver/cgs_kernels.cpp index a06c087776c..c51a3252540 100644 --- a/reference/test/solver/cgs_kernels.cpp +++ b/reference/test/solver/cgs_kernels.cpp @@ -293,8 +293,7 @@ TYPED_TEST(Cgs, SolvesDenseSystem) TYPED_TEST(Cgs, SolvesDenseSystemMixed) { - using value_type = - gko::next_precision_with_half; + using value_type = gko::next_precision; using Mtx = gko::matrix::Dense; auto solver = this->cgs_factory->generate(this->mtx); auto b = gko::initialize({-1.0, 3.0, 1.0}, this->exec); @@ -330,8 +329,8 @@ TYPED_TEST(Cgs, SolvesDenseSystemComplex) TYPED_TEST(Cgs, SolvesDenseSystemMixedComplex) { - using value_type = gko::to_complex< - gko::next_precision_with_half>; + using value_type = + gko::to_complex>; using Mtx = gko::matrix::Dense; auto solver = this->cgs_factory->generate(this->mtx); auto b = gko::initialize( @@ -387,8 +386,7 @@ TYPED_TEST(Cgs, SolvesDenseSystemUsingAdvancedApply) TYPED_TEST(Cgs, SolvesDenseSystemUsingAdvancedApplyMixed) { - using value_type = - gko::next_precision_with_half; + using value_type = gko::next_precision; using Mtx = gko::matrix::Dense; auto solver = this->cgs_factory->generate(this->mtx); auto alpha = gko::initialize({2.0}, this->exec); @@ -430,7 +428,7 @@ TYPED_TEST(Cgs, SolvesDenseSystemUsingAdvancedApplyComplex) TYPED_TEST(Cgs, SolvesDenseSystemUsingAdvancedApplyMixedComplex) { using Scalar = gko::matrix::Dense< - gko::next_precision_with_half>; + gko::next_precision>; using Mtx = gko::to_complex; using value_type = typename Mtx::value_type; auto solver = this->cgs_factory->generate(this->mtx); diff --git a/reference/test/solver/fcg_kernels.cpp b/reference/test/solver/fcg_kernels.cpp index 88615921f34..4b8484a78c8 100644 --- a/reference/test/solver/fcg_kernels.cpp +++ b/reference/test/solver/fcg_kernels.cpp @@ -242,8 +242,7 @@ TYPED_TEST(Fcg, SolvesStencilSystem) TYPED_TEST(Fcg, SolvesStencilSystemMixed) { - using value_type = - gko::next_precision_with_half; + using value_type = gko::next_precision; using Mtx = gko::matrix::Dense; auto solver = this->fcg_factory->generate(this->mtx); auto b = gko::initialize({-1.0, 3.0, 1.0}, this->exec); @@ -279,8 +278,8 @@ TYPED_TEST(Fcg, SolvesStencilSystemComplex) TYPED_TEST(Fcg, SolvesStencilSystemMixedComplex) { - using value_type = gko::to_complex< - gko::next_precision_with_half>; + using value_type = + gko::to_complex>; using Mtx = gko::matrix::Dense; auto solver = this->fcg_factory->generate(this->mtx); auto b = gko::initialize( @@ -335,8 +334,7 @@ TYPED_TEST(Fcg, SolvesStencilSystemUsingAdvancedApply) TYPED_TEST(Fcg, SolvesStencilSystemUsingAdvancedApplyMixed) { - using value_type = - gko::next_precision_with_half; + using value_type = gko::next_precision; using Mtx = gko::matrix::Dense; auto solver = this->fcg_factory->generate(this->mtx); auto alpha = gko::initialize({2.0}, this->exec); @@ -378,7 +376,7 @@ TYPED_TEST(Fcg, SolvesStencilSystemUsingAdvancedApplyComplex) TYPED_TEST(Fcg, SolvesStencilSystemUsingAdvancedApplyMixedComplex) { using Scalar = gko::matrix::Dense< - gko::next_precision_with_half>; + gko::next_precision>; using Mtx = gko::to_complex; using value_type = typename Mtx::value_type; auto solver = this->fcg_factory->generate(this->mtx); diff --git a/reference/test/solver/gcr_kernels.cpp b/reference/test/solver/gcr_kernels.cpp index af8e74888d0..be747a2f84b 100644 --- a/reference/test/solver/gcr_kernels.cpp +++ b/reference/test/solver/gcr_kernels.cpp @@ -225,8 +225,7 @@ TYPED_TEST(Gcr, SolvesStencilSystem) TYPED_TEST(Gcr, SolvesStencilSystemMixed) { - using value_type = - gko::next_precision_with_half; + using value_type = gko::next_precision; using Mtx = gko::matrix::Dense; auto solver = this->gcr_factory->generate(this->mtx); auto b = gko::initialize({13.0, 7.0, 1.0}, this->exec); @@ -263,8 +262,8 @@ TYPED_TEST(Gcr, SolvesStencilSystemComplex) TYPED_TEST(Gcr, SolvesStencilSystemMixedComplex) { - using value_type = gko::to_complex< - gko::next_precision_with_half>; + using value_type = + gko::to_complex>; using Mtx = gko::matrix::Dense; auto solver = this->gcr_factory->generate(this->mtx); auto b = @@ -320,8 +319,7 @@ TYPED_TEST(Gcr, SolvesStencilSystemUsingAdvancedApply) TYPED_TEST(Gcr, SolvesStencilSystemUsingAdvancedApplyMixed) { - using value_type = - gko::next_precision_with_half; + using value_type = gko::next_precision; using Mtx = gko::matrix::Dense; auto solver = this->gcr_factory->generate(this->mtx); auto alpha = gko::initialize({2.0}, this->exec); @@ -364,7 +362,7 @@ TYPED_TEST(Gcr, SolvesStencilSystemUsingAdvancedApplyComplex) TYPED_TEST(Gcr, SolvesStencilSystemUsingAdvancedApplyMixedComplex) { using Scalar = gko::matrix::Dense< - gko::next_precision_with_half>; + gko::next_precision>; using Mtx = gko::to_complex; using value_type = typename Mtx::value_type; auto solver = this->gcr_factory->generate(this->mtx); diff --git a/reference/test/solver/gmres_kernels.cpp b/reference/test/solver/gmres_kernels.cpp index abecc6b2a79..1719dfe1062 100644 --- a/reference/test/solver/gmres_kernels.cpp +++ b/reference/test/solver/gmres_kernels.cpp @@ -434,8 +434,7 @@ TYPED_TEST(Gmres, SolvesStencilSystem) TYPED_TEST(Gmres, SolvesStencilSystemMixed) { - using value_type = - gko::next_precision_with_half; + using value_type = gko::next_precision; using Mtx = gko::matrix::Dense; auto solver = this->gmres_factory->generate(this->mtx); auto b = gko::initialize({13.0, 7.0, 1.0}, this->exec); @@ -472,8 +471,8 @@ TYPED_TEST(Gmres, SolvesStencilSystemComplex) TYPED_TEST(Gmres, SolvesStencilSystemMixedComplex) { - using value_type = gko::to_complex< - gko::next_precision_with_half>; + using value_type = + gko::to_complex>; using Mtx = gko::matrix::Dense; auto solver = this->gmres_factory->generate(this->mtx); auto b = @@ -529,8 +528,7 @@ TYPED_TEST(Gmres, SolvesStencilSystemUsingAdvancedApply) TYPED_TEST(Gmres, SolvesStencilSystemUsingAdvancedApplyMixed) { - using value_type = - gko::next_precision_with_half; + using value_type = gko::next_precision; using Mtx = gko::matrix::Dense; auto solver = this->gmres_factory->generate(this->mtx); auto alpha = gko::initialize({2.0}, this->exec); @@ -573,7 +571,7 @@ TYPED_TEST(Gmres, SolvesStencilSystemUsingAdvancedApplyComplex) TYPED_TEST(Gmres, SolvesStencilSystemUsingAdvancedApplyMixedComplex) { using Scalar = gko::matrix::Dense< - gko::next_precision_with_half>; + gko::next_precision>; using Mtx = gko::to_complex; using value_type = typename Mtx::value_type; auto solver = this->gmres_factory->generate(this->mtx); diff --git a/reference/test/solver/idr_kernels.cpp b/reference/test/solver/idr_kernels.cpp index 420a3f15684..a5aee44029c 100644 --- a/reference/test/solver/idr_kernels.cpp +++ b/reference/test/solver/idr_kernels.cpp @@ -80,7 +80,7 @@ TYPED_TEST(Idr, SolvesDenseSystem) TYPED_TEST(Idr, SolvesDenseSystemMixed) { using T = typename TestFixture::value_type; - using value_type = gko::next_precision_with_half; + using value_type = gko::next_precision; using Mtx = gko::matrix::Dense; auto solver = this->idr_factory->generate(this->mtx); auto b = gko::initialize({-1.0, 3.0, 1.0}, this->exec); @@ -118,7 +118,7 @@ TYPED_TEST(Idr, SolvesDenseSystemComplex) TYPED_TEST(Idr, SolvesDenseSystemMixedComplex) { using T = typename TestFixture::value_type; - using value_type = gko::to_complex>; + using value_type = gko::to_complex>; using Mtx = gko::matrix::Dense; auto solver = this->idr_factory->generate(this->mtx); auto b = gko::initialize( @@ -237,8 +237,7 @@ TYPED_TEST(Idr, SolvesDenseSystemUsingAdvancedApply) TYPED_TEST(Idr, SolvesDenseSystemUsingAdvancedApplyMixed) { - using value_type = - gko::next_precision_with_half; + using value_type = gko::next_precision; using Mtx = gko::matrix::Dense; auto solver = this->idr_factory->generate(this->mtx); auto alpha = gko::initialize({2.0}, this->exec); @@ -280,7 +279,7 @@ TYPED_TEST(Idr, SolvesDenseSystemUsingAdvancedApplyComplex) TYPED_TEST(Idr, SolvesDenseSystemUsingAdvancedApplyMixedComplex) { using Scalar = gko::matrix::Dense< - gko::next_precision_with_half>; + gko::next_precision>; using Mtx = gko::to_complex; using value_type = typename Mtx::value_type; auto solver = this->idr_factory->generate(this->mtx); diff --git a/reference/test/solver/ir_kernels.cpp b/reference/test/solver/ir_kernels.cpp index f329a16d932..fc14711bec2 100644 --- a/reference/test/solver/ir_kernels.cpp +++ b/reference/test/solver/ir_kernels.cpp @@ -82,8 +82,7 @@ TYPED_TEST(Ir, SolvesTriangularSystem) TYPED_TEST(Ir, SolvesTriangularSystemMixed) { - using value_type = - gko::next_precision_with_half; + using value_type = gko::next_precision; using Mtx = gko::matrix::Dense; auto solver = this->ir_factory->generate(this->mtx); auto b = gko::initialize({3.9, 9.0, 2.2}, this->exec); @@ -119,8 +118,8 @@ TYPED_TEST(Ir, SolvesTriangularSystemComplex) TYPED_TEST(Ir, SolvesTriangularSystemMixedComplex) { - using value_type = gko::to_complex< - gko::next_precision_with_half>; + using value_type = + gko::to_complex>; using Mtx = gko::matrix::Dense; auto solver = this->ir_factory->generate(this->mtx); auto b = gko::initialize( @@ -245,7 +244,7 @@ TYPED_TEST(Ir, SolvesTriangularSystemUsingAdvancedApplyComplex) TYPED_TEST(Ir, SolvesTriangularSystemUsingAdvancedApplyMixedComplex) { using Scalar = gko::matrix::Dense< - gko::next_precision_with_half>; + gko::next_precision>; using Mtx = gko::to_complex; using value_type = typename Mtx::value_type; auto solver = this->ir_factory->generate(this->mtx); diff --git a/reference/test/solver/lower_trs_kernels.cpp b/reference/test/solver/lower_trs_kernels.cpp index 6d54efd2913..dcb7d6c6f0c 100644 --- a/reference/test/solver/lower_trs_kernels.cpp +++ b/reference/test/solver/lower_trs_kernels.cpp @@ -108,7 +108,7 @@ TYPED_TEST(LowerTrs, SolvesTriangularSystem) TYPED_TEST(LowerTrs, SolvesTriangularSystemMixed) { using other_value_type = typename TestFixture::value_type; - using value_type = gko::next_precision_with_half; + using value_type = gko::next_precision; using Mtx = gko::matrix::Dense; std::shared_ptr b = gko::initialize({1.0, 2.0, 1.0}, this->exec); auto x = gko::initialize({0.0, 0.0, 0.0}, this->exec); @@ -146,8 +146,7 @@ TYPED_TEST(LowerTrs, SolvesTriangularSystemComplex) TYPED_TEST(LowerTrs, SolvesTriangularSystemMixedComplex) { using other_value_type = typename TestFixture::value_type; - using Scalar = - gko::matrix::Dense>; + using Scalar = gko::matrix::Dense>; using Mtx = gko::to_complex; using value_type = typename Mtx::value_type; std::shared_ptr b = gko::initialize( @@ -218,7 +217,7 @@ TYPED_TEST(LowerTrs, SolvesTriangularSystemUsingAdvancedApply) TYPED_TEST(LowerTrs, SolvesTriangularSystemUsingAdvancedApplyMixed) { using other_value_type = typename TestFixture::value_type; - using value_type = gko::next_precision_with_half; + using value_type = gko::next_precision; using Mtx = gko::matrix::Dense; auto alpha = gko::initialize({2.0}, this->exec); auto beta = gko::initialize({-1.0}, this->exec); @@ -260,8 +259,7 @@ TYPED_TEST(LowerTrs, SolvesTriangularSystemUsingAdvancedApplyComplex) TYPED_TEST(LowerTrs, SolvesTriangularSystemUsingAdvancedApplyMixedComplex) { using other_value_type = typename TestFixture::value_type; - using Scalar = - gko::matrix::Dense>; + using Scalar = gko::matrix::Dense>; using Mtx = gko::to_complex; using value_type = typename Mtx::value_type; auto alpha = gko::initialize({2.0}, this->exec); diff --git a/reference/test/solver/multigrid_kernels.cpp b/reference/test/solver/multigrid_kernels.cpp index 8aad93a1efb..31c27a4551a 100644 --- a/reference/test/solver/multigrid_kernels.cpp +++ b/reference/test/solver/multigrid_kernels.cpp @@ -229,13 +229,11 @@ class Multigrid : public ::testing::Test { using Mtx = gko::matrix::Dense; using Solver = gko::solver::Multigrid; using Coarse = gko::multigrid::Pgm; - using CoarseNext = - gko::multigrid::Pgm>; + using CoarseNext = gko::multigrid::Pgm>; using Smoother = gko::solver::Ir; using InnerSolver = gko::preconditioner::Jacobi; using CoarsestSolver = gko::solver::Cg; - using CoarsestNextSolver = - gko::solver::Cg>; + using CoarsestNextSolver = gko::solver::Cg>; using DummyRPFactory = DummyMultigridLevelWithFactory; using DummyFactory = DummyLinOpWithFactory; Multigrid() diff --git a/reference/test/solver/upper_trs_kernels.cpp b/reference/test/solver/upper_trs_kernels.cpp index 870542593ff..15f0f3c2996 100644 --- a/reference/test/solver/upper_trs_kernels.cpp +++ b/reference/test/solver/upper_trs_kernels.cpp @@ -108,7 +108,7 @@ TYPED_TEST(UpperTrs, SolvesTriangularSystem) TYPED_TEST(UpperTrs, SolvesTriangularSystemMixed) { using other_value_type = typename TestFixture::value_type; - using value_type = gko::next_precision_with_half; + using value_type = gko::next_precision; using Mtx = gko::matrix::Dense; std::shared_ptr b = gko::initialize({4.0, 2.0, 3.0}, this->exec); auto x = gko::initialize({0.0, 0.0, 0.0}, this->exec); @@ -146,8 +146,7 @@ TYPED_TEST(UpperTrs, SolvesTriangularSystemComplex) TYPED_TEST(UpperTrs, SolvesTriangularSystemMixedComplex) { using other_value_type = typename TestFixture::value_type; - using Scalar = - gko::matrix::Dense>; + using Scalar = gko::matrix::Dense>; using Mtx = gko::to_complex; using value_type = typename Mtx::value_type; std::shared_ptr b = gko::initialize( @@ -219,7 +218,7 @@ TYPED_TEST(UpperTrs, SolvesTriangularSystemUsingAdvancedApply) TYPED_TEST(UpperTrs, SolvesTriangularSystemUsingAdvancedApplyMixed) { using other_value_type = typename TestFixture::value_type; - using value_type = gko::next_precision_with_half; + using value_type = gko::next_precision; using Mtx = gko::matrix::Dense; auto alpha = gko::initialize({2.0}, this->exec); auto beta = gko::initialize({-1.0}, this->exec); @@ -261,8 +260,7 @@ TYPED_TEST(UpperTrs, SolvesTriangularSystemUsingAdvancedApplyComplex) TYPED_TEST(UpperTrs, SolvesTriangularSystemUsingAdvancedApplyMixedComplex) { using other_value_type = typename TestFixture::value_type; - using Scalar = - gko::matrix::Dense>; + using Scalar = gko::matrix::Dense>; using Mtx = gko::to_complex; using value_type = typename Mtx::value_type; auto alpha = gko::initialize({2.0}, this->exec); diff --git a/test/matrix/csr_kernels2.cpp b/test/matrix/csr_kernels2.cpp index 9b3f09a13fc..27c4a5a9494 100644 --- a/test/matrix/csr_kernels2.cpp +++ b/test/matrix/csr_kernels2.cpp @@ -34,7 +34,7 @@ class Csr : public CommonTestFixture { protected: using Arr = gko::array; using Vec = gko::matrix::Dense; - using Vec2 = gko::matrix::Dense>; + using Vec2 = gko::matrix::Dense>; using Mtx = gko::matrix::Csr; using ComplexVec = gko::matrix::Dense>; using ComplexMtx = gko::matrix::Csr>; diff --git a/test/matrix/matrix.cpp b/test/matrix/matrix.cpp index 0b06f76df85..98025d9a3a8 100644 --- a/test/matrix/matrix.cpp +++ b/test/matrix/matrix.cpp @@ -557,7 +557,7 @@ class Matrix : public CommonTestFixture { using Mtx = typename T::matrix_type; using index_type = typename Mtx::index_type; using value_type = typename Mtx::value_type; - using mixed_value_type = gko::next_precision; + using mixed_value_type = gko::next_precision_base; using Vec = gko::matrix::Dense; using MixedVec = gko::matrix::Dense; diff --git a/test/mpi/matrix.cpp b/test/mpi/matrix.cpp index 88fe4092668..85e0a43d146 100644 --- a/test/mpi/matrix.cpp +++ b/test/mpi/matrix.cpp @@ -733,7 +733,7 @@ TYPED_TEST(Matrix, CanConvertToNextPrecision) using csr = typename TestFixture::local_matrix_type; using local_index_type = typename TestFixture::local_index_type; using global_index_type = typename TestFixture::global_index_type; - using OtherT = typename gko::next_precision; + using OtherT = typename gko::next_precision_base; using OtherDist = typename gko::experimental::distributed::Matrix< OtherT, local_index_type, global_index_type>; auto tmp = OtherDist::create(this->ref, this->comm); @@ -759,7 +759,7 @@ TYPED_TEST(Matrix, CanMoveToNextPrecision) using csr = typename TestFixture::local_matrix_type; using local_index_type = typename TestFixture::local_index_type; using global_index_type = typename TestFixture::global_index_type; - using OtherT = typename gko::next_precision; + using OtherT = typename gko::next_precision_base; using OtherDist = typename gko::experimental::distributed::Matrix< OtherT, local_index_type, global_index_type>; auto tmp = OtherDist::create(this->ref, this->comm); diff --git a/test/mpi/solver/solver.cpp b/test/mpi/solver/solver.cpp index be9f6865c86..80142e2e947 100644 --- a/test/mpi/solver/solver.cpp +++ b/test/mpi/solver/solver.cpp @@ -45,7 +45,7 @@ template struct SimpleSolverTest { using solver_type = SolverType; using value_type = typename solver_type::value_type; - using mixed_value_type = gko::next_precision; + using mixed_value_type = gko::next_precision_base; using local_index_type = gko::int32; using global_index_type = gko::int64; using dist_matrix_type = @@ -229,7 +229,7 @@ class Solver : public CommonMpiTestFixture { using local_index_type = typename T::local_index_type; using global_index_type = typename T::global_index_type; using value_type = typename T::value_type; - using mixed_value_type = gko::next_precision; + using mixed_value_type = gko::next_precision_base; using Vec = typename T::dist_vector_type; using LocalVec = typename T::non_dist_vector_type; using MixedVec = typename T::mixed_dist_vector_type; diff --git a/test/mpi/vector.cpp b/test/mpi/vector.cpp index cedd483b0a2..53990650ed7 100644 --- a/test/mpi/vector.cpp +++ b/test/mpi/vector.cpp @@ -839,7 +839,7 @@ TYPED_TEST(VectorLocalOps, AdvancedApplyNotSupported) TYPED_TEST(VectorLocalOps, ConvertsToPrecision) { using T = typename TestFixture::value_type; - using OtherT = typename gko::next_precision; + using OtherT = typename gko::next_precision_base; using OtherVector = typename gko::experimental::distributed::Vector; auto local_tmp = OtherVector::local_vector_type::create(this->exec); auto tmp = OtherVector::create(this->exec, this->comm); @@ -855,7 +855,7 @@ TYPED_TEST(VectorLocalOps, ConvertsToPrecision) TYPED_TEST(VectorLocalOps, MovesToPrecision) { using T = typename TestFixture::value_type; - using OtherT = typename gko::next_precision; + using OtherT = typename gko::next_precision_base; using OtherVector = typename gko::experimental::distributed::Vector; auto local_tmp = OtherVector::local_vector_type::create(this->exec); auto tmp = OtherVector::create(this->exec, this->comm); diff --git a/test/solver/solver.cpp b/test/solver/solver.cpp index 47414f83041..57e93295940 100644 --- a/test/solver/solver.cpp +++ b/test/solver/solver.cpp @@ -520,7 +520,7 @@ class Solver : public CommonTestFixture { using Precond = typename T::precond_type; using Mtx = typename T::matrix_type; using value_type = typename Mtx::value_type; - using mixed_value_type = gko::next_precision; + using mixed_value_type = gko::next_precision_base; using Vec = gko::matrix::Dense; using MixedVec = gko::matrix::Dense;