FasTensor
1.0.0
Transform Supercomputing for AI
|
#include <vector>
#include <type_traits>
#include <cstring>
#include <cmath>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <tuple>
#include <string>
#include <sstream>
#include <algorithm>
#include <iterator>
#include <iostream>
#include <utility>
#include <variant>
#include <dirent.h>
#include "ft_type.h"
#include "ft_utility_macro.h"
#include <iomanip>
Go to the source code of this file.
Macros | |
#define | V2VOIDP(vv) static_cast<void *>(vv.data()) |
#define | ExtractAttributeFromVirtualArrayVector_HELPER(ELEMENT_TYPE) |
Functions | |
std::string | realpathEx (std::string path) |
expand the path to full directory https://www.dreamincode.net/forums/topic/218601-realpath-and-tilde/ More... | |
std::vector< std::string > | GetDirFileList (std::string dir_str_p) |
Get file list of a direction. More... | |
int | ExtractEndpointTypeInfo (std::string endpoint_type_info, AuEndpointType &endpoint_type, std::string &endpoint_info) |
Split endpoint_type_info string to type and information. More... | |
int | file_exist (const char *filename) |
Check wether the file exists. More... | |
std::string | ExtractFileName (const std::string &fullPath) |
std::string | ExtractPath (const std::string &fullPath) |
template<typename T > | |
void | PrintVector (std::string name, std::vector< T > v) |
template<typename T > | |
void | PrintVV (std::string name, std::vector< std::vector< T >> v) |
template<typename T > | |
void | PrintScalar (std::string name, T v) |
template<typename T > | |
void | PrintString (std::string name) |
unsigned long long | RowMajorOrder (std::vector< unsigned long long > dsize, std::vector< unsigned long long > coordinate) |
convert coordinate to linearized one More... | |
std::vector< unsigned long long > | RowMajorOrderReverse (unsigned long long offset, std::vector< unsigned long long > dsize) |
convert linearized coordinate to multidimensional one More... | |
template<class T1 , class T2 > | |
void | InsertAttribute2VirtualArrayVector (const std::vector< T1 > &attribute_vector, AuEndpointDataType union_index, std::vector< T2 > &virtual_array_vector, int attribute_index) |
template<> | |
void | InsertAttribute2VirtualArrayVector< AuEndpointDataTypeUnion, std::complex< double > > (const std::vector< AuEndpointDataTypeUnion > &attribute_vector, AuEndpointDataType union_index, std::vector< std::complex< double >> &virtual_array_vector, int attribute_index) |
template<class T2 > | |
void * | ExtractAttributeFromVirtualArrayVector (std::vector< T2 > &virtual_array_vector, int attribute_index, AuEndpointDataType element_type, int element_type_size) |
template<> | |
void * | ExtractAttributeFromVirtualArrayVector< std::complex< double > > (std::vector< std::complex< double >> &virtual_array_vector, int attribute_index, AuEndpointDataType element_type, int element_type_size) |
template<typename T > | |
std::string | Vector2String (const std::vector< T > &vec) |
template<typename T > | |
void | String2Vector (const std::string &str, std::vector< T > &vec_new) |
Variables | |
int | ft_rank |
#define ExtractAttributeFromVirtualArrayVector_HELPER | ( | ELEMENT_TYPE | ) |
#define V2VOIDP | ( | vv | ) | static_cast<void *>(vv.data()) |
Author: Bin Dong dbin@ Web: lbl. govhttps://crd.lbl.gov/bin-dong Scientific Data Management Research Group Lawrence Berkeley National Laboratory
|
inline |
|
inline |
int ExtractEndpointTypeInfo | ( | std::string | endpoint_type_info, |
AuEndpointType & | endpoint_type, | ||
std::string & | endpoint_info | ||
) |
Split endpoint_type_info string to type and information.
endpoint_type_info,information | string for the endpoint |
endpoint_type,output | value containing the type |
endpoint_info,output | value containging all other parts |
std::string ExtractFileName | ( | const std::string & | fullPath | ) |
fullPath |
std::string ExtractPath | ( | const std::string & | fullPath | ) |
fullPath |
int file_exist | ( | const char * | filename | ) |
Check wether the file exists.
filename |
std::vector<std::string> GetDirFileList | ( | std::string | dir_str_p | ) |
Get file list of a direction.
dir_str_p |
|
inline |
T1 | |
T2 |
attribute_vector | it is type of AuEndpointDataTypeUnion |
virtual_array_vector | |
index |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
std::string realpathEx | ( | std::string | path | ) |
expand the path to full directory https://www.dreamincode.net/forums/topic/218601-realpath-and-tilde/
path | |
buff |
Author: Bin Dong dbin@ Web: lbl. govhttps://crd.lbl.gov/bin-dong Scientific Data Management Research Group Lawrence Berkeley National Laboratory
|
inline |
convert coordinate to linearized one
dsize | : size of all dimensions of the data |
coordinate | : multidimensional coordinate |
|
inline |
convert linearized coordinate to multidimensional one
offset | : linearized coordinate |
dsize | : data size |
void String2Vector | ( | const std::string & | str, |
std::vector< T > & | vec_new | ||
) |
std::string Vector2String | ( | const std::vector< T > & | vec | ) |
|
extern |