[go: up one dir, main page]

Menu

[r30]: / client / speclient.h  Maximize  Restore  History

Download this file

48 lines (38 with data), 738 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef __SECTOR_H__
#define __SECTOR_H__
#include "client.h"
#include <string>
#include <spe.h>
#include <pthread.h>
using namespace std;
using namespace cb;
struct STREAM
{
string m_strDataFile;
int64_t m_llSize;
int32_t m_iUnitSize;
};
class SPEClient: public Client
{
public:
SPEClient();
~SPEClient();
int createJob(STREAM stream, string op, const char* param = NULL, const int& size = 0);
int releaseJob();
int run();
int read(char*& data, int& size);
private:
static void* run(void*);
private:
vector<SPE> m_vSPE;
private:
struct Result
{
char* m_pcRes;
int m_iSize;
};
vector<Result> m_vResult;
pthread_mutex_t m_ResLock;
pthread_cond_t m_ResCond;
};
#endif