A basic base container for array. This class differs from array_base_container in that it cannot be modified through traits. Its domain is indexed_domain. More...
Public Member Functions | |
basic_array_base_container (domain_type const &domain, cid_type const &cid=index_bounds< cid_type >::invalid()) | |
Create a base container with a specific domain and ID. More... | |
basic_array_base_container (domain_type const &domain, cid_type const &cid, value_type const &default_value) | |
Create a base container with a specific domain, ID and initial value. More... | |
basic_array_base_container (domain_type domain, value_type *extmem) | |
Create a base container with a specific domain and using a raw pointer to a block of memory that stores data. More... | |
cid_type const & | cid (void) const |
Return the base container ID. | |
domain_type * | get_domain (void) const |
domain_type const & | domain (void) const |
void | truncate_tail (gid_type const &gid) |
Truncate a base container by removing a specific GID and modifying the domain to remove from that index to the end of the container. More... | |
void | truncate_head (gid_type const &gid) |
Truncate a base container by removing a specific GID and modifying the domain to remove from the beginning of the container to that index. More... | |
container_type & | container (void) |
container_type const & | container (void) const |
value_type * | raw (void) |
Return a raw pointer to underlying data. More... | |
gid_type | local_position (gid_type const &gid) const |
Return the local position of a global ID. More... | |
reference | make_reference (gid_type const &gid) |
Construct a local reference to a specific index of the base container. More... | |
const_reference | make_reference (gid_type const &gid) const |
Construct a local reference to a specific index of the base container (read only). More... | |
iterator | make_iterator (gid_type const &gid) |
Construct a local iterator to a specific index of the base container. More... | |
reference | operator[] (gid_type const &gid) |
Construct a local reference to a specific index of the base container. More... | |
const_reference | operator[] (gid_type const &gid) const |
Construct a local reference to a specific index of the base container (read only). More... | |
value_type | get_element (gid_type const &gid) |
Get the element corresponding to a specific GID. More... | |
value_type | get_element (gid_type const &gid) const |
Get the element corresponding to a specific GID. More... | |
compute_array_bc_traits< T, OptionalNoInitParam... >::type ::stored_type | get_stored_element (gid_type const &gid) const |
Get the element corresponding to a specific GID. More... | |
void | apply_set (gid_type const &gid, F const &f) |
Invoke the functor provided on the element with the specified key. More... | |
Functor::result_type | apply_get (gid_type const &gid, Functor const &f) |
Apply a function object to an element at a specific GID and return the result. More... | |
void | set_element (gid_type const &gid, typename compute_array_bc_traits< T, OptionalNoInitParam... >::type ::stored_type const &t) |
Update the value of an element at a specific GID. More... | |
std::enable_if< is_local_iterator< Iterator >::value >::type | set_elements (gid_type const &gid, Iterator iter, Iterator e_iter) |
Update the values starting at gid using elements in the given iterator range. | |
std::enable_if<!is_local_iterator< Iterator >::value >::type | set_elements (gid_type const &gid, Iterator iter, Iterator e_iter) |
void | set_elements (gid_type const &gid, View &&view) |
size_type | size (void) const |
Return the number of elements in this base container. | |
iterator | begin (void) |
Construct a local iterator to the beginning of the base container. More... | |
const_iterator | begin (void) const |
Construct a const local iterator to the beginning of the base container. More... | |
iterator | end (void) |
Construct a local iterator to one past the end of the base container. More... | |
const_iterator | end (void) const |
Construct a local iterator to one past the end of the base container that is const. More... | |
void | defer (bool defer) |
Public Types | |
typedef compute_array_bc_traits< T, OptionalNoInitParam... >::type ::value_type | value_type |
typedef compute_array_bc_traits< T, OptionalNoInitParam... >::type ::domain_type | domain_type |
typedef size_t | cid_type |
typedef domain_type::index_type | gid_type |
typedef domain_type::size_type | size_type |
typedef compute_array_bc_traits< T, OptionalNoInitParam... >::type ::container_type | container_type |
typedef compute_array_bc_traits< T, OptionalNoInitParam... >::type ::container_constructor | container_constructor |
typedef local_accessor< array_base_container > | accessor_t |
typedef const_local_accessor< array_base_container > | const_accessor_t |
typedef proxy< value_type, accessor_t > | reference |
typedef proxy< value_type, const_accessor_t > | const_reference |
typedef local_iterator< array_base_container > | iterator |
typedef const_local_iterator< array_base_container > | const_iterator |
typedef base_container_metadata< array_base_container > | loc_dist_metadata |
Protected Attributes | |
bool | m_defer_cleanup |
A basic base container for array. This class differs from array_base_container in that it cannot be modified through traits. Its domain is indexed_domain.
T | The value type of the base container. |
stapl::basic_array_base_container< T, OptionalNoInitParam >::basic_array_base_container | ( | domain_type const & | domain, |
cid_type const & | cid = index_bounds<cid_type>::invalid() |
||
) |
Create a base container with a specific domain and ID.
domain | The explicit domain for this base container |
cid | The id for this base container |
stapl::basic_array_base_container< T, OptionalNoInitParam >::basic_array_base_container | ( | domain_type const & | domain, |
cid_type const & | cid, | ||
value_type const & | default_value | ||
) |
Create a base container with a specific domain, ID and initial value.
domain | The explicit domain for this base container |
cid | The id for this base container |
default_value | The default value for all elements in the base container |
stapl::basic_array_base_container< T, OptionalNoInitParam >::basic_array_base_container | ( | domain_type | domain, |
value_type * | extmem | ||
) |
Create a base container with a specific domain and using a raw pointer to a block of memory that stores data.
domain | The explicit domain for this base container |
extmem | A pointer to a raw chunk of memory that contains the base container's data |
|
inherited |
Truncate a base container by removing a specific GID and modifying the domain to remove from that index to the end of the container.
gid | The GID to remove. |
|
inherited |
Truncate a base container by removing a specific GID and modifying the domain to remove from the beginning of the container to that index.
gid | The GID to remove. |
|
inherited |
Return a raw pointer to underlying data.
|
inherited |
Return the local position of a global ID.
gid | The GID for which to find the local position. |
|
inherited |
Construct a local reference to a specific index of the base container.
gid | The GID for which to create the reference |
|
inherited |
Construct a local reference to a specific index of the base container (read only).
gid | The GID for which to create the reference |
|
inherited |
Construct a local iterator to a specific index of the base container.
gid | The GID for which to create the iterator |
|
inherited |
Construct a local reference to a specific index of the base container.
gid | The GID for which to create the reference |
|
inherited |
Construct a local reference to a specific index of the base container (read only).
gid | The GID for which to create the reference |
|
inherited |
Get the element corresponding to a specific GID.
gid | The id associated with the element for which we want to read the value. |
|
inherited |
Get the element corresponding to a specific GID.
gid | The id associated with the element for which we want to read the value. |
|
inherited |
Get the element corresponding to a specific GID.
This method is used in the redistribution of composed containers. It is needed to allow the distributor object to get the instance of the container_wrapper_ref for a container instance on one location and send it to another location where it will be placed in a base container by calling set_element. set_element only accepts instances of the stored type.
gid | The id associated with the element for which we want to read the value. |
|
inherited |
Invoke the functor provided on the element with the specified key.
gid | The specified key. |
f | The functor to apply |
|
inherited |
Apply a function object to an element at a specific GID and return the result.
gid | The GID associated with the element for which we want to apply the functor and read the result. |
f | The functor to apply to gid |
|
inherited |
Update the value of an element at a specific GID.
gid | The GID of the element to set. |
t | The new value |
|
inherited |
Construct a local iterator to the beginning of the base container.
|
inherited |
Construct a const local iterator to the beginning of the base container.
|
inherited |
Construct a local iterator to one past the end of the base container.
|
inherited |
Construct a local iterator to one past the end of the base container that is const.