Skip to content

Commit

Permalink
Update test_install.
Browse files Browse the repository at this point in the history
  • Loading branch information
pratikvn committed Oct 20, 2020
1 parent ccdc833 commit 48c9e61
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion core/base/allocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class ExecutorAllocator {
*/
T *allocate(std::size_t n) const
{
return exec_->get_mem_space()->alloc<T>(n);
return exec_->get_mem_space()->template alloc<T>(n);
}

/**
Expand Down
8 changes: 4 additions & 4 deletions examples/papi-logging/papi-logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ int main(int argc, char *argv[])
std::cout << gko::version_info::get() << std::endl;

if (argc == 2 && (std::string(argv[1]) == "--help")) {
std::cerr << "Usage: " << argv[0] << " [executor]"
<< std::endl;
std::cerr << "Usage: " << argv[0] << " [executor]" << std::endl;
std::exit(-1);
}

Expand Down Expand Up @@ -192,8 +191,9 @@ int main(int argc, char *argv[])

// Create a PAPI logger and add it to relevant LinOps
auto logger = gko::log::Papi<ValueType>::create(
exec, gko::log::Logger::linop_apply_completed_mask |
gko::log::Logger::linop_advanced_apply_completed_mask);
exec, exec->get_mem_space(),
gko::log::Logger::linop_apply_completed_mask |
gko::log::Logger::linop_advanced_apply_completed_mask);
solver->add_logger(logger);
A->add_logger(logger);

Expand Down
22 changes: 12 additions & 10 deletions test_install/test_install.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,23 +183,25 @@ int main(int, char **)

// core/log/convergence.hpp
{
auto test = gko::log::Convergence<>::create(refExec);
auto test =
gko::log::Convergence<>::create(refExec, refExec->get_mem_space());
}

// core/log/record.hpp
{
auto test = gko::log::executor_data{};
auto test = gko::log::memory_space_data{};
}

// core/log/stream.hpp
{
auto test = gko::log::Stream<>::create(refExec);
auto test =
gko::log::Stream<>::create(refExec, refExec->get_mem_space());
}

#if GKO_HAVE_PAPI_SDE
// core/log/papi.hpp
{
auto test = gko::log::Papi<>::create(refExec);
auto test = gko::log::Papi<>::create(refExec, refExec->get_mem_space());
}
#endif // GKO_HAVE_PAPI_SDE

Expand Down Expand Up @@ -357,13 +359,13 @@ int main(int, char **)
.with_reduction_factor(1e-10)
.on(refExec);

auto rel_res = gko::stop::RelativeResidualNorm<>::build()
.with_tolerance(1e-10)
.on(refExec);
auto rel_res =
gko::stop::RelativeResidualNorm<>::build().with_tolerance(1e-10).on(
refExec);

auto abs_res = gko::stop::AbsoluteResidualNorm<>::build()
.with_tolerance(1e-10)
.on(refExec);
auto abs_res =
gko::stop::AbsoluteResidualNorm<>::build().with_tolerance(1e-10).on(
refExec);

// stopping_status.hpp
auto stop_status = gko::stopping_status{};
Expand Down
18 changes: 8 additions & 10 deletions test_install/test_install_cuda.cu
Original file line number Diff line number Diff line change
Expand Up @@ -187,23 +187,23 @@ int main(int, char **)

// core/log/convergence.hpp
{
gko::log::Convergence<>::create(cudaExec);
gko::log::Convergence<>::create(cudaExec, cudaExec->get_mem_space());
}

// core/log/record.hpp
{
gko::log::executor_data{};
gko::log::memory_space_data{};
}

// core/log/stream.hpp
{
gko::log::Stream<>::create(cudaExec);
gko::log::Stream<>::create(cudaExec, cudaExec->get_mem_space());
}

#if GKO_HAVE_PAPI_SDE
// core/log/papi.hpp
{
gko::log::Papi<>::create(cudaExec);
gko::log::Papi<>::create(cudaExec, cudaExec->get_mem_space());
}
#endif // GKO_HAVE_PAPI_SDE

Expand Down Expand Up @@ -349,13 +349,11 @@ int main(int, char **)
.with_reduction_factor(1e-10)
.on(cudaExec);

gko::stop::RelativeResidualNorm<>::build()
.with_tolerance(1e-10)
.on(cudaExec);
gko::stop::RelativeResidualNorm<>::build().with_tolerance(1e-10).on(
cudaExec);

gko::stop::AbsoluteResidualNorm<>::build()
.with_tolerance(1e-10)
.on(cudaExec);
gko::stop::AbsoluteResidualNorm<>::build().with_tolerance(1e-10).on(
cudaExec);

// stopping_status.hpp
gko::stopping_status{};
Expand Down

0 comments on commit 48c9e61

Please sign in to comment.