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 {
52  int x1;
53  int y1;
54  int x2;
55  int y2;
56 };
57 
60 {
63 
65  BlinkDataType dataType;
66 };
67 
70 {
72  struct BlinkRect bounds;
73 
76 };
77 
80 {
81 
83  struct BlinkRect bounds;
84 
85  //TODO component range? Step size?
86 };
87 
89 {
90  unsigned long long pixelStepBytes;
91  unsigned long long rowStepBytes;
92  unsigned long long componentStepBytes;
93 };
94 
96 {
97  //Type of memory
98  BlinkMemoryType type;
99 
100  //Pointer to the memory base object. For host memory this would be a pointer to the memory pointer i.e. a void**
101  void* memoryBasePtr;
102  // Size of memory base object
103  unsigned long long memoryBaseSize;
104 
105  // Offset into memory - currently this must be zero
106  unsigned long long offset;
107 };
108 
111 {
112  // Name of the kernel
113  const char* kernelName;
114 
115  // Type of the kernel (ImageComputation, Rolling, etc...)
116  BlinkKernelType kernelType;
117 
118  BlinkKernelGranularity kernelGranularity;
119 };
120 
125 {
126  // Name of the image
127  const char* name;
128 
129  // Access type (eRead or eWrite)
130  BlinkImageAccessType accessType;
131 
132  // Pattern type (ePoint, eRanged1D, etc...)
133  BlinkImagePatternType patternType;
134 
135  // Edge Type (eEdgeNone, eEdgeClamp, etc...)
136  BlinkImageEdgeType edgeType;
137 };
138 
140 {
141  const char* name;
142 
143  BlinkDataType type;
144 
145  unsigned nComponents;
146 
147  unsigned nElements;
148 };
149 
151 {
152  BlinkImagePatternType patternType;
153  BlinkAxisType axis;
154  struct BlinkRect range;
155 };
156 
157 #ifdef __cplusplus
158 }
159 #endif
160 #endif
BlinkDataType dataType
Data type.
Definition: BlinkTypes.h:65
int nComponents
Number of components.
Definition: BlinkTypes.h:62
Definition: BlinkTypes.h:88
Pixel information.
Definition: BlinkTypes.h:59
Definition: BlinkTypes.h:150
struct BlinkRect bounds
Bounds of image.
Definition: BlinkTypes.h:72
Rectangle.
Definition: BlinkTypes.h:50
Definition: BlinkTypes.h:124
General information about a kernel.
Definition: BlinkTypes.h:110
Definition: BlinkTypes.h:95
Image iteration description.
Definition: BlinkTypes.h:79
struct BlinkPixelInfo pixelInfo
Pixel format.
Definition: BlinkTypes.h:75
Image description.
Definition: BlinkTypes.h:69
Definition: BlinkTypes.h:139
struct BlinkRect bounds
Bounds of iteration.
Definition: BlinkTypes.h:83


©2022 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.foundry.com