Skip to content

sbio::FormatTraits

template<typename T, typename IO, typename EPolicy>
concept=
HasBoundedDataDimensions<T> &&
HasCountableDataUnits<T> &&
CanFindAndConfigureStreams<T> &&
CanAllocateStorage<T> &&
HasDataRequest<T> &&
HasStreamState<
T,
StorageView<Storage<typename T::BrokerBufferRequirements, EPolicy>, EPolicy>> &&
CanDiscoverMetadata<
T,
IO,
StorageView<Storage<typename T::BrokerBufferRequirements, EPolicy>, EPolicy>> &&
(HasGenericIndex<T> ||
CanFetchStreamData<
T,
IO,
StorageView<Storage<typename T::BrokerBufferRequirements, EPolicy>, EPolicy>>) &&
CanResolveData<T> &&
CanFillBuffer<
T,
IO,
StorageView<Storage<typename T::BrokerBufferRequirements, EPolicy>, EPolicy>>;

FormatTraits Theconcept defines a conforming data-format implementation. A struct implementing the following constraints is both necessary and sufficient to serve as a data-format implementation for the rest of the generic sbio infrastructure. There are a number of additional concepts which can be used to test for optional APIs and features of a data-format implementation. The concept is subdivided into a number of sub-concepts for various pieces of the overall API. A conforming struct will look something like the following: struct keyword ImplementsFormatTraits{ normal normal //HasBoundedDataDimensions comment normal normal //———————— comment normal normal static keyword normal constexpr keyword std::size_tHeaderSize{0}; normal normal static keyword normal constexpr keyword MaxRank namespacesbio_1_1XTC1_1a312c806750b28b990f6cf7996d3740b1 member std::uint16_t{1}; normal normal static keyword normal constexpr keyword MaxNameSize namespacesbio_1_1XTC1_1a238097828eda5f09e7ade7fab018203a member std::uint16_t{1}; normal normal normal //HasCountableDataUnits comment normal normal //——————— comment normal normal using keyword DataUnit=void; normal normal using keyword StepIdxType=std::size_t; normal normal static keyword normal constexpr keyword StepIdxTypeExhaustedSentinel{ normal static_cast< keyword StepIdxType normal > keyword (-1)}; normal normal normal //CanFindAndConfigureStreams comment normal normal //––––––––––––– comment normal normal static keyword normal constexpr keyword StreamPartitioningStrategy namespacesbio_1a6633fab915f70b2c4721451902f09ef9 member PartitioningStrategy{ normal StreamPartitioningStrategy::SubDivide normal }; normal normal normal struct keyword DataStream: normal public keyword StreamVariantroles::Data{}; normal normal using keyword StreamTypes=StreamSet; normal normal normal enumclass keyword DataAccessPtn:std::uint8_t{}; normal normal static keyword normal constexpr keyword std::size_tDataAccessPtnCount{0}; normal normal struct keyword StreamParameters{}; normal normal normal //CanAllocateStorage comment normal normal //—————— comment normal normal using keyword BrokerBufferRequirements=RequirementsList<>; normal normal static keyword AllocationRequestget_allocation_request(GenericStreamConfig&cfg); normal normal normal //HasDataRequest comment normal normal //––––––– comment normal normal struct keyword DataRequest{}; normal normal normal //HasStreamState comment normal normal //––––––– comment normal normal struct keyword FieldMetadata{}; normal normal normal //CanDiscoverMetadata comment normal normal //—————————————–– comment normal normal template keyword <IOTraitsIO, normal class keyword StorageViewT> normal normal static keyword IOStatus namespacesbio_1a017cdaf6cbac1288d961ce4f1c0da518 member discover_metadata(Stream<IO,T>*streams, normal StorageViewT&storage, normal MetadataInventory&inv); normal normal normal //CanIndexStreams[[OPTIONAL]] comment normal normal //————— comment normal normal template keyword <IOTraitsIO, normal class keyword StorageViewT> normal normal static keyword IOStatus namespacesbio_1a017cdaf6cbac1288d961ce4f1c0da518 member index_stream(Stream<IO,T>*streams, normal StorageViewT&storage, normal StreamCatalog&catalog, normal IndexingCursor&cursor, normal normal const keyword StreamParameters&cfg); normal normal normal //CanFetchStreamData comment normal normal //—————— comment normal normal template keyword <IOTraitsIO, normal class keyword StorageViewT> normal normal static keyword IOStatus namespacesbio_1a017cdaf6cbac1288d961ce4f1c0da518 member fetch_step(Stream<IO,T>*streams, normal StorageViewT&storage, normal normal const keyword StreamCatalog&catalog, normal FetchCursor&cursor, normal normal const keyword GenericStreamConfig&cfg, normal StepIdxTypestep_idx, normal DataAccessPtnptn); normal normal normal //CanResolveData&&CanFillBuffer comment normal normal //—————————–– comment normal normal //Thecachebelongstothecallerparallelunit(likelyfromSegmentCursor) comment normal normal //Itstoresanoffsetforwheretherequestedfieldwasfoundwihtinthebuf. comment normal normal //Itissafetowrite/updatethatoffset,withoutsynchronization. comment normal normal static keyword normal inline keyword DataResultresolve_data( normal void keywordtype *buf, normal normal const keyword MetadataInventory&inv, normal normal const keyword DataRequest&req, normal PayloadOffsetCache&cache); normal normal static keyword std::size_tget_payload_size( normal void keywordtype *buf); normal normal normal template keyword < normal class keyword StorageViewT> normal normal static keyword DataResultget_data_in_buffer(StorageViewT&storage, normal normal const keyword MetadataInventory&inv, normal normal const keyword DataRequest&req, normal PayloadOffsetCache&cache, normal DataAccessPtnptn, normal std::size_tbatch_idx); normal }; normal .cpp