COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
cutil.h
Go to the documentation of this file.
1 /* This file is part of COVISE.
2 
3  You can use it under the terms of the GNU Lesser General Public License
4  version 2.1 or later, see lgpl-2.1.txt.
5 
6  * License: LGPL 2+ */
7 
8 /*
9  * Copyright 1993-2010 NVIDIA Corporation. All rights reserved.
10  *
11  * Please refer to the NVIDIA end user license agreement (EULA) associated
12  * with this source code for terms and conditions that govern your use of
13  * this software. Any use, reproduction, disclosure, or distribution of
14  * this software and related documentation outside the terms of the EULA
15  * is strictly prohibited.
16  *
17  */
18 
19 /*
20 * Copyright 1993-2010 NVIDIA Corporation. All rights reserved.
21 *
22 * Please refer to the NVIDIA end user license agreement (EULA) associated
23 * with this source code for terms and conditions that govern your use of
24 * this software. Any use, reproduction, disclosure, or distribution of
25 * this software and related documentation outside the terms of the EULA
26 * is strictly prohibited.
27 *
28 */
29 
30 /* CUda UTility Library */
31 
32 #ifndef _CUTIL_H_
33 #define _CUTIL_H_
34 
35 #ifdef _WIN32
36 #pragma warning(disable : 4996) // disable deprecated warning
37 #endif
38 
39 #include <stdio.h>
40 #include <stdlib.h>
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 // helper typedefs for building DLL
47 #ifdef _WIN32
48 #ifdef BUILD_DLL
49 #define DLL_MAPPING __declspec(dllexport)
50 #else
51 #define DLL_MAPPING __declspec(dllimport)
52 #endif
53 #else
54 #define DLL_MAPPING
55 #endif
56 
57 #ifdef _WIN32
58 #define CUTIL_API __stdcall
59 #else
60 #define CUTIL_API
61 #endif
62 
67 {
68  CUTFalse = 0,
69  CUTTrue = 1
70 };
71 
77 void CUTIL_API
78  cutFree(void *ptr);
79 
95 void CUTIL_API
96  cutCheckBankAccess(unsigned int tidx, unsigned int tidy, unsigned int tidz,
97  unsigned int bdimx, unsigned int bdimy,
98  unsigned int bdimz, const char *file, const int line,
99  const char *aname, const int index);
100 
108 char *CUTIL_API
109  cutFindFilePath(const char *filename, const char *executablePath);
110 
124  cutReadFilef(const char *filename, float **data, unsigned int *len,
125  bool verbose = false);
126 
140  cutReadFiled(const char *filename, double **data, unsigned int *len,
141  bool verbose = false);
142 
156  cutReadFilei(const char *filename, int **data, unsigned int *len, bool verbose = false);
157 
171  cutReadFileui(const char *filename, unsigned int **data,
172  unsigned int *len, bool verbose = false);
173 
187  cutReadFileb(const char *filename, char **data, unsigned int *len,
188  bool verbose = false);
189 
203  cutReadFileub(const char *filename, unsigned char **data,
204  unsigned int *len, bool verbose = false);
205 
217  cutWriteFilef(const char *filename, const float *data, unsigned int len,
218  const float epsilon, bool verbose = false);
219 
231  cutWriteFiled(const char *filename, const float *data, unsigned int len,
232  const double epsilon, bool verbose = false);
233 
243  cutWriteFilei(const char *filename, const int *data, unsigned int len,
244  bool verbose = false);
245 
255  cutWriteFileui(const char *filename, const unsigned int *data,
256  unsigned int len, bool verbose = false);
257 
267  cutWriteFileb(const char *filename, const char *data, unsigned int len,
268  bool verbose = false);
269 
279  cutWriteFileub(const char *filename, const unsigned char *data,
280  unsigned int len, bool verbose = false);
281 
295  cutLoadPGMub(const char *file, unsigned char **data,
296  unsigned int *w, unsigned int *h);
297 
308  cutLoadPPMub(const char *file, unsigned char **data,
309  unsigned int *w, unsigned int *h);
310 
322  cutLoadPPM4ub(const char *file, unsigned char **data,
323  unsigned int *w, unsigned int *h);
324 
338  cutLoadPGMi(const char *file, unsigned int **data,
339  unsigned int *w, unsigned int *h);
340 
354  cutLoadPGMs(const char *file, unsigned short **data,
355  unsigned int *w, unsigned int *h);
356 
369  cutLoadPGMf(const char *file, float **data,
370  unsigned int *w, unsigned int *h);
371 
381  cutSavePGMub(const char *file, unsigned char *data,
382  unsigned int w, unsigned int h);
383 
393  cutSavePPMub(const char *file, unsigned char *data,
394  unsigned int w, unsigned int h);
395 
406  cutSavePPM4ub(const char *file, unsigned char *data,
407  unsigned int w, unsigned int h);
408 
418  cutSavePGMi(const char *file, unsigned int *data,
419  unsigned int w, unsigned int h);
420 
430  cutSavePGMs(const char *file, unsigned short *data,
431  unsigned int w, unsigned int h);
432 
442  cutSavePGMf(const char *file, float *data,
443  unsigned int w, unsigned int h);
444 
446 // Command line arguments: General notes
447 // * All command line arguments begin with '--' followed by the token;
448 // token and value are seperated by '='; example --samples=50
449 // * Arrays have the form --model=[one.obj,two.obj,three.obj]
450 // (without whitespaces)
452 
463  cutCheckCmdLineFlag(const int argc, const char **argv,
464  const char *flag_name);
465 
477  cutGetCmdLineArgumenti(const int argc, const char **argv,
478  const char *arg_name, int *val);
479 
491  cutGetCmdLineArgumentf(const int argc, const char **argv,
492  const char *arg_name, float *val);
493 
505  cutGetCmdLineArgumentstr(const int argc, const char **argv,
506  const char *arg_name, char **val);
507 
520  cutGetCmdLineArgumentListstr(const int argc, const char **argv,
521  const char *arg_name, char **val,
522  unsigned int *len);
523 
534  cutCheckCondition(int val, const char *file, const int line);
535 
546  cutComparef(const float *reference, const float *data,
547  const unsigned int len);
548 
559  cutComparei(const int *reference, const int *data,
560  const unsigned int len);
561 
573  cutCompareuit(const unsigned int *reference, const unsigned int *data,
574  const unsigned int len, const float epsilon, const float threshold);
575 
586  cutCompareub(const unsigned char *reference, const unsigned char *data,
587  const unsigned int len);
588 
601  cutCompareubt(const unsigned char *reference, const unsigned char *data,
602  const unsigned int len, const float epsilon, const float threshold);
603 
615  cutCompareube(const unsigned char *reference, const unsigned char *data,
616  const unsigned int len, const float epsilon);
617 
629  cutComparefe(const float *reference, const float *data,
630  const unsigned int len, const float epsilon);
631 
644  cutComparefet(const float *reference, const float *data,
645  const unsigned int len, const float epsilon, const float threshold);
646 
659  cutCompareL2fe(const float *reference, const float *data,
660  const unsigned int len, const float epsilon);
661 
674  cutComparePPM(const char *src_file, const char *ref_file, const float epsilon, const float threshold, bool verboseErrors = false);
675 
678 
686  cutCreateTimer(unsigned int *name);
687 
695  cutDeleteTimer(unsigned int name);
696 
703  cutStartTimer(const unsigned int name);
704 
711  cutStopTimer(const unsigned int name);
712 
719  cutResetTimer(const unsigned int name);
720 
727 float CUTIL_API
728  cutGetTimerValue(const unsigned int name);
729 
738 float CUTIL_API
739  cutGetAverageTimerValue(const unsigned int name);
740 
743 
744 #if CUDART_VERSION >= 4000
745 #define CUT_DEVICE_SYNCHRONIZE() cudaDeviceSynchronize();
746 #else
747 #define CUT_DEVICE_SYNCHRONIZE() cudaThreadSynchronize();
748 #endif
749 
750 #if CUDART_VERSION >= 4000
751 #define CUT_DEVICE_RESET() cudaDeviceReset();
752 #else
753 #define CUT_DEVICE_RESET() cudaThreadExit();
754 #endif
755 
756 // This is for the CUTIL bank checker
757 #ifdef _DEBUG
758 #if __DEVICE_EMULATION__
759 // Interface for bank conflict checker
760 #define CUT_BANK_CHECKER(array, index) \
761  (cutCheckBankAccess(threadIdx.x, threadIdx.y, threadIdx.z, blockDim.x, \
762  blockDim.y, blockDim.z, \
763  __FILE__, __LINE__, #array, index), \
764  array[index])
765 #else
766 #define CUT_BANK_CHECKER(array, index) array[index]
767 #endif
768 #else
769 #define CUT_BANK_CHECKER(array, index) array[index]
770 #endif
771 
772 #define CU_SAFE_CALL_NO_SYNC(call) \
773  { \
774  CUresult err = call; \
775  if (CUDA_SUCCESS != err) \
776  { \
777  fprintf(stderr, "Cuda driver error %x in file '%s' in line %i.\n", err, __FILE__, __LINE__); \
778 //never ever exit exit(EXIT_FAILURE); \
779  } }
780 
781 #define CU_SAFE_CALL(call) CU_SAFE_CALL_NO_SYNC(call);
782 
783 #define CU_SAFE_CTX_SYNC() \
784  { \
785  CUresult err = cuCtxSynchronize(); \
786  if (CUDA_SUCCESS != err) \
787  { \
788  fprintf(stderr, "Cuda driver error %x in file '%s' in line %i.\n", err, __FILE__, __LINE__); \
789 //never ever exitexit(EXIT_FAILURE); \
790  } }
791 
792 #define CUDA_SAFE_CALL_NO_SYNC(call) \
793  { \
794  cudaError err = call; \
795  if (cudaSuccess != err) \
796  { \
797  fprintf(stderr, "Cuda error in file '%s' in line %i : %s.\n", __FILE__, __LINE__, cudaGetErrorString(err)); \
798  exit(EXIT_FAILURE); \
799  } \
800  }
801 
802 #define CUDA_SAFE_CALL(call) CUDA_SAFE_CALL_NO_SYNC(call);
803 
804 #define CUDA_SAFE_THREAD_SYNC() \
805  { \
806  cudaError err = CUT_DEVICE_SYNCHRONIZE(); \
807  if (cudaSuccess != err) \
808  { \
809  fprintf(stderr, "Cuda error in file '%s' in line %i : %s.\n", __FILE__, __LINE__, cudaGetErrorString(err)); \
810  } \
811  }
812 
813 #define CUFFT_SAFE_CALL(call) \
814  { \
815  cufftResult err = call; \
816  if (CUFFT_SUCCESS != err) \
817  { \
818  fprintf(stderr, "CUFFT error in file '%s' in line %i.\n", __FILE__, __LINE__); \
819  exit(EXIT_FAILURE); \
820  } \
821  }
822 
823 #define CUT_SAFE_CALL(call) \
824  if (CUTTrue != call) \
825  { \
826  fprintf(stderr, "Cut error in file '%s' in line %i.\n", __FILE__, __LINE__); \
827  exit(EXIT_FAILURE); \
828  }
829 
831 #ifdef _DEBUG
832 #define CUT_CHECK_ERROR(errorMessage) \
833  { \
834  cudaError_t err = cudaGetLastError(); \
835  if (cudaSuccess != err) \
836  { \
837  fprintf(stderr, "Cuda error: %s in file '%s' in line %i : %s.\n", errorMessage, __FILE__, __LINE__, cudaGetErrorString(err)); \
838  exit(EXIT_FAILURE); \
839  } \
840  err = CUT_DEVICE_SYNCHRONIZE(); \
841  if (cudaSuccess != err) \
842  { \
843  fprintf(stderr, "Cuda error: %s in file '%s' in line %i : %s.\n", errorMessage, __FILE__, __LINE__, cudaGetErrorString(err)); \
844  exit(EXIT_FAILURE); \
845  } \
846  }
847 #else
848 #define CUT_CHECK_ERROR(errorMessage) \
849  { \
850  cudaError_t err = cudaGetLastError(); \
851  if (cudaSuccess != err) \
852  { \
853  fprintf(stderr, "Cuda error: %s in file '%s' in line %i : %s.\n", errorMessage, __FILE__, __LINE__, cudaGetErrorString(err)); \
854  exit(EXIT_FAILURE); \
855  } \
856  }
857 #endif
858 
860 #define CUT_SAFE_MALLOC(mallocCall) \
861  { \
862  if (!(mallocCall)) \
863  { \
864  fprintf(stderr, "Host malloc failure in file '%s' in line %i\n", __FILE__, __LINE__); \
865  exit(EXIT_FAILURE); \
866  } \
867  } \
868  while (0) \
869  ;
870 
872 #define CUT_CONDITION(val) \
873  if (CUTFalse == cutCheckCondition(val, __FILE__, __LINE__)) \
874  { \
875  exit(EXIT_FAILURE); \
876  }
877 
878 #if __DEVICE_EMULATION__
879 
880 #define CUT_DEVICE_INIT(ARGC, ARGV)
881 
882 #else
883 
884 #define CUT_DEVICE_INIT(ARGC, ARGV) \
885  { \
886  int deviceCount; \
887  CUDA_SAFE_CALL_NO_SYNC(cudaGetDeviceCount(&deviceCount)); \
888  if (deviceCount == 0) \
889  { \
890  fprintf(stderr, "cutil error: no devices supporting CUDA.\n"); \
891  exit(EXIT_FAILURE); \
892  } \
893  int dev = 0; \
894  cutGetCmdLineArgumenti(ARGC, (const char **)ARGV, "device", &dev); \
895  if (dev < 0) \
896  dev = 0; \
897  if (dev > deviceCount - 1) \
898  dev = deviceCount - 1; \
899  cudaDeviceProp deviceProp; \
900  CUDA_SAFE_CALL_NO_SYNC(cudaGetDeviceProperties(&deviceProp, dev)); \
901  if (deviceProp.major < 1) \
902  { \
903  fprintf(stderr, "cutil error: device does not support CUDA.\n"); \
904  exit(EXIT_FAILURE); \
905  } \
906  if (cutCheckCmdLineFlag(ARGC, (const char **)ARGV, "quiet") == CUTFalse) \
907  fprintf(stderr, "Using device %d: %s\n", dev, deviceProp.name); \
908  CUDA_SAFE_CALL(cudaSetDevice(dev)); \
909  }
910 
912 #define CUDA_CHECK_CTX_LOST(errorMessage) \
913  { \
914  cudaError_t err = cudaGetLastError(); \
915  if (cudaSuccess != err) \
916  { \
917  fprintf(stderr, "Cuda error: %s in file '%s' in line %i : %s.\n", errorMessage, __FILE__, __LINE__, cudaGetErrorString(err)); \
918  exit(EXIT_FAILURE); \
919  } \
920  err = CUT_DEVICE_SYNCHRONIZE(); \
921  if (cudaSuccess != err) \
922  { \
923  fprintf(stderr, "Cuda error: %s in file '%s' in line %i : %s.\n", errorMessage, __FILE__, __LINE__, cudaGetErrorString(err)); \
924  exit(EXIT_FAILURE); \
925  } \
926  }
927 
929 #define CU_CHECK_CTX_LOST(errorMessage) \
930  { \
931  cudaError_t err = cudaGetLastError(); \
932  if (CUDA_ERROR_INVALID_CONTEXT != err) \
933  { \
934  fprintf(stderr, "Cuda error: %s in file '%s' in line %i : %s.\n", errorMessage, __FILE__, __LINE__, cudaGetErrorString(err)); \
935  exit(EXIT_FAILURE); \
936  } \
937  err = CUT_DEVICE_SYNCHRONIZE(); \
938  if (cudaSuccess != err) \
939  { \
940  fprintf(stderr, "Cuda error: %s in file '%s' in line %i : %s.\n", errorMessage, __FILE__, __LINE__, cudaGetErrorString(err)); \
941  exit(EXIT_FAILURE); \
942  } \
943  }
944 
945 #endif
946 
947 #define CUT_DEVICE_INIT_DRV(cuDevice, ARGC, ARGV) \
948  { \
949  cuDevice = 0; \
950  int deviceCount = 0; \
951  CUresult err = cuInit(0); \
952  if (CUDA_SUCCESS == err) \
953  CU_SAFE_CALL_NO_SYNC(cuDeviceGetCount(&deviceCount)); \
954  if (deviceCount == 0) \
955  { \
956  fprintf(stderr, "cutil error: no devices supporting CUDA\n"); \
957  exit(EXIT_FAILURE); \
958  } \
959  int dev = 0; \
960  cutGetCmdLineArgumenti(ARGC, (const char **)ARGV, "device", &dev); \
961  if (dev < 0) \
962  dev = 0; \
963  if (dev > deviceCount - 1) \
964  dev = deviceCount - 1; \
965  CU_SAFE_CALL_NO_SYNC(cuDeviceGet(&cuDevice, dev)); \
966  char name[100]; \
967  cuDeviceGetName(name, 100, cuDevice); \
968  if (cutCheckCmdLineFlag(ARGC, (const char **)ARGV, "quiet") == CUTFalse) \
969  fprintf(stderr, "Using device %d: %s\n", dev, name); \
970  }
971 
972 #define CUT_EXIT(argc, argv) \
973  if (!cutCheckCmdLineFlag(argc, (const char **)argv, "noprompt")) \
974  { \
975  printf("\nPress ENTER to exit...\n"); \
976  fflush(stdout); \
977  fflush(stderr); \
978  getchar(); \
979  } \
980  exit(EXIT_SUCCESS);
981 
982 #ifdef __cplusplus
983 }
984 #endif // #ifdef _DEBUG (else branch)
985 
986 #endif // #ifndef _CUTIL_H_
DLL_MAPPING CUTBoolean CUTIL_API cutCheckCmdLineFlag(const int argc, const char **argv, const char *flag_name)
GLfloat GLfloat GLfloat GLfloat h
Definition: khronos-glext.h:8441
DLL_MAPPING CUTBoolean CUTIL_API cutComparef(const float *reference, const float *data, const unsigned int len)
GLenum GLsizei len
Definition: khronos-glext.h:7440
DLL_MAPPING CUTBoolean CUTIL_API cutReadFileui(const char *filename, unsigned int **data, unsigned int *len, bool verbose=false)
DLL_MAPPING CUTBoolean CUTIL_API cutReadFilei(const char *filename, int **data, unsigned int *len, bool verbose=false)
DLL_MAPPING CUTBoolean CUTIL_API cutWriteFiled(const char *filename, const float *data, unsigned int len, const double epsilon, bool verbose=false)
DLL_MAPPING CUTBoolean CUTIL_API cutSavePPMub(const char *file, unsigned char *data, unsigned int w, unsigned int h)
GLuint const GLchar * name
Definition: khronos-glext.h:6722
DLL_MAPPING CUTBoolean CUTIL_API cutCreateTimer(unsigned int *name)
Timer functionality.
DLL_MAPPING CUTBoolean CUTIL_API cutLoadPPM4ub(const char *file, unsigned char **data, unsigned int *w, unsigned int *h)
DLL_MAPPING CUTBoolean CUTIL_API cutWriteFileui(const char *filename, const unsigned int *data, unsigned int len, bool verbose=false)
DLL_MAPPING CUTBoolean CUTIL_API cutSavePGMf(const char *file, float *data, unsigned int w, unsigned int h)
DLL_MAPPING CUTBoolean CUTIL_API cutWriteFileb(const char *filename, const char *data, unsigned int len, bool verbose=false)
DLL_MAPPING CUTBoolean CUTIL_API cutLoadPGMi(const char *file, unsigned int **data, unsigned int *w, unsigned int *h)
DLL_MAPPING CUTBoolean CUTIL_API cutWriteFileub(const char *filename, const unsigned char *data, unsigned int len, bool verbose=false)
DLL_MAPPING CUTBoolean CUTIL_API cutStartTimer(const unsigned int name)
DLL_MAPPING CUTBoolean CUTIL_API cutReadFileub(const char *filename, unsigned char **data, unsigned int *len, bool verbose=false)
DLL_MAPPING CUTBoolean CUTIL_API cutSavePGMi(const char *file, unsigned int *data, unsigned int w, unsigned int h)
int verbose
Definition: coSimClient.c:185
DLL_MAPPING CUTBoolean CUTIL_API cutCompareub(const unsigned char *reference, const unsigned char *data, const unsigned int len)
DLL_MAPPING CUTBoolean CUTIL_API cutComparei(const int *reference, const int *data, const unsigned int len)
DLL_MAPPING CUTBoolean CUTIL_API cutGetCmdLineArgumenti(const int argc, const char **argv, const char *arg_name, int *val)
Definition: cutil.h:69
GLuint GLfloat * val
Definition: khronos-glext.h:7898
#define CUTIL_API
Definition: cutil.h:60
GLint reference
Definition: khronos-glext.h:12998
DLL_MAPPING CUTBoolean CUTIL_API cutSavePGMs(const char *file, unsigned short *data, unsigned int w, unsigned int h)
DLL_MAPPING void CUTIL_API cutCheckBankAccess(unsigned int tidx, unsigned int tidy, unsigned int tidz, unsigned int bdimx, unsigned int bdimy, unsigned int bdimz, const char *file, const int line, const char *aname, const int index)
DLL_MAPPING CUTBoolean CUTIL_API cutGetCmdLineArgumentListstr(const int argc, const char **argv, const char *arg_name, char **val, unsigned int *len)
DLL_MAPPING float CUTIL_API cutGetTimerValue(const unsigned int name)
DLL_MAPPING CUTBoolean CUTIL_API cutReadFileb(const char *filename, char **data, unsigned int *len, bool verbose=false)
DLL_MAPPING CUTBoolean CUTIL_API cutCompareuit(const unsigned int *reference, const unsigned int *data, const unsigned int len, const float epsilon, const float threshold)
DLL_MAPPING CUTBoolean CUTIL_API cutResetTimer(const unsigned int name)
CUTBoolean
CUT bool type.
Definition: cutil.h:66
GLubyte GLubyte GLubyte GLubyte w
Definition: khronos-glext.h:6793
DLL_MAPPING CUTBoolean CUTIL_API cutSavePPM4ub(const char *file, unsigned char *data, unsigned int w, unsigned int h)
DLL_MAPPING CUTBoolean CUTIL_API cutComparefet(const float *reference, const float *data, const unsigned int len, const float epsilon, const float threshold)
DLL_MAPPING char *CUTIL_API cutFindFilePath(const char *filename, const char *executablePath)
DLL_MAPPING float CUTIL_API cutGetAverageTimerValue(const unsigned int name)
DLL_MAPPING CUTBoolean CUTIL_API cutCompareL2fe(const float *reference, const float *data, const unsigned int len, const float epsilon)
DLL_MAPPING CUTBoolean CUTIL_API cutWriteFilei(const char *filename, const int *data, unsigned int len, bool verbose=false)
DLL_MAPPING CUTBoolean CUTIL_API cutComparePPM(const char *src_file, const char *ref_file, const float epsilon, const float threshold, bool verboseErrors=false)
DLL_MAPPING CUTBoolean CUTIL_API cutReadFilef(const char *filename, float **data, unsigned int *len, bool verbose=false)
GLuint index
Definition: khronos-glext.h:6722
DLL_MAPPING CUTBoolean CUTIL_API cutLoadPGMf(const char *file, float **data, unsigned int *w, unsigned int *h)
DLL_MAPPING CUTBoolean CUTIL_API cutLoadPGMub(const char *file, unsigned char **data, unsigned int *w, unsigned int *h)
DLL_MAPPING CUTBoolean CUTIL_API cutGetCmdLineArgumentf(const int argc, const char **argv, const char *arg_name, float *val)
DLL_MAPPING CUTBoolean CUTIL_API cutWriteFilef(const char *filename, const float *data, unsigned int len, const float epsilon, bool verbose=false)
DLL_MAPPING CUTBoolean CUTIL_API cutDeleteTimer(unsigned int name)
DLL_MAPPING CUTBoolean CUTIL_API cutCheckCondition(int val, const char *file, const int line)
Definition: cutil.h:68
DLL_MAPPING CUTBoolean CUTIL_API cutCompareube(const unsigned char *reference, const unsigned char *data, const unsigned int len, const float epsilon)
DLL_MAPPING CUTBoolean CUTIL_API cutComparefe(const float *reference, const float *data, const unsigned int len, const float epsilon)
#define DLL_MAPPING
Definition: cutil.h:54
DLL_MAPPING CUTBoolean CUTIL_API cutGetCmdLineArgumentstr(const int argc, const char **argv, const char *arg_name, char **val)
DLL_MAPPING CUTBoolean CUTIL_API cutLoadPGMs(const char *file, unsigned short **data, unsigned int *w, unsigned int *h)
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: khronos-glext.h:6354
DLL_MAPPING CUTBoolean CUTIL_API cutStopTimer(const unsigned int name)
DLL_MAPPING CUTBoolean CUTIL_API cutCompareubt(const unsigned char *reference, const unsigned char *data, const unsigned int len, const float epsilon, const float threshold)
DLL_MAPPING CUTBoolean CUTIL_API cutReadFiled(const char *filename, double **data, unsigned int *len, bool verbose=false)
DLL_MAPPING void CUTIL_API cutFree(void *ptr)
DLL_MAPPING CUTBoolean CUTIL_API cutLoadPPMub(const char *file, unsigned char **data, unsigned int *w, unsigned int *h)
DLL_MAPPING CUTBoolean CUTIL_API cutSavePGMub(const char *file, unsigned char *data, unsigned int w, unsigned int h)