FasTensor  1.0.0
Transform Supercomputing for AI
Public Member Functions | List of all members
EndpointDIR Class Reference

#include <src/ft_endpoint_dir.h>

Inheritance diagram for EndpointDIR:
Endpoint

Public Member Functions

 EndpointDIR (std::string endpoint_info_p)
 Construct a new EndpointDIR object. More...
 
 EndpointDIR ()
 
 ~EndpointDIR ()
 
int ExtractMeta () override
 extracts metadata, possbile endpoint_ranks/endpoint_dim_size/data_element_type More...
 
int PrintInfo () override
 print information about the endpoint More...
 
int Create () override
 create the endpoint More...
 
int Open () override
 open the endpoint More...
 
int Read (std::vector< unsigned long long > start, std::vector< unsigned long long > end, void *data) override
 read the data from end-point More...
 
int Write (std::vector< unsigned long long > start, std::vector< unsigned long long > end, void *data) override
 write the data to the end-point More...
 
int Close () override
 close the end-point More...
 
void Map2MyType () override
 call the finalize to close everything (like call Destractor) More...
 
void EnableCollectiveIO () override
 
void DisableCollectiveIO () override
 
int ParseEndpointInfo () override
 parse endpoint_info to my own info More...
 
std::vector< int > GetDirChunkSize () override
 Get the Chunk Size object. More...
 
void SetDirChunkSize (std::vector< int > &dir_chunk_size_p) override
 Set the Dir Chunk Size object. More...
 
std::vector< std::string > GetDirFileVector () override
 Get the Dir File Vector object. More...
 
void SetDirFileVector (std::vector< std::string > &file_list) override
 Set the Dir File Vector object. More...
 
int Control (int opt_code, std::vector< std::string > &parameter_v) override
 call a special operator on endpoint such as, enable collective I/O for HDF5 dump file from MEMORY to HDF5 More...
 
void SetMergeIndex (int index_p)
 Set the Merge Index. More...
 
int GetMergeIndex ()
 Get the Merge Index object. More...
 
int WriteAttribute (const std::string &name, const void *data, FTDataType data_type_p, const size_t &data_length_p=0) override
 Set the Attribute object Do not need to be pure virtual method. More...
 
int ReadAttribute (const std::string &name, void *data, FTDataType data_type_p, const size_t &data_length_p=0) override
 Get the Attribute object Do not need to be pure virtual method. More...
 
int GetAttributeSize (const std::string &name, FTDataType data_type_p) override
 
int ReadAllAttributeName (std::vector< std::string > &attr_name)
 Read all attribute name. More...
 
- Public Member Functions inherited from Endpoint
 Endpoint ()
 
virtual ~Endpoint ()
 
std::vector< unsigned long long > GetDimensions ()
 Get the Dimensions of the data. More...
 
void SetDimensions (std::vector< unsigned long long > endpoint_dim_size_p)
 Set the Dimensions. More...
 
void SetDataElementType (AuEndpointDataType data_element_type_p)
 set the type of data element More...
 
AuEndpointDataType GetDataElementType ()
 Get the Type of Data Element. More...
 
int GetDataElementTypeSize ()
 Get the size of the type for the element. More...
 
void SetEndpointType (AuEndpointType endpoint_type_p)
 Set the Endpoint Type object. More...
 
AuEndpointType GetEndpointType ()
 Get the Endpoint Type object. More...
 
bool GetOpenFlag ()
 
void SetOpenFlag (bool open_flag_p)
 
bool GetCreateFlag ()
 
void SetCreateFlag (bool open_flag_p)
 
void SetRwFlag (unsigned read_write_flag_p)
 
unsigned GetRwFlag ()
 
std::vector< AuEndpointDataTypeUnionVoid2Union (void *vp, size_t n_elements)
 convert my data in (void *) type to Union type More...
 
void * Union2Void (std::vector< AuEndpointDataTypeUnion > &data_vector_in_union_type)
 convert data from union to void type More...
 
void SetEndpointInfo (std::string endpoint_info_p)
 set the endpoint_info string More...
 
std::string GetEndpointInfo ()
 Get the endpoint_info string. More...
 
virtual int MapOpStr2Int (std::string op_cmd_str)
 map a op_cmd_str to int as input of SpecialOperator More...
 
virtual std::string MapOpInt2Str (int op_int)
 map op_int to string More...
 

Additional Inherited Members

- Protected Attributes inherited from Endpoint
AuEndpointType endpoint_type
 
std::string endpoint_info
 
std::vector< unsigned long long > endpoint_size
 
int endpoint_ranks
 
AuEndpointDataType data_element_type
 
std::string data_endpoint_orig
 
bool set_endpoint_dim_size_flag = false
 
bool open_flag = false
 
bool create_flag = false
 
unsigned read_write_flag
 

Constructor & Destructor Documentation

◆ EndpointDIR() [1/2]

EndpointDIR::EndpointDIR ( std::string  endpoint_info_p)
inline

Construct a new EndpointDIR object.

Parameters
data_endpointcontains the info of the endpoint, e.g., file type + file info

◆ EndpointDIR() [2/2]

EndpointDIR::EndpointDIR ( )
inline

◆ ~EndpointDIR()

EndpointDIR::~EndpointDIR ( )
inline

Member Function Documentation

◆ Close()

int EndpointDIR::Close ( )
overridevirtual

close the end-point

Returns
int int < 0 error, >= 0 works

Implements Endpoint.

◆ Control()

int EndpointDIR::Control ( int  opt_code,
std::vector< std::string > &  parameter_v 
)
overridevirtual

call a special operator on endpoint such as, enable collective I/O for HDF5 dump file from MEMORY to HDF5

Parameters
opt_code,speciallydefined code

Reimplemented from Endpoint.

◆ Create()

int EndpointDIR::Create ( )
overridevirtual

create the endpoint

Returns
< 0 error, >= 0 works

Implements Endpoint.

◆ DisableCollectiveIO()

void EndpointDIR::DisableCollectiveIO ( )
overridevirtual

Reimplemented from Endpoint.

◆ EnableCollectiveIO()

void EndpointDIR::EnableCollectiveIO ( )
overridevirtual

Reimplemented from Endpoint.

◆ ExtractMeta()

int EndpointDIR::ExtractMeta ( )
overridevirtual

extracts metadata, possbile endpoint_ranks/endpoint_dim_size/data_element_type

Returns
int < 0 error, >= 0 works

Implements Endpoint.

◆ GetAttributeSize()

int EndpointDIR::GetAttributeSize ( const std::string &  name,
FTDataType  data_type_p 
)
overridevirtual

Reimplemented from Endpoint.

◆ GetDirChunkSize()

std::vector< int > EndpointDIR::GetDirChunkSize ( )
overridevirtual

Get the Chunk Size object.

Returns
std::vector<int>

Reimplemented from Endpoint.

◆ GetDirFileVector()

std::vector< std::string > EndpointDIR::GetDirFileVector ( )
overridevirtual

Get the Dir File Vector object.

Returns
std::vector<std::string>

Reimplemented from Endpoint.

◆ GetMergeIndex()

int EndpointDIR::GetMergeIndex ( )

Get the Merge Index object.

Returns
int

◆ Map2MyType()

void EndpointDIR::Map2MyType ( )
overridevirtual

call the finalize to close everything (like call Destractor)

Returns
int

Implements Endpoint.

◆ Open()

int EndpointDIR::Open ( )
overridevirtual

open the endpoint

Returns
< 0 error, >= 0 works

Implements Endpoint.

◆ ParseEndpointInfo()

int EndpointDIR::ParseEndpointInfo ( )
overridevirtual

parse endpoint_info to my own info

Returns
int: 0 works, < 0 error,

Implements Endpoint.

◆ PrintInfo()

int EndpointDIR::PrintInfo ( )
overridevirtual

print information about the endpoint

Returns
< 0 error, >= 0 works

Implements Endpoint.

◆ Read()

int EndpointDIR::Read ( std::vector< unsigned long long >  start,
std::vector< unsigned long long >  end,
void *  data 
)
overridevirtual

read the data from end-point

Parameters
start,coordinatesof the cell to start (including)
end,coordinatesof the cell to end (including)
data,storethe result data
Returns
int < 0 error, >= 0 works

Implements Endpoint.

◆ ReadAllAttributeName()

int EndpointDIR::ReadAllAttributeName ( std::vector< std::string > &  attr_name)

Read all attribute name.

Parameters
attri_name
Returns
int

◆ ReadAttribute()

int EndpointDIR::ReadAttribute ( const std::string &  name,
void *  data,
FTDataType  data_type_p,
const size_t &  data_length_p = 0 
)
overridevirtual

Get the Attribute object Do not need to be pure virtual method.

Parameters
name
data
Returns
int

Reimplemented from Endpoint.

◆ SetDirChunkSize()

void EndpointDIR::SetDirChunkSize ( std::vector< int > &  dir_chunk_size_p)
overridevirtual

Set the Dir Chunk Size object.

Parameters
dir_chunk_size_p

Reimplemented from Endpoint.

◆ SetDirFileVector()

void EndpointDIR::SetDirFileVector ( std::vector< std::string > &  file_list)
overridevirtual

Set the Dir File Vector object.

Parameters
file_list

Reimplemented from Endpoint.

◆ SetMergeIndex()

void EndpointDIR::SetMergeIndex ( int  index_p)

Set the Merge Index.

Parameters
index_p

◆ Write()

int EndpointDIR::Write ( std::vector< unsigned long long >  start,
std::vector< unsigned long long >  end,
void *  data 
)
overridevirtual

write the data to the end-point

Parameters
start,coordinatesof the cell to start (including)
end,coordinatesof the cell to end (including)
data,storethe result data
Returns
int < 0 error, >= 0 works

Implements Endpoint.

◆ WriteAttribute()

int EndpointDIR::WriteAttribute ( const std::string &  name,
const void *  data,
FTDataType  data_type_p,
const size_t &  data_length_p = 0 
)
overridevirtual

Set the Attribute object Do not need to be pure virtual method.

Parameters
name
data
Returns
int

Reimplemented from Endpoint.


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