1 #ifndef VIENNACL_SLICE_HPP_
2 #define VIENNACL_SLICE_HPP_
37 template<
typename SizeT ,
51 size_type size_arg) : start_(start_index), stride_(stride_arg), size_(size_arg) {}
61 return start_ + i * stride_;
65 bool operator==(
const basic_slice & s)
const {
return (start_ == s.start_) && (stride_ == s.stride_) && (size_ == s.size_); }
bool operator==(const basic_slice &s) const
const_reference operator[](size_type i) const
bool operator!=(const basic_slice &s) const
This file provides the forward declarations for the main types used within ViennaCL.
basic_slice(size_type start_index, size_type stride_arg, size_type size_arg)
const_reference operator()(size_type i) const
const_reference reference
DistanceT difference_type
value_type const_reference
A slice class that refers to an interval [start, stop), where 'start' is included, and 'stop' is excluded.