Blink API

BlinkTypes.h

Go to the documentation of this file.
00001 // Copyright (c) 2013 The Foundry Visionmongers Ltd.  All Rights Reserved.
00002 
00007 #ifndef Blink_Library_BlinkTypes_h
00008 #define Blink_Library_BlinkTypes_h
00009 #ifdef __cplusplus
00010 extern "C" {
00011 #endif
00012 
00013 typedef long long BlinkFlagType;
00014 
00015 typedef BlinkFlagType BlinkCodegenFlags;
00016 typedef BlinkFlagType BlinkDataType;
00017 typedef BlinkFlagType BlinkPropertyType;
00018 typedef BlinkFlagType BlinkErrorProperty;
00019 
00020 // Kernel type (Iteration, Rolling, etc...)
00021 typedef BlinkFlagType BlinkKernelType;
00022 
00023 typedef BlinkFlagType BlinkKernelGranularity;
00024 
00025 // Type of image access (Read or write)
00026 typedef BlinkFlagType BlinkImageAccessType;
00027 
00028 // Pattern (Point, Ranged1D, etc...)
00029 typedef BlinkFlagType BlinkImagePatternType;
00030 typedef BlinkFlagType BlinkAxisType;
00031 
00032 // Edge (Constant, Clamped, ...)
00033 typedef BlinkFlagType BlinkImageEdgeType;
00034 
00035 struct BlinkObj;
00036 typedef struct BlinkObj* BlinkRef;
00037 typedef struct BlinkObj* BlinkErrorRef;
00038 
00039 typedef int BlinkErrorCode;
00040 
00041 typedef void* BlinkComputeDeviceID;
00042 
00043 typedef int BlinkMemoryType;
00044 
00050 struct BlinkRect {
00051   int x1;
00052   int y1;
00053   int x2;
00054   int y2;
00055 };
00056 
00058 struct BlinkPixelInfo {
00060   int nComponents;
00061 
00063   BlinkDataType dataType;
00064 };
00065 
00067 struct BlinkImageInfo {
00069   struct BlinkRect bounds;
00070 
00072   struct BlinkPixelInfo pixelInfo;
00073 };
00074 
00076 struct BlinkKernelIterationController {
00077 
00079   struct BlinkRect bounds;
00080 
00081   //TODO component range? Step size?
00082 };
00083 
00084 struct BlinkBufferDesc {
00085   unsigned long long pixelStepBytes;
00086   unsigned long long rowStepBytes;
00087   unsigned long long componentStepBytes;
00088 };
00089 
00090 struct BlinkDeviceMemory {
00091   //Type of memory
00092   BlinkMemoryType type;
00093 
00094   //Pointer to the memory base object. For host memory this would be a pointer to the memory pointer i.e. a void**
00095   void* memoryBasePtr;
00096   // Size of memory base object
00097   unsigned long long memoryBaseSize;
00098 
00099   // Offset into memory - currently this must be zero
00100   unsigned long long offset;
00101 };
00102 
00104 struct BlinkKernelInfo {
00105   // Name of the kernel
00106   const char* kernelName;
00107   
00108   // Type of the kernel (ImageComputation, Rolling, etc...)
00109   BlinkKernelType kernelType;
00110   
00111   BlinkKernelGranularity kernelGranularity;
00112 };
00113 
00117 struct BlinkKernelImageInfo {
00118   // Name of the image
00119   const char* name;
00120   
00121   // Access type (eRead or eWrite)
00122   BlinkImageAccessType accessType;
00123   
00124   // Pattern type (ePoint, eRanged1D, etc...)
00125   BlinkImagePatternType patternType;
00126   
00127   // Edge Type (eEdgeNone, eEdgeClamp, etc...)
00128   BlinkImageEdgeType edgeType;
00129 };
00130 
00131 struct BlinkKernelParameterInfo {
00132   const char* name;
00133   
00134   BlinkDataType type;
00135   
00136   unsigned nComponents;
00137   
00138   unsigned nElements;
00139 };
00140 
00141 struct BlinkImageAccessDesc
00142 {
00143   BlinkImagePatternType patternType;
00144   BlinkAxisType axis;
00145   struct BlinkRect range;
00146 };
00147 
00148 #ifdef __cplusplus
00149 }
00150 #endif
00151 #endif
 All Classes Namespaces Files Functions Variables


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