Skip to content

Commit

Permalink
Sacado: The dreaded "const-lambda-capture" gcc compiler bug strikes a…
Browse files Browse the repository at this point in the history
…gain!

Also fix some unused typedef warnings.
  • Loading branch information
etphipp committed May 20, 2020
1 parent d00bec0 commit 5d606fe
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 14 deletions.
4 changes: 2 additions & 2 deletions packages/sacado/test/performance/advection/advection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ void run_analytic_team(const FluxView& flux, const WgbView& wgb,

const size_t num_cells = wgb.extent(0);
const int num_basis = wgb.extent(1);
const int num_points = wgb.extent(2);
const int num_dim = wgb.extent(3);
/*const*/ int num_points = wgb.extent(2);
/*const*/ int num_dim = wgb.extent(3);

const size_t bytes = 2*tmp_scratch_type::shmem_size();
policy_type policy(num_cells,num_basis,32);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ void run_fad_hierarchical_flat(const FluxView& flux, const WgbView& wgb,
const ResidualView& residual)
{
typedef typename ResidualView::execution_space execution_space;
typedef typename ResidualView::non_const_value_type scalar_type;
typedef typename Kokkos::ThreadLocalScalarType<ResidualView>::type local_scalar_type;
typedef Kokkos::TeamPolicy<execution_space> policy_type;
typedef typename policy_type::member_type team_member;
Expand Down Expand Up @@ -83,7 +82,6 @@ void run_fad_hierarchical_team(const FluxView& flux, const WgbView& wgb,
const ResidualView& residual)
{
typedef typename ResidualView::execution_space execution_space;
typedef typename ResidualView::non_const_value_type scalar_type;
typedef typename Kokkos::ThreadLocalScalarType<ResidualView>::type local_scalar_type;
typedef Kokkos::TeamPolicy<execution_space> policy_type;
typedef typename policy_type::member_type team_member;
Expand Down
2 changes: 0 additions & 2 deletions packages/sacado/test/performance/advection/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,6 @@ void check_residual(const FluxView& flux, const WgbView& wgb,
const SrcView& src, const WbsView& wbs,
const ResidualView& residual)
{
typedef typename ResidualView::execution_space execution_space;

// Generate gold residual
auto residual_gold = compute_gold_residual(flux, wgb, src, wbs);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ void run_analytic_team(const FluxView& flux, const WgbView& wgb,

const size_t num_cells = wgb.extent(0);
const int num_basis = wgb.extent(1);
const int num_points = wgb.extent(2);
const int num_dim = wgb.extent(3);
/*const*/ int num_points = wgb.extent(2);
/*const*/ int num_dim = wgb.extent(3);

const size_t bytes = 2*tmp_scratch_type::shmem_size();
policy_type policy(num_cells,num_basis,32);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ void run_fad_hierarchical_flat(const FluxView& flux, const WgbView& wgb,
const ResidualView& residual)
{
typedef typename ResidualView::execution_space execution_space;
typedef typename ResidualView::non_const_value_type scalar_type;
typedef typename Kokkos::ThreadLocalScalarType<ResidualView>::type local_scalar_type;
typedef Kokkos::TeamPolicy<execution_space> policy_type;
typedef typename policy_type::member_type team_member;
Expand Down Expand Up @@ -83,7 +82,6 @@ void run_fad_hierarchical_team(const FluxView& flux, const WgbView& wgb,
const ResidualView& residual)
{
typedef typename ResidualView::execution_space execution_space;
typedef typename ResidualView::non_const_value_type scalar_type;
typedef typename Kokkos::ThreadLocalScalarType<ResidualView>::type local_scalar_type;
typedef Kokkos::TeamPolicy<execution_space> policy_type;
typedef typename policy_type::member_type team_member;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,6 @@ void check_residual(const FluxView& flux, const WgbView& wgb,
const SrcView& src, const WbsView& wbs,
const ResidualView& residual)
{
typedef typename ResidualView::execution_space execution_space;

// Generate gold residual
auto residual_gold = compute_gold_residual(flux, wgb, src, wbs);

Expand Down
1 change: 0 additions & 1 deletion packages/sacado/test/performance/mat_vec/mat_vec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ template <typename ViewTypeA, typename ViewTypeB, typename ViewTypeC>
void
run_mat_vec_deriv(const ViewTypeA& A, const ViewTypeB& b, const ViewTypeC& c)
{
typedef typename ViewTypeC::value_type scalar_type;
typedef typename ViewTypeC::execution_space execution_space;

const int m = A.extent(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void run_mat_vec_hierarchical_dfad_scratch(
const size_t bytes = TmpScratchSpace::shmem_size(TeamSize,p);
Kokkos::parallel_for(
policy.set_scratch_size(0, Kokkos::PerTeam(bytes)),
KOKKOS_LAMBDA (const typename Policy::member_type& team) {
KOKKOS_LAMBDA (const team_member& team) {
const int team_rank = team.team_rank();
const int team_size = team.team_size();
TmpScratchSpace t(team.team_scratch(0), team_size, p);
Expand Down

0 comments on commit 5d606fe

Please sign in to comment.