-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathL3DeviceContext.h
More file actions
77 lines (61 loc) · 1.52 KB
/
Copy pathL3DeviceContext.h
File metadata and controls
77 lines (61 loc) · 1.52 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*
* Created on: May 27, 2013
* Author: Mirko Myllykoski (mirko.myllykoski@gmail.com)
*/
#ifndef PSCRCL_L3_DEVICE_CONTEXT
#define PSCRCL_L3_DEVICE_CONTEXT
#include "KernelHelper.h"
namespace pscrCL {
class L3DeviceContext {
public:
L3DeviceContext(
cl::Context &context,
cl::Device &device,
const OptValues &optValues,
int n3,
int l3Ldf1,
int l3Ldf2,
int l3MatLdf,
bool multibleLambda,
const PscrCLMode &mode);
void setArgs(
const cl::Buffer &devMemF,
const cl::Buffer &devMemTmp,
const cl::Buffer &devMemLambda2,
const cl::Buffer &devMemLambda3,
const cl::Buffer &devMemCoefMatrix);
// Returns the amount of global memory required to solve one tridiagonal
// system
int getL3Ldf3() const;
size_t getRequiredTmpSizePerSystem();
bool stageAEnabled() const;
bool stageBEnabled() const;
void run(
CommandQueue &queue,
int lambdaStride2,
int lambdaStride3,
int count2,
int count3,
const void *ch);
int getN3() const;
static Optimizer createOptimizer(
const cl::Device &device,
int n3,
const PscrCLMode &mode);
static bool checkOptValues(
const cl::Device &device,
const OptValues &optValues,
int n3,
const PscrCLMode &mode,
std::string *err);
private:
Optimizer optimizer;
OptValues optValues;
KernelHelper helper;
PscrCLMode mode;
int n3;
int l3Ldf3;
bool argsAreSet;
};
}
#endif // L3DEVICECONTEXT_H_