Blink API
BlinkTypes.h
Go to the documentation of this file.
1 // Copyright (c) 2013 The Foundry Visionmongers Ltd. All Rights Reserved.
2 
7 #ifndef Blink_Library_BlinkTypes_h
8 #define Blink_Library_BlinkTypes_h
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 typedef long long BlinkFlagType;
14 
15 typedef BlinkFlagType BlinkCodegenFlags;
16 typedef BlinkFlagType BlinkDataType;
17 typedef BlinkFlagType BlinkPropertyType;
18 typedef BlinkFlagType BlinkErrorProperty;
19 
20 // Kernel type (Iteration, Rolling, etc...)
21 typedef BlinkFlagType BlinkKernelType;
22 
23 typedef BlinkFlagType BlinkKernelGranularity;
24 
25 // Type of image access (Read or write)
26 typedef BlinkFlagType BlinkImageAccessType;
27 
28 // Pattern (Point, Ranged1D, etc...)
29 typedef BlinkFlagType BlinkImagePatternType;
30 typedef BlinkFlagType BlinkAxisType;
31 
32 // Edge (Constant, Clamped, ...)
33 typedef BlinkFlagType BlinkImageEdgeType;
34 
35 struct BlinkObj;
36 typedef struct BlinkObj* BlinkRef;
37 typedef struct BlinkObj* BlinkErrorRef;
38 
39 typedef int BlinkErrorCode;
40 
41 typedef void* BlinkComputeDeviceID;
42 
43 typedef int BlinkMemoryType;
44 
50 struct BlinkRect {
51  int x1;
52  int y1;
53  int x2;
54  int y2;
55 };
56 
61 
63  BlinkDataType dataType;
64 };
65 
69  struct BlinkRect bounds;
70 
73 };
74 
77 
79  struct BlinkRect bounds;
80 
81  //TODO component range? Step size?
82 };
83 
85  unsigned long long pixelStepBytes;
86  unsigned long long rowStepBytes;
87  unsigned long long componentStepBytes;
88 };
89 
91  //Type of memory
92  BlinkMemoryType type;
93 
94  //Pointer to the memory base object. For host memory this would be a pointer to the memory pointer i.e. a void**
95  void* memoryBasePtr;
96  // Size of memory base object
97  unsigned long long memoryBaseSize;
98 
99  // Offset into memory - currently this must be zero
100  unsigned long long offset;
101 };
102 
105  // Name of the kernel
106  const char* kernelName;
107 
108  // Type of the kernel (ImageComputation, Rolling, etc...)
109  BlinkKernelType kernelType;
110 
111  BlinkKernelGranularity kernelGranularity;
112 };
113 
118  // Name of the image
119  const char* name;
120 
121  // Access type (eRead or eWrite)
122  BlinkImageAccessType accessType;
123 
124  // Pattern type (ePoint, eRanged1D, etc...)
125  BlinkImagePatternType patternType;
126 
127  // Edge Type (eEdgeNone, eEdgeClamp, etc...)
128  BlinkImageEdgeType edgeType;
129 };
130 
132  const char* name;
133 
134  BlinkDataType type;
135 
136  unsigned nComponents;
137 
138  unsigned nElements;
139 };
140 
142 {
143  BlinkImagePatternType patternType;
144  BlinkAxisType axis;
145  struct BlinkRect range;
146 };
147 
148 #ifdef __cplusplus
149 }
150 #endif
151 #endif
BlinkDataType dataType
Data type.
Definition: BlinkTypes.h:63
int nComponents
Number of components.
Definition: BlinkTypes.h:60
Definition: BlinkTypes.h:84
Pixel information.
Definition: BlinkTypes.h:58
Definition: BlinkTypes.h:141
struct BlinkRect bounds
Bounds of image.
Definition: BlinkTypes.h:69
Rectangle.
Definition: BlinkTypes.h:50
Definition: BlinkTypes.h:117
General information about a kernel.
Definition: BlinkTypes.h:104
Definition: BlinkTypes.h:90
Image iteration description.
Definition: BlinkTypes.h:76
struct BlinkPixelInfo pixelInfo
Pixel format.
Definition: BlinkTypes.h:72
Image description.
Definition: BlinkTypes.h:67
Definition: BlinkTypes.h:131
struct BlinkRect bounds
Bounds of iteration.
Definition: BlinkTypes.h:79


©2019 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.thefoundry.co.uk