SheafSystem  0.0.0.0
sheaf::dof_tuple_record_set Class Reference

A record_set which contains dof tuple records. Supports both record selection and record restriction (partial records). More...

#include <dof_tuple_record_set.h>

Inheritance diagram for sheaf::dof_tuple_record_set:
sheaf::record_set sheaf::any

Public Member Functions

 dof_tuple_record_set (const dof_tuple_record_set &xother)
 Copy constructor. More...
 
virtual dof_tuple_record_setclone () const
 Virtual constructor; makes a new instance of the same type as this. More...
 
virtual ~dof_tuple_record_set ()
 Destructor. More...
 
virtual bool invariant () const
 Class invariant. More...
 
virtual bool is_ancestor_of (const any *other) const
 Conformance test; true if other conforms to this. More...
 
 dof_tuple_record_set (const sheaf_file &xfile, size_t xrecord_size, int xrecord_buffer_ub, const poset_scaffold &xscaffold)
 Creates an instance attached to the dof tuple record_set of the poset associated with xscaffold in the file xfile, using a record buffer of size xrecord_buffer_ub. More...
 
virtual const std::string & suffix () const
 The name suffix for this data set. More...
 
virtual void open ()
 Opens the record_set. More...
 
void internalize ()
 Internalize the members of scafold().structure() from disk. More...
 
void externalize ()
 Externalize the members of scafold().structure() to disk. More...
 
void externalize_domain (const scoped_index &xtuple_ext_id, const scoped_index &xschema_id)
 Externalize the domain specified by the schema member with index xschema_id. More...
 
size_type record_size () const
 The size in bytes of data transfers to disk. More...
 
record_queuequeue ()
 The queue of dof tuple record requests. More...
 
const record_queuequeue () const
 The queue of dof tuple record requests. More...
 
pod_index_type compute_ext_id (const scoped_index &xtuple_id)
 Computes the external id for the dof tuple dof tuple with id xtuple_id. More...
 
size_type compute_ext_domain_size (const poset_dof_map &xdof_map, const schema_poset_member &xschema) const
 Computes the external size for the portion of the dof tuple xdof_map which is described by schema xschema. More...
 
- Public Member Functions inherited from sheaf::record_set
 record_set (const sheaf_file &xfile, int xrecord_buffer_ub, const poset_scaffold &xscaffold)
 Creates an instance attached to the record_set with name xname in the file xfile, using record packets of size xpacket_ub. More...
 
 record_set (const record_set &xother)
 Copy constructor. More...
 
virtual ~record_set ()
 Destructor. More...
 
const sheaf_filefile () const
 The file this record_set belongs to. More...
 
std::string name () const
 The name of this data set. More...
 
std::string alias () const
 The standard alias for this data set. More...
 
std::string data_set_name (const std::string &xname) const
 The data set name for a poset with name xname. More...
 
std::string data_set_alias (const std::string &xname) const
 The data set alias for a poset with name xname. More...
 
std::string poset_name () const
 The name of the poset this represents, extracted from the name of the dataset. More...
 
poset_scaffoldscaffold ()
 Scaffold for constructing poset associated with this record set (mutable version). More...
 
const poset_scaffoldscaffold () const
 Scaffold for constructing poset associated with this record set (const version). More...
 
poset_data_type_maptype_map ()
 Data type map for records in this record set (mutable version) More...
 
const poset_data_type_maptype_map () const
 Data type map for records in this record set (const version) More...
 
bool is_open () const
 True if this record_set is open. More...
 
virtual void close ()
 Closes the record_set. More...
 
int record_buffer_ct () const
 The number of active records in record buffer. More...
 
void inc_record_buffer_ct ()
 The increment the number of active records in record buffer. More...
 
void reset_record_buffer_ct ()
 The set the number of active records in record buffer to 0. More...
 
int record_buffer_ub () const
 The maximum number of records the buffer can hold. More...
 
bool record_buffer_is_empty () const
 True if there are no active records in the buffer. More...
 
bool record_buffer_is_full () const
 True if there are no inactive records in the buffer. More...
 
- Public Member Functions inherited from sheaf::any
bool is_same_type (const any *other) const
 True if other is the same type as this. More...
 
virtual ~any ()
 Destructor. More...
 
bool invariant_check () const
 True if invariant checking is enabled. More...
 
void enable_invariant_check () const
 Enable invariant checking. More...
 
void disable_invariant_check () const
 Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing invariant checking during multi-phase initialization. More...
 
int disable_invariance_check_request_depth () const
 Number of times disable_invariant_check has been called without matching call to enable_invariant_check. More...
 

Protected Member Functions

virtual hid_t create_dataset ()
 Creates the HDF dataset associated with this. More...
 
virtual void create_int_data_type ()
 Creates a new HDF internal data type. More...
 
void read_records ()
 Read and internalizes all the records. More...
 
void read_selection ()
 Read the records specified by the selection into the record buffer. More...
 
void write_selection ()
 Write the records specified by the selection into the file. More...
 
void schematize ()
 Schematize the table and row dof subposets. More...
 
void externalize_all_dofs (schema_poset_member &xxfr_schema, const poset_dof_map &xint_dof_map, char *&xbuf, size_t &xbuf_remainder)
 Externalizes all the dofs in the domain described by xxfr_schema. More...
 
void internalize_all_dofs (schema_poset_member &xxfr_schema, poset_dof_map &xext_dof_map, char *xbuf, size_t xbuf_remainder)
 Internalizes all the dofs in the domain described by xxfr_schema. More...
 
void populate_internal_dof_map (const poset_dof_map &xext_dof_map, poset_dof_map &xint_dof_map)
 Gathers dofs from xext_dof_map and puts them into xint_dof_map. More...
 
char * get_next_record (char *xbuf)
 The next record to use in the record buffer. More...
 
char * get_first_record (pod_index_type xext_pod)
 The first record associated with the dof tuple with external id xext_pod. More...
 
pod_index_type get_internal_record (pod_index_type xext_rec_pod)
 Brings external record identified by xext_rec_pod into memory, if necessary, and returns its internal record id. More...
 
pod_index_type advance_to_start_of_record (pod_index_type xext_pod)
 Advances the offset xoffset to the smallest offset which is less than or equal to xoffset and which is the first byte in a record. More...
 
void externalize_one_domain (const scoped_index &xtuple_id, const scoped_index &xschema_id)
 Externalize the domain specified by the schema member with index xschema_id. Does not initialize record buffer. More...
 
void attach_transfer_schema (schema_poset_member &xdof_map_schema, const scoped_index &xdomain_schema_id)
 Attaches the transfer schema to the lesser of the dof map schema or the domain schema. More...
 
- Protected Member Functions inherited from sheaf::record_set
void extend_dataset (const hsize_t *xdims, int xdims_ub)
 Extends the dataset dimensions to at least the dimensions given xdims, an array of length xdims_ub. More...
 
void create_alias ()
 Creates a soft link from alias to the data set. More...
 
void set_name_from_alias ()
 Sets the primary name of the dataset from the alias. More...
 
hid_t hdf_id ()
 The HDF id for this record set. More...
 
hid_t ext_dataspace_hdf_id ()
 The HDF id for the external dataspace of this record set. More...
 
hid_t ext_data_type_hdf_id ()
 The HDF external data type id for this record set. More...
 
int ext_dataspace_rank ()
 The rank of the dataspace for the record_set. More...
 
hsize_t ext_dataspace_dim (int xi)
 The dimension of xi-th index of the external dataspace. More...
 
hid_t int_dataspace_hdf_id ()
 The hdf5 id of the internal dataspace associated with the record buffer. More...
 
hid_t int_data_type_hdf_id ()
 The HDF internal data type id for this record set. More...
 
virtual void read_dataset_attributes ()
 Opens and reads the dataset attribute objects from the file. A stub in this class, intended to be redefined in descendants. More...
 
virtual void write_dataset_attributes ()
 Writes the dataset attribute objects into the file. A stub in this class, intended to be redefined in descendants. More...
 
void read_attribute (const char *&xatt_values, size_type &xatt_ct, const data_converter *xatt_conv, const std::string &xatt_name)
 Reads the attribute with name xatt_name from the file. More...
 
void write_attribute (const void *xatt_values, size_type xatt_ct, const data_converter *xatt_conv, const std::string &xatt_name)
 Writes the attribute with name xatt_name into the file. More...
 
- Protected Member Functions inherited from sheaf::any
 any ()
 default constructor More...
 

Protected Attributes

size_type _record_size
 The size in bytes of a record. More...
 
hsize_t(* _hdf_int_selection )[1]
 The HDF internal record selection buffer. More...
 
hsize_t(* _hdf_ext_selection )[1]
 The HDF external record selection buffer. More...
 
int _hdf_selection_ub
 The HDF record selection buffers upper bound. More...
 
int _hdf_selection_ct
 The number of records selected. More...
 
char * _hdf_buf
 The HDF buffer. More...
 
size_t _hdf_buf_ub
 The HDF buffer upper bound. More...
 
pod_index_type _next_record_pod
 The index of the next buffer record to allocate for a read or write operation. More...
 
zn_to_bool _record_is_full
 True if i-th record is full and should be written out. More...
 
record_map< pod_index_type, pod_index_type_hdf_buf_record_map
 The record id map for the hdf buffer. More...
 
char * _hdf_scratch_buf
 Scratch buffer for internalizing dofs that span record boundaries. More...
 
size_t _hdf_scratch_buf_ub
 The size of the scratch buffer in bytes. More...
 
record_queue _record_queue
 The record queue. More...
 
bool _writing
 True if current operation is a write operation. More...
 
- Protected Attributes inherited from sheaf::record_set
sheaf_file_file
 The file this record_set belongs to. More...
 
std::string _name
 The name of this record_set. More...
 
std::string _alias
 The standard alias for this record_set. More...
 
poset_scaffold_scaffold
 The poset scaffold associated with this. More...
 
hid_t _hdf_id
 The HDF id for this record set. More...
 
hid_t _ext_dataspace_hdf_id
 The HDF id for the external dataspace of this record set. More...
 
hid_t _ext_data_type_hdf_id
 The HDF external data type id for this record set. More...
 
int _ext_dataspace_rank
 The rank of the dataspace for the record_set. More...
 
hsize_t * _ext_dataspace_dims
 The current dimensions of the external dataspace. More...
 
int _record_buffer_ct
 The number of active records in record buffer. More...
 
int _record_buffer_ub
 The maximum number of records the buffer can hold. More...
 
hid_t _int_dataspace_hdf_id
 The hdf5 id of the dataspace associated with the record buffer. More...
 
hid_t _int_data_type_hdf_id
 The HDF internal data type id for this record set. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from sheaf::record_set
static const std::string & name_space_alias ()
 The reserved, standard alias for the namespace in the file. More...
 
static const std::string & name_space_prefix ()
 The reserved, standard prefix for namespace dataser names. More...
 
- Static Protected Attributes inherited from sheaf::record_set
static const hid_t NOT_AN_HDF_ID = -1
 Value indicating an invalid HDf object id. /. More...
 

Detailed Description

A record_set which contains dof tuple records. Supports both record selection and record restriction (partial records).

/

Hack:
the transparency hack. / The io system was originally designed / and implemented to provide record selection, restriction, and data / type conversion with as little dependence on HDF as possible. / A side effect of this was that HDF did not / know what the data types in the dof tuple dataset were and the results / of h5dump were unreadable. We subsequently hacked the io system to / tell HDF what the types were, thus achieving both dump transparency and / portability. This left the most of the record and conversion machinery / in place, even though it's no longer needed. The io subsystem was / hard to understand and maintain before this hack, now it needs to be / completely rewritten. /

Definition at line 55 of file dof_tuple_record_set.h.

Constructor & Destructor Documentation

◆ dof_tuple_record_set() [1/2]

sheaf::dof_tuple_record_set::dof_tuple_record_set ( const dof_tuple_record_set xother)

Copy constructor.

Not Implemented.

Postcondition

Definition at line 57 of file dof_tuple_record_set.cc.

References clone(), and invariant().

Referenced by is_ancestor_of().

◆ ~dof_tuple_record_set()

sheaf::dof_tuple_record_set::~dof_tuple_record_set ( )
virtual

◆ dof_tuple_record_set() [2/2]

sheaf::dof_tuple_record_set::dof_tuple_record_set ( const sheaf_file xfile,
size_t  xrecord_size,
int  xrecord_buffer_ub,
const poset_scaffold xscaffold 
)

Member Function Documentation

◆ advance_to_start_of_record()

sheaf::pod_index_type sheaf::dof_tuple_record_set::advance_to_start_of_record ( pod_index_type  xext_pod)
protected

Advances the offset xoffset to the smallest offset which is less than or equal to xoffset and which is the first byte in a record.

Definition at line 1893 of file dof_tuple_record_set.cc.

References _record_size, and externalize_one_domain().

Referenced by compute_ext_id(), externalize(), externalize_domain(), and get_internal_record().

◆ attach_transfer_schema()

void sheaf::dof_tuple_record_set::attach_transfer_schema ( schema_poset_member xdof_map_schema,
const scoped_index xdomain_schema_id 
)
protected

◆ clone()

sheaf::dof_tuple_record_set * sheaf::dof_tuple_record_set::clone ( ) const
virtual

Virtual constructor; makes a new instance of the same type as this.

Not Implemented.

Postcondition
  • result != 0
  • is_same_type(result)

Reimplemented from sheaf::record_set.

Definition at line 80 of file dof_tuple_record_set.cc.

References sheaf::any::is_same_type(), and ~dof_tuple_record_set().

Referenced by dof_tuple_record_set().

◆ compute_ext_domain_size()

sheaf::size_type sheaf::dof_tuple_record_set::compute_ext_domain_size ( const poset_dof_map xdof_map,
const schema_poset_member xschema 
) const

Computes the external size for the portion of the dof tuple xdof_map which is described by schema xschema.

Definition at line 1013 of file dof_tuple_record_set.cc.

References _record_size, create_dataset(), and sheaf::schema_poset_member::ext_data_type_ct().

Referenced by compute_ext_id().

◆ compute_ext_id()

sheaf::pod_index_type sheaf::dof_tuple_record_set::compute_ext_id ( const scoped_index xtuple_id)

Computes the external id for the dof tuple dof tuple with id xtuple_id.

Precondition
  • scaffold().structure().state_is_read_accessible()
  • scaffold().structure().contains_row_dof_tuple(xtuple_id)
Hack:
Product subposet hack, version 2. Have to have a schema member to get bound iterator; use the external schema, it isn't modfied by previous bounds iterations and should always have the right fiber component for section space schema.
Hack:
product subposet hack, ver 2. Not all posets have external ids; let schema give us a pseudo id.

Definition at line 905 of file dof_tuple_record_set.cc.

References advance_to_start_of_record(), attach_transfer_schema(), sheaf::schema_poset_member::bound_iterator(), compute_ext_domain_size(), sheaf::poset_scaffold::dof_tuple_domain_offsets(), sheaf::poset_scaffold::dof_tuple_id_space(), sheaf::poset_scaffold::dof_tuple_scratch_id(), sheaf::poset_scaffold::external_schema(), sheaf::schema_poset_member::get_ext_id(), sheaf::scoped_index::hub_pod(), sheaf::index_iterator::index(), sheaf::scattered_insertion_index_space_handle::insert(), sheaf::index_iterator::is_done(), sheaf::index_iterator::item(), sheaf::index_iterator::next(), sheaf::poset_scaffold::put_dof_tuple_scratch_id(), sheaf::poset_state_handle::row_dof_map(), sheaf::record_set::scaffold(), sheaf::poset_dof_map::schema(), sheaf::poset_scaffold::structure(), and sheaf::poset_scaffold::transfer_schema().

Referenced by sheaf::storage_agent::commit_dof_tuple_transaction(), sheaf::member_record::externalize(), and queue().

◆ create_dataset()

hid_t sheaf::dof_tuple_record_set::create_dataset ( )
protectedvirtual

Creates the HDF dataset associated with this.

Precondition
  • file().mode() == sheaf_file::READ_WRITE
Hack:
need sequence ids, not client ids. The intent is for the external data space to be compact, that is, sequential starting at 0. We are currently using client ids as external dof ids and client ids are not in general compact. So also the comment in externalize.
Issue:
the following hack refers to code that has been removed, but the issue remians: what if dof_ct == 0.
Hack:
if dof_ct == 0, we should just not write the dataset. But it turns out to be quite complicated to do and it doesn't occur often enough to be worth the trouble, so just force an extent of 1.
Postcondition
  • result >= 0

Implements sheaf::record_set.

Definition at line 1035 of file dof_tuple_record_set.cc.

References sheaf::record_set::_ext_dataspace_hdf_id, sheaf::record_set::_int_data_type_hdf_id, sheaf::record_set::_record_buffer_ub, sheaf::record_set::file(), sheaf::record_set::hdf_id(), sheaf::record_set::name(), and read_selection().

Referenced by compute_ext_domain_size().

◆ create_int_data_type()

◆ externalize()

void sheaf::dof_tuple_record_set::externalize ( )

Externalize the members of scafold().structure() to disk.

Precondition
  • scaffold().structure().state_is_read_accessible()
Hack:
Product subposet hack, version 2. Have to have a schema member to get bound iterator; use the external schema, it isn't modfied by previous bounds iterations and should always have the right fiber component for section space schema.
Hack:
product subposet hack, ver 2. Not all posets support external ids directly; let the schema give us a suitable key.
Postcondition
  • _hdf_selection_ct == 0
  • _next_record_pod == 0

Definition at line 549 of file dof_tuple_record_set.cc.

References _hdf_buf_record_map, _hdf_ext_selection, _hdf_int_selection, _hdf_selection_ct, _next_record_pod, sheaf::record_set::_record_buffer_ub, _record_is_full, _record_queue, _writing, advance_to_start_of_record(), sheaf::schema_poset_member::bound_iterator(), sheaf::poset_scaffold::col_bounds(), sheaf::record_queue::dequeue(), sheaf::poset_scaffold::dof_tuple_ext_id(), sheaf::poset_scaffold::dof_tuple_schema_ids(), sheaf::poset_scaffold::dof_tuple_schema_versions(), sheaf::poset_scaffold::dof_tuple_scratch_id(), sheaf::record_map< internal_index_type, external_index_type >::external_id(), sheaf::poset_scaffold::external_schema(), externalize_domain(), externalize_one_domain(), sheaf::abstract_poset_member::ge(), sheaf::poset_state_handle::get_ext_id(), sheaf::poset_component::host(), sheaf::index_iterator::index(), sheaf::poset_component::index(), sheaf::index_iterator::is_done(), sheaf::record_queue::is_empty(), sheaf::record_set::is_open(), sheaf::record_set::name(), sheaf::index_iterator::next(), sheaf::zn_to_bool::put(), sheaf::poset_scaffold::put_dof_tuple_col_bound(), sheaf::poset_scaffold::put_dof_tuple_scratch_id(), record_size(), sheaf::record_set::reset_record_buffer_ct(), sheaf::poset_state_handle::row_dof_map(), sheaf::record_set::scaffold(), sheaf::poset_dof_map::schema(), sheaf::poset_scaffold::structure(), sheaf::poset_bounds::ub_id(), sheaf::poset_bounds::ub_is_singleton(), sheaf::poset_component::version(), and write_selection().

Referenced by sheaf::storage_agent::commit_transaction(), and read_records().

◆ externalize_all_dofs()

◆ externalize_domain()

void sheaf::dof_tuple_record_set::externalize_domain ( const scoped_index xtuple_ext_id,
const scoped_index xschema_id 
)

Externalize the domain specified by the schema member with index xschema_id.

Precondition
  • scaffold().structure().state_is_read_accessible()
  • xtuple_id.same_scope(scaffold().dof_tuple_id_space())
Hack:
product subposet hack, ver 2. Not all posets support external ids directly; let the schema give us a suitable key.
Postcondition
  • _hdf_selection_ct == 0
  • _next_record_pod == 0

Definition at line 735 of file dof_tuple_record_set.cc.

References _hdf_buf_record_map, _hdf_ext_selection, _hdf_int_selection, _hdf_selection_ct, _next_record_pod, sheaf::record_set::_record_buffer_ub, _record_is_full, _writing, advance_to_start_of_record(), sheaf::poset_scaffold::dof_tuple_schema_ids(), sheaf::poset_scaffold::dof_tuple_schema_versions(), sheaf::poset_scaffold::dof_tuple_scratch_id(), sheaf::record_map< internal_index_type, external_index_type >::external_id(), externalize_one_domain(), sheaf::schema_poset_member::get_ext_id(), sheaf::record_set::is_open(), sheaf::scoped_index::pod(), sheaf::zn_to_bool::put(), sheaf::poset_scaffold::put_dof_tuple_col_bound(), sheaf::poset_scaffold::put_dof_tuple_scratch_id(), record_size(), sheaf::record_set::reset_record_buffer_ct(), sheaf::poset_state_handle::row_dof_map(), sheaf::scoped_index::same_scope(), sheaf::record_set::scaffold(), sheaf::poset_dof_map::schema(), sheaf::poset_scaffold::structure(), sheaf::poset_component::version(), and write_selection().

Referenced by sheaf::storage_agent::commit_dof_tuple_transaction(), and externalize().

◆ externalize_one_domain()

void sheaf::dof_tuple_record_set::externalize_one_domain ( const scoped_index xtuple_id,
const scoped_index xschema_id 
)
protected

Externalize the domain specified by the schema member with index xschema_id. Does not initialize record buffer.

Precondition
  • scaffold().structure().state_is_read_accessible()
  • xtuple_id.same_scope(scaffold().dof_tuple_id_space())
Hack:
the product subposet hack, ver 2. Not all posets have external ids; let the schema give us a pseudo-id.

Definition at line 1900 of file dof_tuple_record_set.cc.

References _record_size, attach_transfer_schema(), sheaf::poset_scaffold::dof_tuple_domain_offsets(), externalize_all_dofs(), sheaf::schema_poset_member::get_ext_id(), get_first_record(), sheaf::record_set::is_open(), sheaf::scoped_index::pod(), sheaf::poset_state_handle::row_dof_map(), sheaf::scoped_index::same_scope(), sheaf::record_set::scaffold(), sheaf::total_poset_member::schema(), sheaf::poset_scaffold::structure(), and sheaf::poset_scaffold::transfer_schema().

Referenced by advance_to_start_of_record(), externalize(), and externalize_domain().

◆ get_first_record()

char * sheaf::dof_tuple_record_set::get_first_record ( pod_index_type  xext_pod)
protected

The first record associated with the dof tuple with external id xext_pod.

Postcondition
  • result >= _hdf_buf
  • result < _hdf_buf + _hdf_buf_ub

Definition at line 1765 of file dof_tuple_record_set.cc.

References _hdf_buf, _hdf_buf_ub, _record_size, and get_internal_record().

Referenced by externalize_one_domain(), get_next_record(), and read_records().

◆ get_internal_record()

sheaf::pod_index_type sheaf::dof_tuple_record_set::get_internal_record ( pod_index_type  xext_rec_pod)
protected

◆ get_next_record()

char * sheaf::dof_tuple_record_set::get_next_record ( char *  xbuf)
protected

The next record to use in the record buffer.

Precondition
  • _hdf_buf < xbuf
  • xbuf <= (_hdf_buf + _hdf_buf_ub)
  • ((xbuf - _hdf_buf) % _record_size) == 0
Postcondition
  • result >= _hdf_buf
  • result < (_hdf_buf + _hdf_buf_ub)
Precondition
  • ((result - _hdf_buf) % _record_size) == 0

Definition at line 1713 of file dof_tuple_record_set.cc.

References _hdf_buf, _hdf_buf_record_map, _hdf_buf_ub, _record_size, sheaf::record_map< internal_index_type, external_index_type >::external_id(), get_first_record(), and get_internal_record().

Referenced by externalize_all_dofs(), internalize_all_dofs(), and populate_internal_dof_map().

◆ internalize()

void sheaf::dof_tuple_record_set::internalize ( )

Internalize the members of scafold().structure() from disk.

Precondition
  • scaffold().structure().state_is_read_write_accessible()
Postcondition

Definition at line 346 of file dof_tuple_record_set.cc.

References _writing, sheaf::record_set::is_open(), sheaf::record_set::name(), read_records(), sheaf::record_set::scaffold(), schematize(), and sheaf::poset_scaffold::translate_dof_tuple_col_bounds().

Referenced by sheaf::storage_agent::begin_read_transaction(), and open().

◆ internalize_all_dofs()

void sheaf::dof_tuple_record_set::internalize_all_dofs ( schema_poset_member xxfr_schema,
poset_dof_map xext_dof_map,
char *  xbuf,
size_t  xbuf_remainder 
)
protected

◆ invariant()

bool sheaf::dof_tuple_record_set::invariant ( ) const
virtual

◆ is_ancestor_of()

bool sheaf::dof_tuple_record_set::is_ancestor_of ( const any other) const
virtual

Conformance test; true if other conforms to this.

Precondition
  • other != 0

Reimplemented from sheaf::record_set.

Definition at line 179 of file dof_tuple_record_set.cc.

References dof_tuple_record_set().

Referenced by invariant().

◆ open()

◆ populate_internal_dof_map()

◆ queue() [1/2]

sheaf::record_queue & sheaf::dof_tuple_record_set::queue ( )

The queue of dof tuple record requests.

Definition at line 868 of file dof_tuple_record_set.cc.

References _record_queue.

Referenced by sheaf::member_record::externalize(), sheaf::member_record::internalize(), and record_size().

◆ queue() [2/2]

const sheaf::record_queue & sheaf::dof_tuple_record_set::queue ( ) const

The queue of dof tuple record requests.

Definition at line 888 of file dof_tuple_record_set.cc.

References _record_queue, and compute_ext_id().

◆ read_records()

void sheaf::dof_tuple_record_set::read_records ( )
protected

Read and internalizes all the records.

Precondition
  • scaffold().structure().state_is_read_write_accessible()
  • -unexecutable( "all tuple schema are comparable to column bounds decomposition" )
Hack:
Product subposet hack, version 2. We need to get the col bounds iterator from a schema member, not just a poset, because for section space schema we need to know the fiber id.
Hack:
the product subposet hack, ver 2. Make the schema get us a suitable key for the offset map.
Postcondition

Definition at line 392 of file dof_tuple_record_set.cc.

References _hdf_selection_ct, _next_record_pod, _record_queue, _record_size, attach_transfer_schema(), sheaf::schema_poset_member::bound_iterator(), sheaf::poset_dof_map::clone(), sheaf::record_queue::dequeue(), sheaf::poset_scaffold::dof_tuple_domain_offset(), sheaf::poset_scaffold::dof_tuple_ext_id(), sheaf::poset_scaffold::dof_tuple_schema_int_id(), sheaf::poset_scaffold::dof_tuple_schema_version(), externalize(), sheaf::schema_poset_member::get_ext_id(), get_first_record(), sheaf::poset_dof_map::host(), sheaf::poset_component::host(), sheaf::index_iterator::index(), sheaf::poset_dof_map::init_row_dof_map(), internalize_all_dofs(), sheaf::index_iterator::is_done(), sheaf::record_queue::is_empty(), sheaf::record_set::is_open(), sheaf::index_iterator::next(), populate_internal_dof_map(), sheaf::record_set::reset_record_buffer_ct(), sheaf::poset_state_handle::row_dof_map(), sheaf::record_set::scaffold(), sheaf::poset_dof_map::schema(), sheaf::poset_state_handle::schema(), sheaf::poset_scaffold::structure(), and sheaf::poset_scaffold::transfer_schema().

Referenced by internalize().

◆ read_selection()

void sheaf::dof_tuple_record_set::read_selection ( )
protected

◆ record_size()

sheaf::size_type sheaf::dof_tuple_record_set::record_size ( ) const

The size in bytes of data transfers to disk.

Definition at line 848 of file dof_tuple_record_set.cc.

References _record_size, and queue().

Referenced by externalize(), and externalize_domain().

◆ schematize()

◆ suffix()

const std::string & sheaf::dof_tuple_record_set::suffix ( ) const
virtual

The name suffix for this data set.

Reimplemented from sheaf::record_set.

Definition at line 278 of file dof_tuple_record_set.cc.

References open().

Referenced by dof_tuple_record_set().

◆ write_selection()

Member Data Documentation

◆ _hdf_buf

char* sheaf::dof_tuple_record_set::_hdf_buf
protected

◆ _hdf_buf_record_map

record_map<pod_index_type, pod_index_type> sheaf::dof_tuple_record_set::_hdf_buf_record_map
protected

The record id map for the hdf buffer.

Definition at line 254 of file dof_tuple_record_set.h.

Referenced by externalize(), externalize_domain(), get_internal_record(), and get_next_record().

◆ _hdf_buf_ub

size_t sheaf::dof_tuple_record_set::_hdf_buf_ub
protected

The HDF buffer upper bound.

Definition at line 229 of file dof_tuple_record_set.h.

Referenced by dof_tuple_record_set(), get_first_record(), get_next_record(), open(), read_selection(), and write_selection().

◆ _hdf_ext_selection

hsize_t(* sheaf::dof_tuple_record_set::_hdf_ext_selection)[1]
protected

The HDF external record selection buffer.

Definition at line 209 of file dof_tuple_record_set.h.

Referenced by dof_tuple_record_set(), externalize(), externalize_domain(), get_internal_record(), read_selection(), write_selection(), and ~dof_tuple_record_set().

◆ _hdf_int_selection

hsize_t(* sheaf::dof_tuple_record_set::_hdf_int_selection)[1]
protected

The HDF internal record selection buffer.

Hack:
Must use literal 1 in the next 2 declarations instead of static const data member to avoid bug in MS C++ which interprets initialization as definition and leads to violation of one-definition-rule at link time. Must be same value as DATASPACE_RANK in .cc

Definition at line 204 of file dof_tuple_record_set.h.

Referenced by dof_tuple_record_set(), externalize(), externalize_domain(), get_internal_record(), read_selection(), write_selection(), and ~dof_tuple_record_set().

◆ _hdf_scratch_buf

char* sheaf::dof_tuple_record_set::_hdf_scratch_buf
protected

Scratch buffer for internalizing dofs that span record boundaries.

Definition at line 260 of file dof_tuple_record_set.h.

Referenced by dof_tuple_record_set(), and ~dof_tuple_record_set().

◆ _hdf_scratch_buf_ub

size_t sheaf::dof_tuple_record_set::_hdf_scratch_buf_ub
protected

The size of the scratch buffer in bytes.

Definition at line 265 of file dof_tuple_record_set.h.

Referenced by dof_tuple_record_set(), and invariant().

◆ _hdf_selection_ct

int sheaf::dof_tuple_record_set::_hdf_selection_ct
protected

◆ _hdf_selection_ub

int sheaf::dof_tuple_record_set::_hdf_selection_ub
protected

The HDF record selection buffers upper bound.

Definition at line 214 of file dof_tuple_record_set.h.

Referenced by dof_tuple_record_set().

◆ _next_record_pod

pod_index_type sheaf::dof_tuple_record_set::_next_record_pod
protected

The index of the next buffer record to allocate for a read or write operation.

Issue:
ambiguous use of term "record". We're using "record" in two different ways. The original meaning was that a record was the external image of a dof tuple. When we began to support variable length dof tuples, record came to mean buffer record, the unit of contiguous data transfer to and from disk. This meaning of record is more or less the same thing as an HDF chunk.

Definition at line 244 of file dof_tuple_record_set.h.

Referenced by externalize(), externalize_domain(), get_internal_record(), and read_records().

◆ _record_is_full

zn_to_bool sheaf::dof_tuple_record_set::_record_is_full
protected

True if i-th record is full and should be written out.

Definition at line 249 of file dof_tuple_record_set.h.

Referenced by externalize(), externalize_domain(), and get_internal_record().

◆ _record_queue

record_queue sheaf::dof_tuple_record_set::_record_queue
protected

The record queue.

Definition at line 270 of file dof_tuple_record_set.h.

Referenced by externalize(), queue(), and read_records().

◆ _record_size

◆ _writing

bool sheaf::dof_tuple_record_set::_writing
protected

True if current operation is a write operation.

Definition at line 275 of file dof_tuple_record_set.h.

Referenced by externalize(), externalize_domain(), get_internal_record(), and internalize().


The documentation for this class was generated from the following files: