libfaster API Documentation  Development Version
Super fast distributted computing
faster::fdd< T > Class Template Reference

#include <fdd.h>

Inheritance diagram for faster::fdd< T >:
faster::fddCore< T > faster::fddBase

Description

template<class T>
class faster::fdd< T >

Fast Distributted Dataset(FDD) is like a cluster distributted Array. This class is the user side implementation.

Template Parameters
T- The type of the dataset entries

Definition at line 24 of file fastContext.h.

Public Member Functions

 fdd (fastContext &c)
 Create a empty fdd.
 
 fdd (fastContext &c, size_t s, const std::vector< size_t > &dataAlloc)
 Create a empty fdd with a pre allocated size.
 
 fdd (fastContext &c, size_t s)
 Create a empty fdd with a pre allocated size.
 
 fdd (fastContext &c, T *data, size_t size)
 Create a fdd from a array in memory.
 
 fdd (fastContext &c, std::vector< T > &dataV)
 Create a fdd from a vector in memory.
 
 fdd (fastContext &c, const char *fileName)
 Create a fdd from a file.
 
void assign (std::vector< T > &data)
 Assign a fdd content from a vector.
 
void assign (T *data, size_t size)
 Assign a fdd content from a array.
 
 ~fdd ()
 Class Destructor. WARNING: It will deallocate ditributted memory.
 
std::vector< T > collect ()
 Brings the distributted data from a FDD to the driver memory. More...
 
fdd< T > * cache ()
 Prevents automatic memory deallocation from hapenning. More...
 
template<typename U >
fdd< U > * map (mapFunctionP< T, U > funcP)
 creates a fdd<U>
 
template<typename U >
fdd< U > * map (PmapFunctionP< T, U > funcP)
 creates a fdd<U *>
 
template<typename L , typename U >
indexedFdd< L, U > * map (ImapFunctionP< T, L, U > funcP)
 creates a indexedFdd<L,U>
 
template<typename L , typename U >
indexedFdd< L, U > * map (IPmapFunctionP< T, L, U > funcP)
 creates a indexedFdd<L,U*>
 
template<typename U >
fdd< U > * bulkMap (bulkMapFunctionP< T, U > funcP)
 creates a fdd<U>
 
template<typename U >
fdd< U > * bulkMap (PbulkMapFunctionP< T, U > funcP)
 creates a fdd<U *>
 
template<typename L , typename U >
indexedFdd< L, U > * bulkMap (IbulkMapFunctionP< T, L, U > funcP)
 creates a indexedFdd<L,U>
 
template<typename L , typename U >
indexedFdd< L, U > * bulkMap (IPbulkMapFunctionP< T, L, U > funcP)
 creates a indexedFdd<L,U*>
 
template<typename U >
fdd< U > * flatMap (flatMapFunctionP< T, U > funcP)
 creates a fdd<U>
 
template<typename U >
fdd< U > * flatMap (PflatMapFunctionP< T, U > funcP)
 creates a fdd<U *>
 
template<typename L , typename U >
indexedFdd< L, U > * flatMap (IflatMapFunctionP< T, L, U > funcP)
 creates a indexedFdd<L,U>
 
template<typename L , typename U >
indexedFdd< L, U > * flatMap (IPflatMapFunctionP< T, L, U > funcP)
 creates a indexedFdd<L,U*>
 
template<typename U >
fdd< U > * bulkFlatMap (bulkFlatMapFunctionP< T, U > funcP)
 creates a fdd<U>
 
template<typename U >
fdd< U > * bulkFlatMap (PbulkFlatMapFunctionP< T, U > funcP)
 creates a fdd<U *>
 
template<typename L , typename U >
indexedFdd< L, U > * bulkFlatMap (IbulkFlatMapFunctionP< T, L, U > funcP)
 creates a indexedFdd<L,U>
 
template<typename L , typename U >
indexedFdd< L, U > * bulkFlatMap (IPbulkFlatMapFunctionP< T, L, U > funcP)
 creates a indexedFdd<L,U*>
 
reduce (reduceFunctionP< T > funcP)
 summarizes a fdd<T> into a single value of type T
 
bulkReduce (bulkReduceFunctionP< T > funcP)
 summarizes a fdd<T> into a single value of type T using a bulk function T F(T,T)
 
- Public Member Functions inherited from faster::fddCore< T >
void discard ()
 deallocates previusly cached fdd
 
void writeToFile (std::string &path, std::string &sufix)
 Writes FDD content to file. More...
 
void * getKeyMap ()
 (UNUSED)
 
void setKeyMap (void *keyMap UNUSED)
 (UNUSED)
 
bool isGroupedByKey ()
 (UNUSED)
 
void setGroupedByKey (bool gbk UNUSED)
 (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.
 

Additional Inherited Members

- Protected Member Functions inherited from faster::fddCore< T >
 fddCore (fastContext &c)
 
 fddCore (fastContext &c, size_t s, const std::vector< size_t > &dataAlloc)
 
fddBase_map (void *funcP, fddOpType op, fddBase *newFdd)
 
template<typename L , typename U >
indexedFdd< L, U > * mapI (void *funcP, fddOpType op)
 
template<typename U >
fdd< U > * map (void *funcP, fddOpType op)
 
- Protected Attributes inherited from faster::fddCore< T >
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

§ collect()

template<class T>
std::vector<T> faster::fdd< T >::collect ( )
inline

Brings the distributted data from a FDD to the driver memory.

Returns
a vector with the content of the FDD

Definition at line 136 of file fdd.h.


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