Classes | |
class | Accessor |
Accessor for pointer datatype. More... | |
Public Member Functions | |
Pointer_datatype (Datatype_uptr subtype, const Attributes_map &attributes={}) | |
Creates new pointer datatype. More... | |
Pointer_datatype (Datatype_uptr subtype, std::function< void *(void *, const void *)> copy, std::function< void(void *)> destroy, const Attributes_map &attributes={}) | |
Creates new pointer datatype. More... | |
const Datatype & | subtype () const |
Type of the pointed element. More... | |
Datatype_template_uptr | clone () const override |
Creates a new datatype as an exact copy of this one. More... | |
Datatype_uptr | clone_type () const override |
Creates a new datatype as an exact copy of this one. More... | |
Datatype_uptr | densify () const override |
Creates a new datatype as the dense copy of this one. More... | |
Datatype_uptr | evaluate (Context &) const override |
Creates a new datatype by resolving the value of all metadata references. More... | |
bool | dense () const override |
Indicate if the datatype is dense or not. More... | |
size_t | datasize () const override |
Computes the data size of a type, excluding potentially unused memory from a sparse type. More... | |
size_t | buffersize () const override |
Computes the data size of a type, including potentially unused memory from a sparse type. More... | |
size_t | alignment () const override |
Returns the required alignment for a type. More... | |
bool | simple () const override |
Tells if data can be copied as bytes (if type is dense) and doesn't need a destroyer. More... | |
void * | data_to_dense_copy (void *to, const void *from) const override |
Creates a dense deep copy of data. More... | |
void * | data_from_dense_copy (void *to, const void *from) const override |
Creates a sparse deep copy of dense data. More... | |
std::pair< void *, Datatype_uptr > | subaccess_by_iterators (void *from, std::vector< std::unique_ptr< Accessor_base >>::const_iterator remaining_begin, std::vector< std::unique_ptr< Accessor_base >>::const_iterator remaining_end) const override |
Creates datatype of subtype and returns it with a moved pointer. More... | |
void | destroy_data (void *ptr) const override |
Function used to delete the data behind the datatype. More... | |
std::string | debug_string () const override |
Returns the datatype yaml representation as a string. More... | |
bool | operator== (const Datatype &) const override |
Test for equality. More... | |
Datatype_uptr | dereference () const |
Public Member Functions inherited from PDI::Datatype | |
Datatype (const Attributes_map &attributes={}) | |
Creates a new datatype. More... | |
~Datatype () override | |
bool | operator!= (const Datatype &other) const |
Test for inequality. More... | |
std::pair< void *, Datatype_uptr > | subaccess (void *from, const Accessor_base &accessor) const |
Creates datatype of subtype and returns it with a moved pointer. More... | |
std::pair< void *, Datatype_uptr > | subaccess (void *from, const std::vector< std::unique_ptr< Accessor_base >> &accessors) const |
Creates datatype of subtype and returns it with a moved pointer. More... | |
Public Member Functions inherited from PDI::Datatype_template | |
Datatype_template (const Attributes_map &attributes={}) | |
Creates datatype template with given attributes. More... | |
Datatype_template (PC_tree_t datatype_tree) | |
Creates datatype template. More... | |
virtual | ~Datatype_template () |
Destroys the template. More... | |
Expression | attribute (const std::string &attribute_name) const |
Returns attribute of given name as Expression. More... | |
const Attributes_map & | attributes () const |
Returns all attributes as a unordered map. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from PDI::Datatype_template | |
static void | load_basic_datatypes (Context &ctx) |
Adds to the context the basic Array, Record, C and Fortran datatypes. More... | |
static void | load_user_datatypes (Context &ctx, PC_tree_t types_tree) |
Adds to the context the user defined datatypes. More... | |
Protected Attributes inherited from PDI::Datatype_template | |
Attributes_map | m_attributes |
PDI::Pointer_datatype::Pointer_datatype | ( | Datatype_uptr | subtype, |
const Attributes_map & | attributes = {} |
||
) |
Creates new pointer datatype.
[in] | subtype | subtype of the pointer datatype |
[in] | attributes | attributes of the pointer datatype |
PDI::Pointer_datatype::Pointer_datatype | ( | Datatype_uptr | subtype, |
std::function< void *(void *, const void *)> | copy, | ||
std::function< void(void *)> | destroy, | ||
const Attributes_map & | attributes = {} |
||
) |
Creates new pointer datatype.
[in] | subtype | subtype of the pointer datatype |
[in] | copy | function that copies data of this datatype |
[in] | destroy | function that destroys data of this datatype (doesn't deallocate memory) |
[in] | attributes | attributes of the pointer datatype |
const Datatype& PDI::Pointer_datatype::subtype | ( | ) | const |
Type of the pointed element.
|
overridevirtual |
Creates a new datatype as an exact copy of this one.
Implements PDI::Datatype_template.
|
overridevirtual |
Creates a new datatype as an exact copy of this one.
Implements PDI::Datatype.
|
overridevirtual |
Creates a new datatype as the dense copy of this one.
Implements PDI::Datatype.
|
overridevirtual |
Creates a new datatype by resolving the value of all metadata references.
ctx | the context in which to evaluate this template |
Implements PDI::Datatype_template.
|
overridevirtual |
Indicate if the datatype is dense or not.
Implements PDI::Datatype.
|
overridevirtual |
Computes the data size of a type, excluding potentially unused memory from a sparse type.
Implements PDI::Datatype.
|
overridevirtual |
Computes the data size of a type, including potentially unused memory from a sparse type.
Implements PDI::Datatype.
|
overridevirtual |
|
overridevirtual |
Tells if data can be copied as bytes (if type is dense) and doesn't need a destroyer.
Implements PDI::Datatype.
|
overridevirtual |
Creates a dense deep copy of data.
[in] | to | the pointer to the allocated memory to fill (dense data) |
[in] | from | the pointer to the copied data (size of buffersize) |
Implements PDI::Datatype.
|
overridevirtual |
Creates a sparse deep copy of dense data.
[in] | to | the pointer to the allocated memory to fill (size of buffersize) |
[in] | from | the pointer to the copied data (dense data) |
Implements PDI::Datatype.
|
overridevirtual |
Creates datatype of subtype and returns it with a moved pointer.
[in] | from | the pointer to the data |
[in] | remaining_begin | iterator to the begin of remaining accessors |
[in] | remaining_end | iterator to the end of remaining accessors |
Reimplemented from PDI::Datatype.
|
overridevirtual |
Function used to delete the data behind the datatype.
This should not deallocate the memory.
[in] | ptr | to the data to free |
Implements PDI::Datatype.
|
overridevirtual |
Returns the datatype yaml representation as a string.
Implements PDI::Datatype.
|
overridevirtual |
Test for equality.
other | the Datatype to compare |
Implements PDI::Datatype.
Datatype_uptr PDI::Pointer_datatype::dereference | ( | ) | const |