Array_datatype (
size_t size, size_t start, size_t subsize, Datatype_uptr subtype )
Description
Parameters
size
- the number of elements the array can store
start
- the id of the first actual element of the array
subsize
- the number of actual elements in the array
subtype
- the type of the elements contained in the array
Array_datatype (
size_t size, Datatype_uptr subtype )
Description
Parameters
size
- the number of elements the array can store
subtype
- the type of the elements contained in the array
Datatype_template_uptr
clone (
)
Description
Creates a new datatype as an exact copy of this one.
Result
the dense type that is produced
Datatype_uptr
clone_type (
)
Description
Creates a new datatype as an exact copy of this one.
Result
the dense type that is produced
void *
data_from_dense_copy (
const void * from, void * to )
Description
Creates a sparse deep copy of dense data.
Parameters
from
- the pointer to the copied data (dense data)
to
- the pointer to the allocated memory to fill (size of buffersize)
Result
void *
data_to_dense_copy (
const void * from, void * to )
Description
Creates a dense deep copy of data.
Parameters
from
- the pointer to the copied data (size of buffersize)
to
- the pointer to the allocated memory to fill (dense data)
Result
std::string
debug_string (
)
Description
Returns the datatype yaml representation as a string.
Result
the datatype yaml representation as a string
bool
dense (
)
Description
Indicate if the datatype is dense or not.
Result
whether the datatype is dense
Datatype_uptr
densify (
)
Description
Creates a new datatype as the dense copy of this one.
Result
the type that is produced
Datatype_uptr
evaluate (
Context & ctx )
Description
Creates a new datatype by resolving the value of all metadata references.
Parameters
ctx
- the context in which to evaluate this template
Result
the evaluated type that is produced
bool
operator== (
const Datatype & other )
Description
Parameters
Result
bool
simple (
)
Description
Tells if data can be copied as bytes (if type is dense) and doesn't need a destroyer.
Result
true if data has trivial copier and destroyer, false otherwise
size_t
size (
)
Description
Number of elements the array can store.
Result
the number of elements the array can store
size_t
start (
)
Description
id of the first actual element of the array
Result
the id of the first actual element of the array
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 )
Description
Creates datatype of subtype and returns it with a moved pointer.
Parameters
from
- the pointer to the data
remaining_begin
- iterator to the begin of remaining accessors
remaining_end
- iterator to the end of remaining accessors
Result
pointer moved by offset and new datatype
size_t
subsize (
)
Description
Number of actual elements in the array.
Result
the number of actual elements in the array
const Datatype &
subtype (
)
Description
Type of the elements contained in the array.
Result
the type of the elements contained in the array