libfaster API Documentation  Development Version
Super fast distributted computing
faster::iFddCore< K, T > Class Template Reference
Inheritance diagram for faster::iFddCore< K, T >:
faster::fddBase faster::indexedFdd< K, T >

Description

template<typename K, typename T>
class faster::iFddCore< K, T >

Definition at line 13 of file groupedFdd.h.

Public Member Functions

template<typename U >
groupedFdd< K > * cogroup (iFddCore< K, U > *fdd1)
 Groupes two datasets twogether according with the keys of the first dataset. More...
 
template<typename U , typename V >
groupedFdd< K > * cogroup (iFddCore< K, U > *fdd1, iFddCore< K, V > *fdd2)
 Groupes tree datasets together according with the keys of the first dataset. More...
 
std::unordered_map< K, size_t > countByKey ()
 Count how many unique key there is in the dataset. More...
 
indexedFdd< K, T > * groupByKey ()
 Groups distributed dataset by key. More...
 
void discard ()
 deallocates previously cached FDD
 
void writeToFile (std::string path, std::string sufix)
 Writes FDD content to file. More...
 
bool isGroupedByKey ()
 Determines if a dataset is grouped by key. More...
 
void setGroupedByKey (bool gbk)
 (UNUSED)
 
void setGroupedByMap (bool gbm)
 (UNUSED)
 
- Public Member Functions inherited from faster::fddBase
void setSize (size_t &s)
 
size_t getSize ()
 Returns the size of the dataset.
 
int getId ()
 Returns the identification number of the dataset.
 
const std::vector< size_t > & getAlloc ()
 Returns the allocation identification number of the dataset.
 
fddType tType ()
 
fddType kType ()
 
bool isCached ()
 Returns true if the dataset is cached.
 

Protected Member Functions

 iFddCore (fastContext &c)
 
 iFddCore (fastContext &c, size_t s, const std::vector< size_t > &dataAlloc)
 
std::unordered_map< K, std::tuple< size_t, int, size_t > > * calculateKeyCount (std::vector< std::pair< void *, size_t > > &result)
 
std::unordered_map< K, int > calculateKeyMap (std::unordered_map< K, std::tuple< size_t, int, size_t >> &count)
 
void update (void *funcP, fddOpType op)
 
fddBase_map (void *funcP, fddOpType op, fddBase *newFdd, system_clock::time_point &start)
 
template<typename U >
fdd< U > * map (void *funcP, fddOpType op)
 
template<typename L , typename U >
indexedFdd< L, U > * mapI (void *funcP, fddOpType op)
 
indexedFdd< K, T > * groupByKeyMapped ()
 
indexedFdd< K, T > * groupByKeyHashed ()
 

Protected Attributes

bool groupedByKey
 
bool groupedByMap
 
fastContextcontext
 
- Protected Attributes inherited from faster::fddBase
fddType _kType
 
fddType _tType
 
unsigned long int id
 
unsigned long int totalBlocks
 
unsigned long int size
 
std::vector< size_t > dataAlloc
 
bool cached
 

Member Function Documentation

§ countByKey()

template<typename K , typename T >
std::unordered_map< K, size_t > faster::iFddCore< K, T >::countByKey ( )

Count how many unique key there is in the dataset.

Returns
a unordered_map (hash) of the key count.

Definition at line 637 of file indexedFdd.h.

§ isGroupedByKey()

template<typename K, typename T>
bool faster::iFddCore< K, T >::isGroupedByKey ( )
inlinevirtual

Determines if a dataset is grouped by key.

Returns
true is it has been groupe by key

Implements faster::fddBase.

Definition at line 152 of file indexedFdd.h.

§ writeToFile()

template<typename K , typename T >
void faster::iFddCore< K, T >::writeToFile ( std::string  path,
std::string  sufix 
)

Writes FDD content to file.

Every process will write its own file with a rank number between the prefix and the suffix.

Parameters
path- Prefix of the file path to be written
sufix- Sufix of the file path to be written

Definition at line 861 of file indexedFdd.h.


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