Stencil variant operating on a raw unsigned char array.
More...
#include <specialisations.hpp>
|
template<typename OutputStream > |
OutputStream & | operator<< (OutputStream &ostream, const Stencil< unsigned char * > &stencil) |
| Insertion operator for stencils. More...
|
|
Stencil variant operating on a raw unsigned char array.
This of course assumes the user is responsible for range checking on the unsigned char array.
TODO : generalise this for T*.
- See also
- ecl::Stencil
Definition at line 45 of file specialisations.hpp.
◆ const_reverse_iterator
◆ difference_type
◆ iterator
◆ reference
◆ reverse_iterator
◆ size_type
Uses the array's type used to denote the length of the array.
Definition at line 64 of file specialisations.hpp.
◆ value_type
◆ Stencil() [1/2]
Initialises with a pointer to the underlying array with boundary constraints.
Sets up the underlying storage container along with boundary constraints in the style of stl containers.
- Parameters
-
underlying_array | : reference to the underlying array. |
length | : of the underlying array |
begin_iter | : start of the stencil window. |
end_iter | : end of the stencil window. |
- Exceptions
-
| StandardException : throws if the indices provided are out of range [debug mode only]. |
Definition at line 86 of file specialisations.hpp.
◆ Stencil() [2/2]
ecl::Stencil< unsigned char * >::Stencil |
( |
iterator |
underlying_array, |
|
|
const unsigned int & |
length, |
|
|
const unsigned int & |
start_index = 0 , |
|
|
const unsigned int & |
n = 0 |
|
) |
| |
|
inline |
Initialises with a reference to the underlying array and boundary constraints.
Sets up the underlying storage container along with boundary constraints in the style of eigen block intialisations.
- Parameters
-
underlying_array | : reference to the underlying array. |
length | : of the underlying array |
start_index | : start of the stencil window. |
n | : number of elements to include in the window. |
- Exceptions
-
| StandardException : throws if the indices provided are out of range [debug mode only]. |
Definition at line 109 of file specialisations.hpp.
◆ ~Stencil()
◆ at() [1/2]
Accesses elements in the stencil, returning references to the requested element. This accessor always does range checks. Compare this with the [] accessor which only checks if NDEBUG is not defined.
- Parameters
-
i | : the index of the requested element. |
- Returns
- reference : a reference to the requested element.
- Exceptions
-
Definition at line 377 of file specialisations.hpp.
◆ at() [2/2]
Accesses elements in the stencil, returning references to the requested element. This accessor always does range checks. Compare this with the [] accessor which only checks if NDEBUG is not defined. This also ensures the references are constant, which in turn ensures the contents cannot of the array cannot be modified.
- Parameters
-
i | : the index of the requested element. |
- Returns
- const_reference : a const_reference to the requested element.
- Exceptions
-
Definition at line 401 of file specialisations.hpp.
◆ back() [1/2]
Generates an reference to the last element in the array.
- Returns
- reference : reference to the last element in the array.
- Exceptions
-
| StandardException : throws if the underlying array changed size and the stencil is now out of range [debug mode only]. |
Definition at line 316 of file specialisations.hpp.
◆ back() [2/2]
Generates a constant reference to the last element in the array (cannot change the value).
- Returns
- const_reference : const_reference to the last element in the array.
- Exceptions
-
| StandardException : throws if the underlying array changed size and the stencil is now out of range [debug mode only]. |
Definition at line 326 of file specialisations.hpp.
◆ begin() [1/2]
Generates a pointer (iterator) pointing to the start of the stencil.
- Returns
- iterator : points to the beginning of the stencil.
- Exceptions
-
| StandardException : throws if the underlying array changed size and the stencil is now out of range [debug mode only]. |
Definition at line 212 of file specialisations.hpp.
◆ begin() [2/2]
Generates a const pointer (iterator) pointing to the start of the array.
- Returns
- const_iterator : constant pointer (iterator) pointing to the end of the array.
- Exceptions
-
| StandardException : throws if the underlying array changed size and the stencil is now out of range [debug mode only]. |
Definition at line 222 of file specialisations.hpp.
◆ end() [1/2]
Generates an pointer (iterator) pointing to the end of the array.
- Returns
- iterator : points to the end of the array.
- Exceptions
-
| StandardException : throws if the underlying array changed size and the stencil is now out of range [debug mode only]. |
Definition at line 232 of file specialisations.hpp.
◆ end() [2/2]
Generates a const pointer (iterator) pointing to the end of the array.
- Returns
- const_iterator : constant pointer (iterator) pointing to the end of the array.
- Exceptions
-
| StandardException : throws if the underlying array changed size and the stencil is now out of range [debug mode only]. |
Definition at line 242 of file specialisations.hpp.
◆ front() [1/2]
Generates an reference to the first element in the array.
- Returns
- reference : reference to the first element in the array.
- Exceptions
-
| StandardException : throws if the underlying array changed size and the stencil is now out of range [debug mode only]. |
Definition at line 296 of file specialisations.hpp.
◆ front() [2/2]
Generates a constant reference to the first element in the array (cannot change the value).
- Returns
- const_reference : const_reference to the first element in the array.
- Exceptions
-
| StandardException : throws if the underlying array changed size and the stencil is now out of range [debug mode only]. |
Definition at line 306 of file specialisations.hpp.
◆ operator<<()
Provides a comma initialisation facility. This initiates the comma initialiser with an iterator to the underlying array and then leaves the initialiser to do the rest. The initialiser will do range checking if NDEBUG is not defined.
unsigned char buffer[4];
buffer << 0xff, 0x00, 0x01, 0x02;
- Parameters
-
value | : the first value to enter , ElementType, ArraySizeinto the array. |
- Returns
- BoundedListInitialiser : the comma initialiser mechanism.
Definition at line 178 of file specialisations.hpp.
◆ operator=()
This either resettles this stencil or copies across to it (depending on the rhs stencil).
The assignment operator has one of two effects - it will either reassign this stencil if both stencils work on the same underlying array, OR it copies across if acting on two different arrays.
- Parameters
-
- Returns
- Stencil<unsigned char*> : a handle to this stencil
- Exceptions
-
| StandardException : if copying from another stencil/array, throws if size exceeded [debug mode only]. |
- See also
- Stencil
Definition at line 195 of file specialisations.hpp.
◆ operator[]() [1/2]
Accesses elements in the stencil, returning references to the requested element. This accessor only does range checks in debug mode (NDEBUG is not defined). Compare this with the at() accessor which always checks if the range is exceeded.
- Returns
- reference : a reference to the requested element.
- Exceptions
-
| StandardException : throws if range is requested element is out of range [debug mode only]. |
Definition at line 344 of file specialisations.hpp.
◆ operator[]() [2/2]
Accesses elements in the stencil, returning references to the requested element. This accessor only does range checks in debug mode (NDEBUG is not defined). Compare this with the at() accessor which always checks if the range is exceeded. This also ensures the references are constant, which in turn ensures the contents cannot of the array cannot be modified.
- Returns
- const_reference : a constant reference to the requested element.
- Exceptions
-
| StandardException : throws if range is requested element is out of range [debug mode only]. |
Definition at line 361 of file specialisations.hpp.
◆ rbegin() [1/2]
Generates a reverse iterator pointing to the end of the array.
- Returns
- reverse_iterator : points to the end of the array.
- Exceptions
-
| StandardException : throws if the underlying array changed size and the stencil is now out of range [debug mode only]. |
Definition at line 252 of file specialisations.hpp.
◆ rbegin() [2/2]
Generates a constant reverse iterator pointing to the end of the array.
- Returns
- const_reverse_iterator : constant reverse iterator pointing to the end of the array.
- Exceptions
-
| StandardException : throws if the underlying array changed size and the stencil is now out of range [debug mode only]. |
Definition at line 262 of file specialisations.hpp.
◆ rend() [1/2]
Generates a reverse iterator pointing to the beginning of the array.
- Returns
- reverse_iterator : points to the beginning of the array.
- Exceptions
-
| StandardException : throws if the underlying array changed size and the stencil is now out of range [debug mode only]. |
Definition at line 272 of file specialisations.hpp.
◆ rend() [2/2]
Generates a constant reverse iterator pointing to the beginning of the array.
- Returns
- const_reverse_iterator : constant reverse iterator pointing to the beginning of the array.
- Exceptions
-
| StandardException : throws if the underlying array changed size and the stencil is now out of range [debug mode only]. |
Definition at line 282 of file specialisations.hpp.
◆ resettle()
void ecl::Stencil< unsigned char * >::resettle |
( |
const unsigned int & |
start_index, |
|
|
const unsigned int & |
n |
|
) |
| |
|
inline |
Resettle the stencil on a different range over the same underlying array.
Resets the range of the stencil operating on the currently referenced array. Using a starting index + size is in line with the way eigen blocks and segments work.
- Parameters
-
start_index | : start of the stencil window. |
n | : number of elements to include in the window. |
- Exceptions
-
| StandardException : throws if the indices provided are out of range [debug mode only]. |
Definition at line 153 of file specialisations.hpp.
◆ size()
The size of the stencil.
- Returns
- size_type : the size of the stencil.
Definition at line 422 of file specialisations.hpp.
◆ stencil()
Stencil<unsigned char*> ecl::Stencil< unsigned char * >::stencil |
( |
const unsigned int & |
start_index, |
|
|
const unsigned int & |
n |
|
) |
| const |
|
inline |
Generate a sub-stencil.
Opens another window on this stencil. Using a starting index + size is in line with the way eigen blocks and segments work.
- Parameters
-
start_index | : start of the stencil window. |
n | : number of elements to include in the window. |
- Returns
- Stencil<Array> : the generated sub-stencil.
- Exceptions
-
| StandardException : throws if the indices provided are out of range [debug mode only]. |
Definition at line 134 of file specialisations.hpp.
◆ operator<<
template<typename OutputStream >
OutputStream& operator<< |
( |
OutputStream & |
ostream, |
|
|
const Stencil< unsigned char * > & |
stencil |
|
) |
| |
|
friend |
Insertion operator for stencils.
Insertion operator for sending the stencil to an output stream. This is raw, and has no formatting.
Concept Check: makes sure the template parameter provided for the stream is a stream type with the required functionality.
- Parameters
-
ostream | : the output stream. |
stencil | : the stencil to be inserted. |
- Template Parameters
-
OutputStream | : the stream being used. |
ArrayType | : the type of the underlying array. |
- Returns
- OutputStream : continue streaming with the updated output stream.
◆ array
◆ b_iter
◆ const_iterator
const typedef unsigned char* ecl::Stencil< unsigned char * >::const_iterator |
◆ const_reference
const typedef unsigned char& ecl::Stencil< unsigned char * >::const_reference |
◆ e_iter
◆ length
The documentation for this class was generated from the following file: