Skip to content

Commit

Permalink
Remove HPX_FALLTHROUGH
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenrbrandt committed Apr 6, 2022
1 parent 5c6e542 commit e458a3c
Show file tree
Hide file tree
Showing 66 changed files with 926 additions and 926 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ namespace phylanx { namespace execution_tree { namespace detail
case 1:
return extract_numeric_value_dimensions(indices, name, codename)[0];

case 3: HPX_FALLTHROUGH;
case 3: [[fallthrough]];
case 2:
break;
}
Expand Down
4 changes: 2 additions & 2 deletions phylanx/execution_tree/primitives/slice_node_data_0d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ namespace phylanx { namespace execution_tree
detail::slice_assign_scalar<T>{rhs}, name, codename, ctx);
}

case 1: HPX_FALLTHROUGH;
case 2: HPX_FALLTHROUGH;
case 1: [[fallthrough]];
case 2: [[fallthrough]];
default:
break;
}
Expand Down
8 changes: 4 additions & 4 deletions phylanx/execution_tree/primitives/slice_node_data_1d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ namespace phylanx { namespace execution_tree
{
switch (value.num_dimensions())
{
case 0: HPX_FALLTHROUGH;
case 0: [[fallthrough]];
case 1:
{
auto v = data.vector();
Expand All @@ -418,7 +418,7 @@ namespace phylanx { namespace execution_tree
detail::slice_assign_vector<T>{rhs}, name, codename, ctx);
}

case 2: HPX_FALLTHROUGH;
case 2: [[fallthrough]];
default:
break;
}
Expand All @@ -440,7 +440,7 @@ namespace phylanx { namespace execution_tree
{
switch (value.num_dimensions())
{
case 0: HPX_FALLTHROUGH;
case 0: [[fallthrough]];
case 1:
{
if (valid(rows))
Expand All @@ -459,7 +459,7 @@ namespace phylanx { namespace execution_tree
}
break;

case 2: HPX_FALLTHROUGH;
case 2: [[fallthrough]];
default:
break;
}
Expand Down
8 changes: 4 additions & 4 deletions phylanx/execution_tree/primitives/slice_node_data_2d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1373,8 +1373,8 @@ namespace phylanx { namespace execution_tree
{
switch (value.num_dimensions())
{
case 0: HPX_FALLTHROUGH;
case 1: HPX_FALLTHROUGH;
case 0: [[fallthrough]];
case 1: [[fallthrough]];
case 2:
{
auto m = data.matrix();
Expand Down Expand Up @@ -1424,8 +1424,8 @@ namespace phylanx { namespace execution_tree
{
switch (value.num_dimensions())
{
case 0: HPX_FALLTHROUGH;
case 1: HPX_FALLTHROUGH;
case 0: [[fallthrough]];
case 1: [[fallthrough]];
case 2:
{
auto m = data.matrix();
Expand Down
10 changes: 5 additions & 5 deletions phylanx/ir/node_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,26 +240,26 @@ namespace phylanx { namespace ir

switch (dims)
{
case storage0d: HPX_FALLTHROUGH;
case storage0d: [[fallthrough]];
case custom_storage0d:
return storage_type(d.scalar());

case storage1d: HPX_FALLTHROUGH;
case storage1d: [[fallthrough]];
case custom_storage1d:
increment_copy_construction_count();
return storage_type(d.vector());

case storage2d: HPX_FALLTHROUGH;
case storage2d: [[fallthrough]];
case custom_storage2d:
increment_copy_construction_count();
return storage_type(d.matrix());

case storage3d: HPX_FALLTHROUGH;
case storage3d: [[fallthrough]];
case custom_storage3d:
increment_copy_construction_count();
return storage_type(d.tensor());

case storage4d: HPX_FALLTHROUGH;
case storage4d: [[fallthrough]];
case custom_storage4d:
increment_copy_construction_count();
return storage_type(d.quatern());
Expand Down
2 changes: 1 addition & 1 deletion phylanx/plugins/arithmetics/cumulative_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ namespace phylanx { namespace execution_tree { namespace primitives
return this_->template cumulative_helper<std::int64_t>(
std::move(ops), std::move(axis));

case node_data_type_unknown: HPX_FALLTHROUGH;
case node_data_type_unknown: [[fallthrough]];
case node_data_type_double:
return this_->template cumulative_helper<double>(
std::move(ops), std::move(axis));
Expand Down
4 changes: 2 additions & 2 deletions phylanx/plugins/arithmetics/numeric_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ namespace phylanx { namespace execution_tree { namespace primitives
.template handle_numeric_operands_helper<std::int64_t>(
std::move(op1), std::move(op2));

case node_data_type_unknown: HPX_FALLTHROUGH;
case node_data_type_unknown: [[fallthrough]];
case node_data_type_double:
return derived().template handle_numeric_operands_helper<double>(
std::move(op1), std::move(op2));
Expand Down Expand Up @@ -469,7 +469,7 @@ namespace phylanx { namespace execution_tree { namespace primitives
.template handle_numeric_operands_helper<std::int64_t>(
std::move(ops));

case node_data_type_unknown: HPX_FALLTHROUGH;
case node_data_type_unknown: [[fallthrough]];
case node_data_type_double:
return derived().template handle_numeric_operands_helper<double>(
std::move(ops));
Expand Down
10 changes: 5 additions & 5 deletions phylanx/plugins/common/argminmax_nd_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,14 +375,14 @@ namespace phylanx { namespace common {
{
// Option 2: Find min/max among rows
case -2:
HPX_FALLTHROUGH;
[[fallthrough]];
case 0:
return argminmax2d_0_axis<Operation>(
std::move(arg), value, name, codename);

// Option 3: Find min/max among columns
case -1:
HPX_FALLTHROUGH;
[[fallthrough]];
case 1:
return argminmax2d_1_axis<Operation>(
std::move(arg), value, name, codename);
Expand Down Expand Up @@ -601,21 +601,21 @@ namespace phylanx { namespace common {
{
// Option 1: Find min/max among pages
case -3:
HPX_FALLTHROUGH;
[[fallthrough]];
case 0:
return argminmax3d_0_axis<Operation>(
std::move(arg), name, codename);

// Option 2: Find min/max among rows
case -2:
HPX_FALLTHROUGH;
[[fallthrough]];
case 1:
return argminmax3d_1_axis<Operation>(
std::move(arg), name, codename);

// Option 3: Find min/max among columns
case -1:
HPX_FALLTHROUGH;
[[fallthrough]];
case 2:
return argminmax3d_2_axis<Operation>(
std::move(arg), name, codename);
Expand Down
30 changes: 15 additions & 15 deletions phylanx/plugins/common/statistics_nd_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,13 +392,13 @@ namespace phylanx { namespace common {
switch (axis.value())
{
case -2:
HPX_FALLTHROUGH;
[[fallthrough]];
case 0:
return statistics2d_axis0<Op>(std::move(arg), keepdims,
initial, name, codename, std::move(ctx));

case -1:
HPX_FALLTHROUGH;
[[fallthrough]];
case 1:
return statistics2d_axis1<Op>(std::move(arg), keepdims,
initial, name, codename, std::move(ctx));
Expand Down Expand Up @@ -687,19 +687,19 @@ namespace phylanx { namespace common {
switch (axis.value())
{
case -3:
HPX_FALLTHROUGH;
[[fallthrough]];
case 0:
return statistics3d_axis0<Op>(std::move(arg), keepdims,
initial, name, codename, std::move(ctx));

case -2:
HPX_FALLTHROUGH;
[[fallthrough]];
case 1:
return statistics3d_axis1<Op>(std::move(arg), keepdims,
initial, name, codename, std::move(ctx));

case -1:
HPX_FALLTHROUGH;
[[fallthrough]];
case 2:
return statistics3d_axis2<Op>(std::move(arg), keepdims,
initial, name, codename, std::move(ctx));
Expand Down Expand Up @@ -915,7 +915,7 @@ namespace phylanx { namespace common {
std::move(ctx));

case execution_tree::node_data_type_unknown:
HPX_FALLTHROUGH;
[[fallthrough]];
case execution_tree::node_data_type_double:
return statistics3d_slice<Op>(
extract_numeric_value(std::move(arg), name, codename),
Expand Down Expand Up @@ -1343,7 +1343,7 @@ namespace phylanx { namespace common {
std::move(ctx));

case execution_tree::node_data_type_unknown:
HPX_FALLTHROUGH;
[[fallthrough]];
case execution_tree::node_data_type_double:
return statistics4d_slice<Op>(
extract_numeric_value(std::move(arg), name, codename),
Expand Down Expand Up @@ -1613,7 +1613,7 @@ namespace phylanx { namespace common {
codename, std::move(ctx));

case execution_tree::node_data_type_unknown:
HPX_FALLTHROUGH;
[[fallthrough]];
case execution_tree::node_data_type_double:
return statistics4d_tensor<Op>(
execution_tree::extract_numeric_value(
Expand Down Expand Up @@ -2009,25 +2009,25 @@ namespace phylanx { namespace common {
switch (axis.value())
{
case -4:
HPX_FALLTHROUGH;
[[fallthrough]];
case 0:
return statistics4d_axis0<Op>(std::move(arg), keepdims,
initial, name, codename, std::move(ctx));

case -3:
HPX_FALLTHROUGH;
[[fallthrough]];
case 1:
return statistics4d_axis1<Op>(std::move(arg), keepdims,
initial, name, codename, std::move(ctx));

case -2:
HPX_FALLTHROUGH;
[[fallthrough]];
case 2:
return statistics4d_axis2<Op>(std::move(arg), keepdims,
initial, name, codename, std::move(ctx));

case -1:
HPX_FALLTHROUGH;
[[fallthrough]];
case 3:
return statistics4d_axis3<Op>(std::move(arg), keepdims,
initial, name, codename, std::move(ctx));
Expand Down Expand Up @@ -2126,7 +2126,7 @@ namespace phylanx { namespace common {
std::move(ctx));

case execution_tree::node_data_type_unknown:
HPX_FALLTHROUGH;
[[fallthrough]];
case execution_tree::node_data_type_double:
return detail::statisticsnd<Op>(
extract_numeric_value(std::move(arg), name, codename), axis,
Expand Down Expand Up @@ -2222,7 +2222,7 @@ namespace phylanx { namespace common {
std::move(initial), name, codename, std::move(ctx));

case execution_tree::node_data_type_unknown:
HPX_FALLTHROUGH;
[[fallthrough]];
case execution_tree::node_data_type_double:
return detail::statisticsnd<Op>(
execution_tree::extract_numeric_value(
Expand Down Expand Up @@ -2320,7 +2320,7 @@ namespace phylanx { namespace common {
std::move(ctx));

case execution_tree::node_data_type_unknown:
HPX_FALLTHROUGH;
[[fallthrough]];
case execution_tree::node_data_type_double:
return statisticsnd_flat<Op>(
execution_tree::extract_numeric_value(
Expand Down
4 changes: 2 additions & 2 deletions phylanx/plugins/dist_matrixops/dist_argminmax_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ namespace phylanx { namespace dist_matrixops { namespace primitives {
return primitive_argument_type(
Op::template initial<std::int64_t>());

case node_data_type_double: HPX_FALLTHROUGH;
case node_data_type_double: [[fallthrough]];
case node_data_type_unknown:
return primitive_argument_type(Op::template initial<double>());

Expand Down Expand Up @@ -131,7 +131,7 @@ namespace phylanx { namespace dist_matrixops { namespace primitives {
blaze::DynamicVector<std::int64_t>(
size, Op::template initial<std::int64_t>()));

case node_data_type_double: HPX_FALLTHROUGH;
case node_data_type_double: [[fallthrough]];
case node_data_type_unknown:
return primitive_argument_type(blaze::DynamicVector<double>(
size, Op::template initial<double>()));
Expand Down
14 changes: 7 additions & 7 deletions python/src/bindings/type_casters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -917,10 +917,10 @@ namespace pybind11 { namespace detail

// blaze::CustomVector<T>, blaze::CustomMatrix<T>,
// blaze::CustomTensor<T>, blaze::CustomArray<4, T>
case phylanx::ir::node_data<T>::custom_storage1d: HPX_FALLTHROUGH;
case phylanx::ir::node_data<T>::custom_storage2d: HPX_FALLTHROUGH;
case phylanx::ir::node_data<T>::custom_storage3d: HPX_FALLTHROUGH;
case phylanx::ir::node_data<T>::custom_storage4d: HPX_FALLTHROUGH;
case phylanx::ir::node_data<T>::custom_storage1d: [[fallthrough]];
case phylanx::ir::node_data<T>::custom_storage2d: [[fallthrough]];
case phylanx::ir::node_data<T>::custom_storage3d: [[fallthrough]];
case phylanx::ir::node_data<T>::custom_storage4d: [[fallthrough]];
default:
throw cast_error("cast_impl_reference_internal: "
"unexpected node_data type: should not happen!");
Expand All @@ -945,7 +945,7 @@ namespace pybind11 { namespace detail

switch (policy)
{
case return_value_policy::take_ownership: HPX_FALLTHROUGH;
case return_value_policy::take_ownership: [[fallthrough]];
case return_value_policy::automatic:
return cast_impl_automatic(src);

Expand All @@ -955,7 +955,7 @@ namespace pybind11 { namespace detail
case return_value_policy::copy:
return cast_impl_copy(src);

case return_value_policy::reference: HPX_FALLTHROUGH;
case return_value_policy::reference: [[fallthrough]];
case return_value_policy::automatic_reference:
return cast_impl_automatic_reference(src);

Expand Down Expand Up @@ -1210,7 +1210,7 @@ namespace pybind11 { namespace detail
case 2: // arg_pair_type
return list_caster_type::cast(src->copy(), policy, parent);

case 0: HPX_FALLTHROUGH; // int_range_type
case 0: [[fallthrough]]; // int_range_type
default:
throw cast_error(
"cast_impl: unexpected range type: should not happen!");
Expand Down
8 changes: 4 additions & 4 deletions python/src/bindings/variable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,10 @@ namespace phylanx { namespace execution_tree
}
break;

case 'c': HPX_FALLTHROUGH; // complex floating-point
case 'm': HPX_FALLTHROUGH; // timedelta
case 'M': HPX_FALLTHROUGH; // datetime
case 'U': HPX_FALLTHROUGH; // Unicode
case 'c': [[fallthrough]]; // complex floating-point
case 'm': [[fallthrough]]; // timedelta
case 'M': [[fallthrough]]; // datetime
case 'U': [[fallthrough]]; // Unicode
case 'V': // void
{
HPX_THROW_EXCEPTION(hpx::bad_parameter,
Expand Down
Loading

0 comments on commit e458a3c

Please sign in to comment.