4 #include "_workerIFdd.h" 5 #include "indexedFddStorageExtern.cpp" 11 template <
typename K,
typename T>
13 T ** d = this->localData->getData();
14 std::tuple<K,T*,size_t> resultT;
15 size_t s = this->localData->getSize();
16 size_t * ils = this->localData->getLineSizes();
17 K * ik = this->localData->getKeys();
22 int nT = omp_get_num_threads();
23 int tN = omp_get_thread_num();
24 std::tuple<K,T*,size_t> partResult (ik[tN], d[tN], ils[tN]);
30 for (
int i = nT; i < s; ++i){
31 aKey = std::get<0>(partResult);
32 a = std::get<1>(partResult);
33 aSize = std::get<2>(partResult);
38 partResult = reduceFunc( aKey, a, aSize, bKey, b, bSize );
49 if (omp_get_thread_num() != 0){
50 aKey = std::get<0>(resultT);
51 a = std::get<1>(resultT);
52 aSize = std::get<2>(resultT);
54 bKey = std::get<0>(partResult);
55 b = std::get<1>(partResult);
56 bSize = std::get<2>(partResult);
58 resultT = reduceFunc(aKey, a, aSize, bKey, b, bSize);
68 template <
typename K,
typename T>
70 K * ik = this->localData->getKeys();
71 return bulkReduceFunc(ik, this->localData->getData(), this->localData->getLineSizes(), this->localData->getSize());
75 template <
typename K,
typename T>
77 std::tuple<K,T*,size_t> r;
81 r = reduce(( IPreduceIPFunctionP<K,T> ) func);
85 r = bulkReduce(( IPbulkReduceIPFunctionP<K,T> ) func);
98 template <
typename K,
typename T>
100 this->localData->setData(keys, data, lineSizes, size);
104 template <
typename K,
typename T>
106 this->localData->setDataRaw(keys, data, lineSizes, size);
109 template <
typename K,
typename T>
111 return this->localData->getLineSizes();
115 template <
typename K,
typename T>
117 this->localData->insert(*(K *) k, (T*&) in, s);
119 template <
typename K,
typename T>
121 insert( *(std::deque<std::tuple<K,T*, size_t>>*) in);
127 template <
typename K,
typename T>
129 this->localData->insert(key, in, s);
132 template <
typename K,
typename T>
134 typename std::deque< std::tuple<K, T*, size_t> >::iterator it;
136 if (this->localData->getSize() < in.size())
137 this->localData->grow(in.size());
139 for ( it = in.begin(); it != in.end(); it++)
140 this->localData->insert(std::get<0>(*it), std::get<1>(*it), std::get<2>(*it));
144 template <
typename K,
typename T>
146 if (op & OP_GENERICMAP)
147 applyDependent(func, op, dest);
149 applyIndependent(func, op, buffer);
154 template <
typename K,
typename T>
156 comm->sendFDDDataCollect(this->
id, this->localData->getKeys(), this->localData->getData(), this->localData->getLineSizes(), this->localData->getSize());
unsigned int fddOpType
Dataset operation type.