File: OpenCLImageTypes.def

package info (click to toggle)
llvm-toolchain-5.0 1:5.0.1-2~bpo9+1
  • links: PTS, VCS
  • area: main
  • in suites: stretch-backports
  • size: 553,688 kB
  • sloc: cpp: 2,878,786; ansic: 584,110; asm: 246,252; python: 124,751; objc: 106,925; sh: 21,542; lisp: 8,628; pascal: 5,885; ml: 5,544; perl: 5,312; makefile: 2,208; cs: 2,022; xml: 686; php: 212; csh: 117
file content (88 lines) | stat: -rw-r--r-- 4,167 bytes parent folder | download | duplicates (12)
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
78
79
80
81
82
83
84
85
86
87
88
//===-- OpenCLImageTypes.def - Metadata about BuiltinTypes ------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//  This file extends builtin types database with OpenCL image singleton types.
//  Custom code should define one of those three macros:
//    GENERIC_IMAGE_TYPE(Type, Id) - a generic image with its Id without an
//      access type
//    IMAGE_TYPE(Type, Id, SingletonId, AccessType, CGSuffix) - an image type
//      with given ID, singleton ID access type and a codegen suffix
//    GENERIC_IMAGE_TYPE_EXT(Type, Id, Ext) - a generic image with its Id and
//      required extension without an access type

#ifdef GENERIC_IMAGE_TYPE

#define IMAGE_READ_TYPE(Type, Id, Ext) GENERIC_IMAGE_TYPE(Type, Id)
#define IMAGE_WRITE_TYPE(Type, Id, Ext)
#define IMAGE_READ_WRITE_TYPE(Type, Id, Ext)

#elif defined(GENERIC_IMAGE_TYPE_EXT)
#define IMAGE_READ_TYPE(Type, Id, Ext) GENERIC_IMAGE_TYPE_EXT(Type, Id##ROTy, Ext)
#define IMAGE_WRITE_TYPE(Type, Id, Ext) GENERIC_IMAGE_TYPE_EXT(Type, Id##WOTy, Ext)
#define IMAGE_READ_WRITE_TYPE(Type, Id, Ext) GENERIC_IMAGE_TYPE_EXT(Type, Id##RWTy, Ext)

#else
#ifndef IMAGE_READ_TYPE
#define IMAGE_READ_TYPE(Type, Id, Ext) \
          IMAGE_TYPE(Type, Id##RO, Id##ROTy,  read_only, ro)
#endif
#ifndef IMAGE_WRITE_TYPE
#define IMAGE_WRITE_TYPE(Type, Id, Ext) \
          IMAGE_TYPE(Type, Id##WO, Id##WOTy, write_only, wo)
#endif
#ifndef IMAGE_READ_WRITE_TYPE
#define IMAGE_READ_WRITE_TYPE(Type, Id, Ext) \
          IMAGE_TYPE(Type, Id##RW, Id##RWTy, read_write, rw)
#endif

#endif

IMAGE_READ_TYPE(image1d, OCLImage1d, "")
IMAGE_READ_TYPE(image1d_array, OCLImage1dArray, "")
IMAGE_READ_TYPE(image1d_buffer, OCLImage1dBuffer, "")
IMAGE_READ_TYPE(image2d, OCLImage2d, "")
IMAGE_READ_TYPE(image2d_array, OCLImage2dArray, "")
IMAGE_READ_TYPE(image2d_depth, OCLImage2dDepth, "")
IMAGE_READ_TYPE(image2d_array_depth, OCLImage2dArrayDepth, "")
IMAGE_READ_TYPE(image2d_msaa, OCLImage2dMSAA, "cl_khr_gl_msaa_sharing")
IMAGE_READ_TYPE(image2d_array_msaa, OCLImage2dArrayMSAA, "cl_khr_gl_msaa_sharing")
IMAGE_READ_TYPE(image2d_msaa_depth, OCLImage2dMSAADepth, "cl_khr_gl_msaa_sharing")
IMAGE_READ_TYPE(image2d_array_msaa_depth, OCLImage2dArrayMSAADepth, "cl_khr_gl_msaa_sharing")
IMAGE_READ_TYPE(image3d, OCLImage3d, "")

IMAGE_WRITE_TYPE(image1d, OCLImage1d, "")
IMAGE_WRITE_TYPE(image1d_array, OCLImage1dArray, "")
IMAGE_WRITE_TYPE(image1d_buffer, OCLImage1dBuffer, "")
IMAGE_WRITE_TYPE(image2d, OCLImage2d, "")
IMAGE_WRITE_TYPE(image2d_array, OCLImage2dArray, "")
IMAGE_WRITE_TYPE(image2d_depth, OCLImage2dDepth, "")
IMAGE_WRITE_TYPE(image2d_array_depth, OCLImage2dArrayDepth, "")
IMAGE_WRITE_TYPE(image2d_msaa, OCLImage2dMSAA, "cl_khr_gl_msaa_sharing")
IMAGE_WRITE_TYPE(image2d_array_msaa, OCLImage2dArrayMSAA, "cl_khr_gl_msaa_sharing")
IMAGE_WRITE_TYPE(image2d_msaa_depth, OCLImage2dMSAADepth, "cl_khr_gl_msaa_sharing")
IMAGE_WRITE_TYPE(image2d_array_msaa_depth, OCLImage2dArrayMSAADepth, "cl_khr_gl_msaa_sharing")
IMAGE_WRITE_TYPE(image3d, OCLImage3d, "cl_khr_3d_image_writes")

IMAGE_READ_WRITE_TYPE(image1d, OCLImage1d, "")
IMAGE_READ_WRITE_TYPE(image1d_array, OCLImage1dArray, "")
IMAGE_READ_WRITE_TYPE(image1d_buffer, OCLImage1dBuffer, "")
IMAGE_READ_WRITE_TYPE(image2d, OCLImage2d, "")
IMAGE_READ_WRITE_TYPE(image2d_array, OCLImage2dArray, "")
IMAGE_READ_WRITE_TYPE(image2d_depth, OCLImage2dDepth, "")
IMAGE_READ_WRITE_TYPE(image2d_array_depth, OCLImage2dArrayDepth, "")
IMAGE_READ_WRITE_TYPE(image2d_msaa, OCLImage2dMSAA, "cl_khr_gl_msaa_sharing")
IMAGE_READ_WRITE_TYPE(image2d_array_msaa, OCLImage2dArrayMSAA, "cl_khr_gl_msaa_sharing")
IMAGE_READ_WRITE_TYPE(image2d_msaa_depth, OCLImage2dMSAADepth, "cl_khr_gl_msaa_sharing")
IMAGE_READ_WRITE_TYPE(image2d_array_msaa_depth, OCLImage2dArrayMSAADepth, "cl_khr_gl_msaa_sharing")
IMAGE_READ_WRITE_TYPE(image3d, OCLImage3d, "")

#undef IMAGE_TYPE
#undef GENERIC_IMAGE_TYPE
#undef IMAGE_READ_TYPE
#undef IMAGE_WRITE_TYPE
#undef IMAGE_READ_WRITE_TYPE