]> git.sesse.net Git - freerainbowtables/blob - BOINC software/BOINC client apps/distrrtgen_cuda/rcuda.h
merge all the algorithms for distrrtgen_cuda
[freerainbowtables] / BOINC software / BOINC client apps / distrrtgen_cuda / rcuda.h
1 #ifndef RCUDA_H
2 #define RCUDA_H
3
4 #include "Public.h"
5
6 namespace rcuda {
7
8 enum RHash { RHASH_UNDEF = -1, RHASH_LM, RHASH_MD4, RHASH_MD5, RHASH_SHA1, RHASH_NTLM };
9
10 struct RCudaTask {
11         RHash hash;
12         uint64 startIdx;
13         int idxCount;
14         unsigned char* stPlain;
15         int stPlainSize;
16         unsigned int* dimVec;
17         int dimVecSize;
18         unsigned char* charSet;
19         int charSetSize;
20         int *cpPositions;
21         int cpPosSize;
22         uint64 reduceOffset;
23         uint64 plainSpaceTotal;
24         unsigned int rainbowChainLen;
25 };
26
27 extern "C" int SetCudaDevice(int device);
28 extern "C" int GetChainsBufferSize(int minSize);
29 extern "C" int CalcChainsOnCUDA(const RCudaTask* task, uint64 *resultBuff);
30
31 }
32
33 #endif //RCUDA_H