Skip to content

Commit ddfafc9

Browse files
committed
Move definition of range::all shorthand into utils.hpp
1 parent 5641282 commit ddfafc9

File tree

4 files changed

+3
-9
lines changed

4 files changed

+3
-9
lines changed

c++/cppdlr/dlr_build.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include <numbers>
2121

2222
using namespace std;
23-
using namespace nda;
23+
using nda::range;
2424

2525
using std::numbers::pi;
2626

@@ -164,8 +164,6 @@ namespace cppdlr {
164164
std::tuple<double, double> geterr_k_it(fineparams &fine, nda::vector_const_view<double> t, nda::vector_const_view<double> om,
165165
nda::matrix_const_view<double> kmat) {
166166

167-
auto _ = range::all;
168-
169167
int nt = fine.nt;
170168
int nom = fine.nom;
171169
int p = fine.p;

c++/cppdlr/dlr_imtime.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727

2828
namespace cppdlr {
2929

30-
static constexpr auto _ = nda::range::all;
31-
3230
/**
3331
* Option for ordinary or time-ordered convolution
3432
*/

c++/cppdlr/utils.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
namespace cppdlr {
2323
using dcomplex = std::complex<double>;
2424

25+
static constexpr auto _ = nda::range::all;
26+
2527
/**
2628
* Calculate the squared norm of a vector
2729
*

test/c++/pivrgs.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ using namespace nda;
2828
*/
2929
TEST(pivrgs, pivrgs_real) {
3030

31-
auto _ = nda::range::all;
32-
3331
// Matrix size and rank cutoff tolerance
3432
int m = 50;
3533
int n = 40;
@@ -107,8 +105,6 @@ TEST(pivrgs, pivrgs_real) {
107105
*/
108106
TEST(pivrgs, pivrgs_cplx) {
109107

110-
auto _ = nda::range::all;
111-
112108
// Matrix size and rank cutoff tolerance
113109
int m = 50;
114110
int n = 40;

0 commit comments

Comments
 (0)