diff --git a/include/isaac/array.h b/include/isaac/array.h index 4f9794e3d..7abda23b6 100644 --- a/include/isaac/array.h +++ b/include/isaac/array.h @@ -91,8 +91,6 @@ public: //Indexing (2D) view operator()(slice const &, slice const &); - view operator()(int_t, slice const &); - view operator()(slice const &, int_t); protected: @@ -115,7 +113,7 @@ class ISAACAPI view : public array public: view(array& data, slice const & s1); view(array& data, slice const & s1, slice const & s2); - view(array& data, slice const & s1, slice const & s2, int_t ld); + using array::operator=; }; class ISAACAPI scalar : public array diff --git a/include/isaac/types.h b/include/isaac/types.h index 15932ee31..dfe2875ee 100644 --- a/include/isaac/types.h +++ b/include/isaac/types.h @@ -33,6 +33,7 @@ static const int_t start = 0; static const int_t end = -1; struct slice { + slice(int_t _start) : start(_start), end(_start + 1), stride(1){} slice(int_t _start, int_t _end, int_t _stride = 1) : start(_start), end(_end), stride(_stride) { } int_t size(int_t bound) const diff --git a/lib/array.cpp b/lib/array.cpp index 0038a8011..062012725 100644 --- a/lib/array.cpp +++ b/lib/array.cpp @@ -315,12 +315,6 @@ view array::operator[](slice const & e1) view array::operator()(slice const & s1, slice const & s2) { return view(*this, s1, s2); } -view array::operator()(int_t x, slice const & s) -{ return (*this)({x, x+1}, s); } - -view array::operator()(slice const & s, int_t x) -{ return (*this)(s, {x, x+1}); } - //--------------------------------------- /*--- View ---*/ view::view(array& data, slice const & s1) : array(data, s1) {} diff --git a/lib/kernels/templates/tools/arguments.hpp b/lib/kernels/templates/tools/arguments.hpp index 2b189d941..10a59c297 100644 --- a/lib/kernels/templates/tools/arguments.hpp +++ b/lib/kernels/templates/tools/arguments.hpp @@ -71,7 +71,7 @@ public: //scalar if(a->shape()[0]==1 && a->shape()[1]==1) { - kernel_.setSizeArg(current_arg_++, a->start()[0]); + kernel_.setSizeArg(current_arg_++, a->start()[0] + a->start()[1]*a->ld()); } //array else if(a->shape()[0]>1 && a->shape()[1]==1)