NTrace
GPU ray tracing framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ImageTargaIO.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2009-2011, NVIDIA Corporation
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  * * Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * * Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  * * Neither the name of NVIDIA Corporation nor the
13  * names of its contributors may be used to endorse or promote products
14  * derived from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19  * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
20  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 #include "io/ImageTargaIO.hpp"
29 #include "gui/Image.hpp"
30 #include "io/Stream.hpp"
31 
32 using namespace FW;
33 
34 //------------------------------------------------------------------------
35 
37 {
38  // Read header.
39 
40  int idLength = stream.readU8(); // idlength
41  int cmaptype = stream.readU8(); // colourmaptype
42  int datatype = stream.readU8(); // datatypecode
43  stream.readU16LE(); // colourmaporigin
44  stream.readU16LE(); // colourmaplength
45  stream.readU8(); // colourmapdepth
46  stream.readU16LE(); // x_origin
47  stream.readU16LE(); // y_origin
48  int width = stream.readU16LE(); // width
49  int height = stream.readU16LE(); // height
50  int pixelBits = stream.readU8(); // bitsperpixel
51  U32 flags = stream.readU8(); // imagedescriptor
52 
53  // Interpret header.
54 
55  int attribBits = (flags & 0x0F);
56  bool rightToLeft = ((flags & 0x10) != 0);
57  bool bottomToTop = ((flags & 0x20) == 0);
58  int interleaving = ((flags >> 6) & 0x3);
59 
60  bool rle = false;
61  switch (datatype)
62  {
63  case 2: rle = false; break;
64  case 10: rle = true; break;
65  default: setError("Unsupported Targa datatype %d!", datatype); break;
66  }
67 
69  if (pixelBits == 16 && attribBits <= 1)
70  format = ImageFormat::RGBA_5551;
71  else if (pixelBits == 24 && attribBits == 0)
72  format = ImageFormat::R8_G8_B8;
73  else if (pixelBits == 32 && (attribBits == 8 || attribBits == 0))
74  format = ImageFormat::R8_G8_B8_A8;
75  else
76  setError("Unsupported Targa color format %d/%d!", pixelBits, attribBits);
77 
78  if (cmaptype != 0)
79  setError("Targa colormaps not supported!");
80  if (interleaving != 0)
81  setError("Targa interleaving not supported!");
82 
83  if (hasError())
84  return NULL;
85 
86  // Skip identification field.
87 
88  for (int i = 0; i < idLength; i++)
89  stream.readU8();
90 
91  // Decode image data.
92 
93  Image* image = new Image(Vec2i(width, height), format);
94  int bpp = image->getBPP();
95  int stride = (int)image->getStride();
96  U8* data = image->getMutablePtr();
97 
98  if (!rle)
99  stream.readFully(data, stride * height);
100  else
101  {
102  U8* ptr = data;
103  U8* imageEnd = ptr + stride * height;
104  while (ptr < imageEnd)
105  {
106  int header = stream.readU8();
107  U8* end = ptr + ((header & 0x7F) + 1) * bpp;
108  if (end > imageEnd)
109  {
110  setError("Corrupt Targa image data!");
111  break;
112  }
113 
114  if ((header & 0x80) == 0)
115  {
116  stream.readFully(ptr, (int)(end - ptr));
117  ptr = end;
118  }
119  else
120  {
121  stream.readFully(ptr, bpp);
122  ptr += bpp;
123  while (ptr < end)
124  *ptr++ = ptr[-bpp];
125  }
126  }
127  }
128 
129  // Handle errors.
130 
131  if (hasError())
132  {
133  delete image;
134  return NULL;
135  }
136 
137  // Convert color format.
138 
139  U8* ptr = data;
140  switch (bpp)
141  {
142  case 2:
143  for (int i = width * height; i > 0; i--)
144  {
145  U32 v = ptr[0] | (ptr[1] << 8);
146  *(U16*)ptr = (U16)((v << 1) | ((attribBits == 0) ? 1 : (v >> 15)));
147  ptr += bpp;
148  }
149  break;
150 
151  case 3:
152  case 4:
153  for (int i = width * height; i > 0; i--)
154  {
155  swap(ptr[0], ptr[2]);
156  ptr += bpp;
157  }
158  break;
159 
160  default:
161  FW_ASSERT(false);
162  break;
163  }
164 
165  // Flip if needed.
166 
167  if (rightToLeft)
168  image->flipX();
169  if (bottomToTop)
170  image->flipY();
171  return image;
172 }
173 
174 //------------------------------------------------------------------------
175 
177 {
178  // Select format and convert.
179 
180  FW_ASSERT(image);
181  Vec2i size = image->getSize();
182  bool empty = (size.min() <= 0);
183  bool hasAlpha = image->getFormat().hasChannel(ImageFormat::ChannelType_A);
184  const Image* source = image;
185  Image* converted = NULL;
186 
187  if (empty ||
188  image->getFormat().getID() != ImageFormat::ABGR_8888 ||
189  image->getStride() != size.x * 4)
190  {
191  size = Vec2i(max(size.x, 1), max(size.y, 1));
192  converted = new Image(size, ImageFormat::ABGR_8888);
193  if (empty)
194  converted->clear();
195  else
196  *converted = *image;
197  source = converted;
198  }
199 
200  // Write header.
201 
202  stream.writeU8(0); // idlength
203  stream.writeU8(0); // colourmaptype
204  stream.writeU8(10); // datatypecode
205  stream.writeU16LE(0); // colourmaporigin
206  stream.writeU16LE(0); // colourmaplength
207  stream.writeU8(0); // colourmapdepth
208  stream.writeU16LE(0); // x_origin
209  stream.writeU16LE(0); // y_origin
210  stream.writeU16LE(size.x); // width
211  stream.writeU16LE(size.y); // height
212  stream.writeU8((hasAlpha) ? 32 : 24); // bitsperpixel
213  stream.writeU8((hasAlpha) ? 0x28 : 0x20); // imagedescriptor
214 
215  // Compress image data.
216 
217  const U32* ptr = (const U32*)source->getPtr();
218  const U32* end = ptr + size.x * size.y;
219 
220  while (ptr < end)
221  {
222  const U32* start = ptr;
223  while (ptr < end && ptr - start < 128 && ptr[0] == start[0])
224  ptr++;
225 
226  if (ptr - start >= 2)
227  {
228  stream.writeU8((U32)(ptr - start) + 127);
229  start = ptr - 1;
230  }
231  else
232  {
233  while (ptr < end && ptr - start < 128 && (ptr + 1 == end || ptr[1] != ptr[0]))
234  ptr++;
235  stream.writeU8((U32)(ptr - start) - 1);
236  }
237 
238  while (start < ptr)
239  {
240  U32 v = *start++;
241  stream.writeU8(v >> 16);
242  stream.writeU8(v >> 8);
243  stream.writeU8(v);
244  if (hasAlpha)
245  stream.writeU8(v >> 24);
246  }
247  }
248 
249  // Clean up.
250 
251  delete converted;
252 }
253 
254 //------------------------------------------------------------------------
#define NULL
Definition: Defs.hpp:39
void writeU16LE(U32 v)
Definition: Stream.hpp:71
void clear(U32 abgr=0)
Definition: Image.hpp:160
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void image CUmodule const void fatCubin CUfunction CUmodule const char name void p CUfunction unsigned int bytes CUtexref pTexRef CUtexref CUarray unsigned int Flags CUtexref int CUaddress_mode am CUtexref unsigned int Flags CUaddress_mode CUtexref int dim CUarray_format int CUtexref hTexRef CUfunction unsigned int numbytes CUfunction int float value CUfunction int CUtexref hTexRef CUfunction int int grid_height CUevent unsigned int Flags CUevent hEvent CUevent hEvent CUstream unsigned int Flags CUstream hStream GLuint bufferobj unsigned int CUdevice dev CUdeviceptr unsigned int CUmodule const char name CUdeviceptr unsigned int bytesize CUdeviceptr dptr void unsigned int bytesize void CUdeviceptr unsigned int ByteCount CUarray unsigned int CUdeviceptr unsigned int ByteCount CUarray unsigned int const void unsigned int ByteCount CUarray unsigned int CUarray unsigned int unsigned int ByteCount void CUarray unsigned int unsigned int CUstream hStream const CUDA_MEMCPY2D pCopy CUdeviceptr const void unsigned int CUstream hStream const CUDA_MEMCPY2D CUstream hStream CUdeviceptr unsigned char unsigned int N CUdeviceptr unsigned int unsigned int N CUdeviceptr unsigned int unsigned short unsigned int unsigned int Height CUarray const CUDA_ARRAY_DESCRIPTOR pAllocateArray CUarray const CUDA_ARRAY3D_DESCRIPTOR pAllocateArray unsigned int CUtexref CUdeviceptr unsigned int bytes CUcontext unsigned int CUdevice device GLenum texture GLenum GLuint buffer GLenum GLuint renderbuffer GLenum GLsizeiptr const GLvoid * data
Definition: DLLImports.inl:319
void setError(const char *fmt,...)
Definition: Defs.cpp:253
void ** ptr
Definition: DLLImports.cpp:74
ID getID(void) const
Definition: Image.cpp:78
void exportTargaImage(OutputStream &stream, const Image *image)
const U8 * getPtr(const Vec2i &pos=0) const
Definition: Image.hpp:150
void writeU8(U32 v)
Definition: Stream.hpp:69
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void image CUmodule const void fatCubin CUfunction CUmodule const char name void p CUfunction unsigned int bytes CUtexref pTexRef CUtexref CUarray unsigned int Flags CUtexref int CUaddress_mode am CUtexref unsigned int Flags CUaddress_mode CUtexref int dim CUarray_format int CUtexref hTexRef CUfunction unsigned int numbytes CUfunction int float value CUfunction int CUtexref hTexRef CUfunction int int grid_height CUevent unsigned int Flags CUevent hEvent CUevent hEvent CUstream unsigned int Flags CUstream hStream GLuint bufferobj unsigned int CUdevice dev CUdeviceptr unsigned int CUmodule const char name CUdeviceptr unsigned int bytesize CUdeviceptr dptr void unsigned int bytesize void CUdeviceptr unsigned int ByteCount CUarray unsigned int CUdeviceptr unsigned int ByteCount CUarray unsigned int const void unsigned int ByteCount CUarray unsigned int CUarray unsigned int unsigned int ByteCount void CUarray unsigned int unsigned int CUstream hStream const CUDA_MEMCPY2D pCopy CUdeviceptr const void unsigned int CUstream hStream const CUDA_MEMCPY2D CUstream hStream CUdeviceptr unsigned char unsigned int N CUdeviceptr unsigned int unsigned int N CUdeviceptr unsigned int unsigned short unsigned int unsigned int Height CUarray const CUDA_ARRAY_DESCRIPTOR pAllocateArray CUarray const CUDA_ARRAY3D_DESCRIPTOR pAllocateArray unsigned int CUtexref CUdeviceptr unsigned int bytes CUcontext unsigned int CUdevice device GLenum texture GLenum GLuint buffer GLenum GLuint renderbuffer GLenum GLsizeiptr const GLvoid GLenum usage GLuint shader GLenum type GLsizei const GLuint framebuffers GLsizei const GLuint renderbuffers GLuint v
Definition: DLLImports.inl:329
U8 readU8(void)
Definition: Stream.hpp:49
void readFully(void *ptr, int size)
Definition: Stream.cpp:36
FW_CUDA_FUNC T max(const VectorBase< T, L, S > &v)
Definition: Math.hpp:462
#define FW_ASSERT(X)
Definition: Defs.hpp:67
void flipY(void)
Definition: Image.cpp:459
U8 * getMutablePtr(const Vec2i &pos=0)
Definition: Image.hpp:151
unsigned int U32
Definition: Defs.hpp:85
void flipX(void)
Definition: Image.cpp:440
bool hasError(void)
Definition: Defs.cpp:289
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void image CUmodule const void fatCubin CUfunction CUmodule const char name void p CUfunction unsigned int bytes CUtexref pTexRef CUtexref CUarray unsigned int Flags CUtexref int CUaddress_mode am CUtexref unsigned int Flags CUaddress_mode CUtexref int dim CUarray_format int CUtexref hTexRef CUfunction unsigned int numbytes CUfunction int float value CUfunction int CUtexref hTexRef CUfunction int int grid_height CUevent unsigned int Flags CUevent hEvent CUevent hEvent CUstream unsigned int Flags CUstream hStream GLuint bufferobj unsigned int CUdevice dev CUdeviceptr unsigned int CUmodule const char name CUdeviceptr unsigned int bytesize CUdeviceptr dptr void unsigned int bytesize void CUdeviceptr unsigned int ByteCount CUarray unsigned int CUdeviceptr unsigned int ByteCount CUarray unsigned int const void unsigned int ByteCount CUarray unsigned int CUarray unsigned int unsigned int ByteCount void CUarray unsigned int unsigned int CUstream hStream const CUDA_MEMCPY2D pCopy CUdeviceptr const void unsigned int CUstream hStream const CUDA_MEMCPY2D CUstream hStream CUdeviceptr unsigned char unsigned int N CUdeviceptr unsigned int unsigned int N CUdeviceptr unsigned int unsigned short unsigned int unsigned int Height CUarray const CUDA_ARRAY_DESCRIPTOR pAllocateArray CUarray const CUDA_ARRAY3D_DESCRIPTOR pAllocateArray unsigned int CUtexref CUdeviceptr unsigned int bytes CUcontext unsigned int CUdevice device GLenum texture GLenum GLuint buffer GLenum GLuint renderbuffer GLenum GLsizeiptr const GLvoid GLenum usage GLuint shader GLenum type GLsizei const GLuint framebuffers GLsizei const GLuint renderbuffers GLuint v GLuint v GLenum GLenum GLenum GLuint GLint level GLsizei GLuint framebuffers GLuint const GLchar name GLenum GLintptr GLsizeiptr GLvoid data GLuint GLenum GLint param GLuint GLenum GLint param GLhandleARB programObj GLenum GLenum GLsizei GLsizei height GLenum GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid pixels GLint GLsizei const GLfloat value GLint GLfloat GLfloat v1 GLint GLfloat GLfloat GLfloat v2 GLint GLsizei const GLfloat value GLint GLsizei GLboolean const GLfloat value GLuint program GLuint GLfloat GLfloat GLfloat z GLuint GLint GLenum GLboolean GLsizei stride
Definition: DLLImports.inl:365
const Vec2i & getSize(void) const
Definition: Image.hpp:143
const ImageFormat & getFormat(void) const
Definition: Image.hpp:144
S64 getStride(void) const
Definition: Image.hpp:146
Image * importTargaImage(InputStream &stream)
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void image CUmodule const void fatCubin CUfunction CUmodule const char name void p CUfunction unsigned int bytes CUtexref pTexRef CUtexref CUarray unsigned int Flags CUtexref int CUaddress_mode am CUtexref unsigned int Flags CUaddress_mode CUtexref int dim CUarray_format int CUtexref hTexRef CUfunction unsigned int numbytes CUfunction int float value CUfunction int CUtexref hTexRef CUfunction int int grid_height CUevent unsigned int Flags CUevent hEvent CUevent hEvent CUstream unsigned int Flags CUstream hStream GLuint bufferobj unsigned int CUdevice dev CUdeviceptr unsigned int CUmodule const char name CUdeviceptr unsigned int bytesize CUdeviceptr dptr void unsigned int bytesize void CUdeviceptr unsigned int ByteCount CUarray unsigned int CUdeviceptr unsigned int ByteCount CUarray unsigned int const void unsigned int ByteCount CUarray unsigned int CUarray unsigned int unsigned int ByteCount void CUarray unsigned int unsigned int CUstream hStream const CUDA_MEMCPY2D pCopy CUdeviceptr const void unsigned int CUstream hStream const CUDA_MEMCPY2D CUstream hStream CUdeviceptr unsigned char unsigned int N CUdeviceptr unsigned int unsigned int N CUdeviceptr unsigned int unsigned short unsigned int unsigned int Height CUarray const CUDA_ARRAY_DESCRIPTOR pAllocateArray CUarray const CUDA_ARRAY3D_DESCRIPTOR pAllocateArray unsigned int CUtexref CUdeviceptr unsigned int bytes CUcontext unsigned int CUdevice device GLenum texture GLenum GLuint buffer GLenum GLuint renderbuffer GLenum GLsizeiptr const GLvoid GLenum usage GLuint shader GLenum type GLsizei const GLuint framebuffers GLsizei const GLuint renderbuffers GLuint v GLuint v GLenum GLenum GLenum GLuint GLint level GLsizei GLuint framebuffers GLuint const GLchar name GLenum GLintptr GLsizeiptr GLvoid data GLuint GLenum GLint param GLuint GLenum GLint param GLhandleARB programObj GLenum GLenum GLsizei GLsizei height GLenum GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: DLLImports.inl:349
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void image CUmodule const void fatCubin CUfunction CUmodule const char name void p CUfunction unsigned int bytes CUtexref pTexRef CUtexref CUarray unsigned int Flags CUtexref int CUaddress_mode am CUtexref unsigned int Flags CUaddress_mode CUtexref int dim CUarray_format int CUtexref hTexRef CUfunction unsigned int numbytes CUfunction int float value CUfunction int CUtexref hTexRef CUfunction int int grid_height CUevent unsigned int Flags CUevent hEvent CUevent hEvent CUstream unsigned int Flags CUstream hStream GLuint bufferobj unsigned int CUdevice dev CUdeviceptr unsigned int CUmodule const char name CUdeviceptr unsigned int bytesize CUdeviceptr dptr void unsigned int bytesize void CUdeviceptr unsigned int ByteCount CUarray unsigned int CUdeviceptr unsigned int ByteCount CUarray unsigned int const void unsigned int ByteCount CUarray unsigned int CUarray unsigned int unsigned int ByteCount void CUarray unsigned int unsigned int CUstream hStream const CUDA_MEMCPY2D pCopy CUdeviceptr const void unsigned int CUstream hStream const CUDA_MEMCPY2D CUstream hStream CUdeviceptr unsigned char unsigned int N CUdeviceptr unsigned int unsigned int N CUdeviceptr unsigned int unsigned short unsigned int unsigned int Height CUarray const CUDA_ARRAY_DESCRIPTOR pAllocateArray CUarray const CUDA_ARRAY3D_DESCRIPTOR pAllocateArray unsigned int CUtexref CUdeviceptr unsigned int bytes CUcontext unsigned int CUdevice device GLenum texture GLenum GLuint buffer GLenum GLuint renderbuffer GLenum GLsizeiptr const GLvoid GLenum usage GLuint shader GLenum type GLsizei const GLuint framebuffers GLsizei const GLuint renderbuffers GLuint v GLuint v GLenum GLenum GLenum GLuint GLint level GLsizei GLuint framebuffers GLuint const GLchar name GLenum GLintptr GLsizeiptr GLvoid data GLuint GLenum GLint param GLuint GLenum GLint param GLhandleARB programObj GLenum GLenum GLsizei width
Definition: DLLImports.inl:347
unsigned char U8
Definition: Defs.hpp:83
unsigned short U16
Definition: Defs.hpp:84
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void image CUmodule const void fatCubin CUfunction CUmodule const char name void p CUfunction unsigned int bytes CUtexref pTexRef CUtexref CUarray unsigned int Flags CUtexref int CUaddress_mode am CUtexref unsigned int Flags CUaddress_mode CUtexref int dim CUarray_format int CUtexref hTexRef CUfunction unsigned int numbytes CUfunction int float value CUfunction int CUtexref hTexRef CUfunction int int grid_height CUevent unsigned int Flags CUevent hEvent CUevent hEvent CUstream unsigned int Flags CUstream hStream GLuint bufferobj unsigned int CUdevice dev CUdeviceptr unsigned int CUmodule const char name CUdeviceptr unsigned int bytesize CUdeviceptr dptr void unsigned int bytesize void CUdeviceptr unsigned int ByteCount CUarray unsigned int CUdeviceptr unsigned int ByteCount CUarray unsigned int const void unsigned int ByteCount CUarray unsigned int CUarray unsigned int unsigned int ByteCount void CUarray unsigned int unsigned int CUstream hStream const CUDA_MEMCPY2D pCopy CUdeviceptr const void unsigned int CUstream hStream const CUDA_MEMCPY2D CUstream hStream CUdeviceptr unsigned char unsigned int N CUdeviceptr unsigned int unsigned int N CUdeviceptr unsigned int unsigned short unsigned int unsigned int Height CUarray const CUDA_ARRAY_DESCRIPTOR pAllocateArray CUarray const CUDA_ARRAY3D_DESCRIPTOR pAllocateArray unsigned int CUtexref CUdeviceptr unsigned int bytes CUcontext unsigned int CUdevice device GLenum texture GLenum GLuint buffer GLenum GLuint renderbuffer GLenum GLsizeiptr const GLvoid GLenum usage GLuint shader GLenum type GLsizei const GLuint framebuffers GLsizei const GLuint renderbuffers GLuint v GLuint v GLenum GLenum GLenum GLuint GLint level GLsizei GLuint framebuffers GLuint const GLchar name GLenum GLintptr GLsizeiptr GLvoid data GLuint GLenum GLint param GLuint GLenum GLint param GLhandleARB programObj GLenum GLenum GLsizei GLsizei height
Definition: DLLImports.inl:347
int getBPP(void) const
Definition: Image.hpp:145
FW_CUDA_FUNC void swap(T &a, T &b)
Definition: Defs.hpp:183
U16 readU16LE(void)
Definition: Stream.hpp:51
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void * image
Definition: DLLImports.inl:60
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void image CUmodule const void fatCubin CUfunction CUmodule const char name void p CUfunction unsigned int bytes CUtexref pTexRef CUtexref CUarray unsigned int Flags CUtexref int CUaddress_mode am CUtexref unsigned int Flags CUaddress_mode CUtexref int dim CUarray_format int CUtexref hTexRef CUfunction unsigned int numbytes CUfunction int float value CUfunction int CUtexref hTexRef CUfunction int int grid_height CUevent unsigned int Flags CUevent hEvent CUevent hEvent CUstream unsigned int Flags CUstream hStream GLuint bufferobj unsigned int CUdevice dev CUdeviceptr unsigned int CUmodule const char name CUdeviceptr unsigned int bytesize CUdeviceptr dptr void unsigned int bytesize void CUdeviceptr unsigned int ByteCount CUarray unsigned int CUdeviceptr unsigned int ByteCount CUarray unsigned int const void unsigned int ByteCount CUarray unsigned int CUarray unsigned int unsigned int ByteCount void CUarray unsigned int unsigned int CUstream hStream const CUDA_MEMCPY2D pCopy CUdeviceptr const void unsigned int CUstream hStream const CUDA_MEMCPY2D CUstream hStream CUdeviceptr unsigned char unsigned int N CUdeviceptr unsigned int unsigned int N CUdeviceptr unsigned int unsigned short unsigned int unsigned int Height CUarray const CUDA_ARRAY_DESCRIPTOR pAllocateArray CUarray const CUDA_ARRAY3D_DESCRIPTOR pAllocateArray unsigned int CUtexref CUdeviceptr unsigned int bytes CUcontext unsigned int CUdevice device GLenum texture GLenum GLuint buffer GLenum GLuint renderbuffer GLenum GLsizeiptr size
Definition: DLLImports.inl:319
FW_CUDA_FUNC T min(void) const
Definition: Math.hpp:146
bool hasChannel(ChannelType type) const
Definition: Image.hpp:110