Visible to Intel only — GUID: GUID-561C877F-0EED-4BB1-80D4-35E896A3E85F
Visible to Intel only — GUID: GUID-561C877F-0EED-4BB1-80D4-35E896A3E85F
Homogeneous table
Refer to Developer Guide: Homogeneous table.
Programming interface
All types and functions in this section are declared in the oneapi::dal namespace and be available via inclusion of the oneapi/dal/table/homogen.hpp header file.
classhomogen_table
Public Static Methods
staticstd::int64_tkind()
Returns the unique id of homogen_table class.
template<typenameData>statichomogen_tablewrap(constData*data_pointer, std::int64_trow_count, std::int64_tcolumn_count, data_layoutlayout=data_layout::row_major)
Creates a new homogen_table instance from externally-defined data block. Table object refers to the data but does not own it. The responsibility to free the data remains on the user side. The data should point to the data_pointer memory block.
- Template Parameters
-
Data – The type of elements in the data block that will be stored into the table. The table initializes data types of metadata with this data type. The feature types should be set to default values for Data type: contiguous for floating-point, ordinal for integer types. The Data type should be at least float, double or std::int32_t.
- Parameters
-
data_pointer – The pointer to a homogeneous data block.
row_count – The number of rows in the table.
column_count – The number of columns in the table.
layout – The layout of the data. Should be data_layout::row_major or data_layout::column_major.
template<typenameData>statichomogen_tablewrap(constdal::array<Data>&data, std::int64_trow_count, std::int64_tcolumn_count, data_layoutlayout=data_layout::row_major)
Creates a new homogen_table instance from an array. The created table shares data ownership with the given array.
- Template Parameters
-
Data – The type of elements in the data block that will be stored into the table. The table initializes data types of metadata with this data type. The feature types should be set to default values for Data type: contiguous for floating-point, ordinal for integer types. The Data type should be at least float, double or std::int32_t.
- Parameters
-
data – The array that stores a homogeneous data block.
row_count – The number of rows in the table.
column_count – The number of columns in the table.
layout – The layout of the data. Should be data_layout::row_major or data_layout::column_major.
Constructors
homogen_table()
Creates a new homogen_table instance with zero number of rows and columns.
homogen_table(consttable&other)
Casts an object of the base table type to a homogen table. If cast is not possible, the operation is equivalent to a default constructor call.
template<typenameData,typenameConstDeleter>homogen_table(constData*data_pointer, std::int64_trow_count, std::int64_tcolumn_count, ConstDeleter&&data_deleter, data_layoutlayout=data_layout::row_major)
Creates a new homogen_table instance from externally-defined data block. Table object owns the data pointer. The data should point to the data_pointer memory block.
- Template Parameters
-
Data – The type of elements in the data block that will be stored into the table. The Data type should be at least float, double or std::int32_t.
ConstDeleter – The type of a deleter called on data_pointer when the last table that refers it is out of the scope.
- Parameters
-
data_pointer – The pointer to a homogeneous data block.
row_count – The number of rows in the table.
column_count – The number of columns in the table.
data_deleter – The deleter that is called on the data_pointer when the last table that refers it is out of the scope.
layout – The layout of the data. Should be data_layout::row_major or data_layout::column_major.
Public Methods
template<typenameData>constData*get_data()const
Returns the data pointer cast to the Data type. No checks are performed that this type is the actual type of the data within the table. If table has no data, returns nullptr.
constvoid*get_data()const
The pointer to the data block within the table. Should be equal to nullptr when row_count==0 and column_count==0.
std::int64_tget_kind()const
The unique id of the homogen table type.