PIPS
freia_opencl.h
Go to the documentation of this file.
1
/*
2
3
$Id: freia_opencl.h 23065 2016-03-02 09:05:50Z coelho $
4
5
Copyright 1989-2016 MINES ParisTech
6
7
This file is part of PIPS.
8
9
PIPS is free software: you can redistribute it and/or modify it
10
under the terms of the GNU General Public License as published by
11
the Free Software Foundation, either version 3 of the License, or
12
any later version.
13
14
PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
15
WARRANTY; without even the implied warranty of MERCHANTABILITY or
16
FITNESS FOR A PARTICULAR PURPOSE.
17
18
See the GNU General Public License for more details.
19
20
You should have received a copy of the GNU General Public License
21
along with PIPS. If not, see <http://www.gnu.org/licenses/>.
22
23
*/
24
25
/*
26
* data structures that describe FREIA OpenCL target.
27
*/
28
29
#ifndef HWAC_FREIA_OPENCL_H_
30
#define HWAC_FREIA_OPENCL_H_
31
32
// property name, whether to attempt to merge operations
33
#define opencl_merge_prop "HWAC_OPENCL_MERGE_OPERATIONS"
34
35
// OpenCL types for the generated code
36
#define OPENCL_PIXEL "PIXEL "
37
#define OPENCL_IMAGE "GLOBAL "
OPENCL_PIXEL "* "
38
39
// includes for OpenCL helper
40
#define FREIA_OPENCL_INCLUDES \
41
"// FREIA OpenCL includes\n"
\
42
"#include <CL/opencl.h>\n" \
43
"#include \"freia.h\"\n" \
44
"#include \"private/freia_opencl_runtime.h\"\n" \
45
"\n"
46
47
// raw include for opencl code generation
48
#define FREIA_OPENCL_CL_INCLUDES \
49
"#include <freia_opencl_runtime.hcl>"
50
51
// information about OpenCL handling of an operation
52
typedef
struct
{
53
// whether it can be merged
54
bool
mergeable
;
55
// special case for some kernel-based operations
56
bool
mergeable_kernel
;
57
// if mergeable, the name of the pixel operation macro
58
string
macro
;
59
// and maybe the initial value:
60
string
init
;
// not needed?
61
}
opencl_hw_t
;
62
63
#endif
// !HWAC_FREIA_OPENCL_H_
opencl_hw_t
Definition:
freia_opencl.h:52
opencl_hw_t::init
string init
Definition:
freia_opencl.h:60
opencl_hw_t::mergeable_kernel
bool mergeable_kernel
Definition:
freia_opencl.h:56
opencl_hw_t::mergeable
bool mergeable
Definition:
freia_opencl.h:54
opencl_hw_t::macro
string macro
Definition:
freia_opencl.h:58
pips
src
Libs
hwac
freia_opencl.h
Generated on Thu Sep 26 2024 22:11:39 for PIPS by
1.9.1