Skip to content

Commit

Permalink
BinSort, BinOp1D, BinOp3D: mark default constructor as deleted (k…
Browse files Browse the repository at this point in the history
…okkos#6131)

* remove default constructor for binsort classes

* make default constr as deleted

* Per group meeting, preserve defaulkt constructors when deprecated code 4 is enabled

* Annotate default constructors as deprecated

Co-authored-by: Daniel Arndt <arndtd@ornl.gov>

---------

Co-authored-by: Damien L-G <dalg24@gmail.com>
Co-authored-by: Damien L-G <dalg24+github@gmail.com>
Co-authored-by: Daniel Arndt <arndtd@ornl.gov>
  • Loading branch information
4 people committed May 24, 2023
1 parent 31a5f21 commit f8a2a80
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions algorithms/src/Kokkos_Sort.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,11 @@ class BinSort {
bool sort_within_bins;

public:
BinSort() = default;
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE_4
KOKKOS_DEPRECATED BinSort() = default;
#else
BinSort() = delete;
#endif

//----------------------------------------
// Constructor: takes the keys, the binning_operator and optionally whether to
Expand Down Expand Up @@ -495,7 +499,11 @@ struct BinOp1D {
double mul_ = {};
double min_ = {};

BinOp1D() = default;
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE_4
KOKKOS_DEPRECATED BinOp1D() = default;
#else
BinOp1D() = delete;
#endif

// Construct BinOp with number of bins, minimum value and maximum value
BinOp1D(int max_bins__, typename KeyViewType::const_value_type min,
Expand Down Expand Up @@ -539,7 +547,11 @@ struct BinOp3D {
double mul_[3] = {};
double min_[3] = {};

BinOp3D() = default;
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE_4
KOKKOS_DEPRECATED BinOp3D() = default;
#else
BinOp3D() = delete;
#endif

BinOp3D(int max_bins__[], typename KeyViewType::const_value_type min[],
typename KeyViewType::const_value_type max[]) {
Expand Down

0 comments on commit f8a2a80

Please sign in to comment.