26 #ifndef PDI_SCALAR_DATATYPE_H_ 27 #define PDI_SCALAR_DATATYPE_H_ 32 #include <pdi/pdi_fwd.h> 33 #include <pdi/datatype.h> 54 std::function<void* (void*, const void*)> m_copy;
57 std::function<void(void*)> m_destroy;
64 Scalar_datatype(
Scalar_kind kind,
size_t size,
size_t align,
size_t dense_size, std::function<
void* (
void*,
const void*)> copy, std::function<
void(
void*)> destroy);
78 bool dense()
const override;
80 size_t datasize()
const override;
82 size_t buffersize()
const override;
84 size_t alignment()
const override;
86 bool simple()
const override;
88 void* data_to_dense_copy(
void* to,
const void* from)
const override;
90 void* data_from_dense_copy(
void* to,
const void* from)
const override;
92 void destroy_data(
void* ptr)
const override;
94 std::string debug_string()
const override;
96 bool operator== (
const Datatype&)
const override;
104 #endif // PDI_SCALAR_DATATYPE_H_
Definition: scalar_datatype.h:38
A Datatype is a Datatype_template that accepts no argument.
Definition: datatype.h:46
std::unique_ptr< Datatype_template > Datatype_template_uptr
Definition: pdi_fwd.h:74
std::unique_ptr< Datatype > Datatype_uptr
Definition: pdi_fwd.h:78
Scalar_kind
Different possible interpretations for a scalar.
Definition: pdi_fwd.h:105
const Scalar_datatype UNDEF_TYPE
Definition: scalar_datatype.h:100
Definition: array_datatype.h:37