Skip to content

Commit

Permalink
Use static_cast<double> instead of 1. *
Browse files Browse the repository at this point in the history
  • Loading branch information
kliegeois committed Sep 26, 2022
1 parent 0b16cb0 commit 81c8e14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion batched/sparse/src/KokkosBatched_Krylov_Handle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class KrylovHandle {
iteration_numbers = IntViewType("", batched_size);
Kokkos::deep_copy(iteration_numbers, -1);

n_teams = ceil(1. * batched_size / N_team);
n_teams = ceil(static_cast<double>(batched_size) / N_team);
first_index = IntViewType("", n_teams);
last_index = IntViewType("", n_teams);

Expand Down
3 changes: 2 additions & 1 deletion batched/sparse/unit_test/Test_Batched_TeamVectorSpmv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ struct Functor_TestBatchedTeamVectorSpmv {
std::string name = name_region + name_value_type;
Kokkos::Profiling::pushRegion(name.c_str());
Kokkos::TeamPolicy<DeviceType, ParamTagType> policy(
ceil(1. * _D.extent(0) / _N_team), Kokkos::AUTO(), Kokkos::AUTO());
ceil(static_cast<double>(_D.extent(0)) / _N_team), Kokkos::AUTO(),
Kokkos::AUTO());
Kokkos::parallel_for(name.c_str(), policy, *this);
Kokkos::Profiling::popRegion();
}
Expand Down

0 comments on commit 81c8e14

Please sign in to comment.