1 #ifndef VIENNACL_RANGE_HPP_
2 #define VIENNACL_RANGE_HPP_
37 template <
typename SizeType ,
38 typename DistanceType >
49 basic_range(size_type start_index, size_type stop_index) : start_(start_index), size_(stop_index - start_index)
51 assert(start_index <= stop_index);
55 size_type
start()
const {
return start_; }
56 size_type
size()
const {
return size_; }
A range class that refers to an interval [start, stop), where 'start' is included, and 'stop' is excluded.
Definition: forwards.h:339
size_type start() const
Definition: range.hpp:55
const_reference reference
Definition: range.hpp:46
This file provides the forward declarations for the main types used within ViennaCL.
Main namespace in ViennaCL. Holds all the basic types such as vector, matrix, etc. and defines operations upon them.
Definition: cpu_ram.hpp:29
size_type size() const
Definition: range.hpp:56
bool operator==(const basic_range &r) const
Definition: range.hpp:65
size_type value_type
Definition: range.hpp:44
SizeType size_type
Definition: range.hpp:42
bool operator!=(const basic_range &r) const
Definition: range.hpp:66
DistanceType difference_type
Definition: range.hpp:43
value_type const_reference
Definition: range.hpp:45
const_reference operator[](size_type i) const
Definition: range.hpp:63
basic_range(size_type start_index, size_type stop_index)
Definition: range.hpp:49
basic_range()
Definition: range.hpp:48
const_reference operator()(size_type i) const
Definition: range.hpp:58