-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJobHandler.h
More file actions
39 lines (31 loc) · 777 Bytes
/
Copy pathJobHandler.h
File metadata and controls
39 lines (31 loc) · 777 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
//
// Created by user1 on 6/27/2024.
//
#ifndef _JOBHANDLER_H_
#define _JOBHANDLER_H_
#include "Context.h"
#include <vector>
#include <atomic>
class WarpContext;
class Context;
class JobHandler
{
private:
public:
std::atomic<int64_t> jobStateValues; // 2 bits - stage, 31 bits -
// total elements, 31 bits - elements
bool alreadyWaited;
std::vector<WarpContext*> warpVector;
std::vector<pthread_t> threads;
JobHandler();
~JobHandler();
void setJobHandlerState(int64_t stage);
void setJobHandlerElements(int64_t elements);
void setJobHandlerTotalElements(int64_t totalElements);
void addJobHandlerElements();
int64_t getJobStateValues();
void addContext(Context *context);
void
setJobHandlerAll (int64_t stage);
};
#endif //_JOBHANDLER_H_