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;
86 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,
const Attributes_map& attributes = {});
100 bool dense()
const override;
102 size_t datasize()
const override;
104 size_t buffersize()
const override;
106 size_t alignment()
const override;
108 bool simple()
const override;
110 void* data_to_dense_copy(
void* to,
const void* from)
const override;
112 void* data_from_dense_copy(
void* to,
const void* from)
const override;
114 void destroy_data(
void* ptr)
const override;
116 std::string debug_string()
const override;
118 bool operator== (
const Datatype&)
const override;
126 #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:70
std::unique_ptr< Datatype > Datatype_uptr
Definition: pdi_fwd.h:74
Scalar_kind
Different possible interpretations for a scalar.
Definition: pdi_fwd.h:97
std::unordered_map< std::string, Expression > Attributes_map
Definition: datatype_template.h:40
const Scalar_datatype UNDEF_TYPE
Definition: scalar_datatype.h:122
Definition: array_datatype.h:37