Skip to content

Commit

Permalink
Small fix after rebasing
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzgoebel committed Sep 16, 2022
1 parent f600377 commit 4bdb541
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions include/ginkgo/core/reorder/mc64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class Mc64 : public EnablePolymorphicObject<Mc64<ValueType, IndexType>,
*
* @return the permutation (permutation matrix)
*/
std::shared_ptr<const LinOp> get_permutation() const override
std::shared_ptr<const PermutationMatrix> get_permutation() const
{
return permutation_;
}
Expand All @@ -133,7 +133,7 @@ class Mc64 : public EnablePolymorphicObject<Mc64<ValueType, IndexType>,
*
* @return the inverse permutation (permutation matrix)
*/
std::shared_ptr<const LinOp> get_inverse_permutation() const override
std::shared_ptr<const PermutationMatrix> get_inverse_permutation() const
{
return inv_permutation_;
}
Expand Down
12 changes: 4 additions & 8 deletions reference/test/reorder/mc64_kernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,8 @@ TYPED_TEST(Mc64, CreatesCorrectPermutationAndScalingExampleSum)
.on(this->ref);
auto mc64 = mc64_factory->generate(this->mtx);

auto perm = gko::as<permutation_type>(mc64->get_permutation())
->get_const_permutation();
auto inv_perm = gko::as<permutation_type>(mc64->get_inverse_permutation())
->get_const_permutation();
auto perm = mc64->get_permutation()->get_const_permutation();
auto inv_perm = mc64->get_inverse_permutation()->get_const_permutation();
GKO_ASSERT_EQ(perm[0], 1);
GKO_ASSERT_EQ(perm[1], 0);
GKO_ASSERT_EQ(perm[2], 5);
Expand Down Expand Up @@ -303,10 +301,8 @@ TYPED_TEST(Mc64, CreatesCorrectPermutationAndScalingExampleProduct)
.on(this->ref);
auto mc64 = mc64_factory->generate(this->mtx);

auto perm = gko::as<permutation_type>(mc64->get_permutation())
->get_const_permutation();
auto inv_perm = gko::as<permutation_type>(mc64->get_inverse_permutation())
->get_const_permutation();
auto perm = mc64->get_permutation()->get_const_permutation();
auto inv_perm = mc64->get_inverse_permutation()->get_const_permutation();
auto row_scaling = mc64->get_row_scaling()->get_const_values();
auto col_scaling = mc64->get_col_scaling()->get_const_values();

Expand Down

0 comments on commit 4bdb541

Please sign in to comment.