00001
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _GAN_MISC_ERROR_H
00030 #define _GAN_MISC_ERROR_H
00031
00032 #include <stdio.h>
00033 #include <float.h>
00034 #include <limits.h>
00035 #include <gandalf/common/gan_err.h>
00036 #include <gandalf/common/misc_defs.h>
00037
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif
00041
00052
00053
00054
00055 #define GAN_ERROR_FAILURE 1
00056 #define GAN_ERROR_NOT_IMPLEMENTED 2
00057 #define GAN_ERROR_REF_OUTSIDE_MATRIX 3
00058 #define GAN_ERROR_CANT_REALLOC 4
00059 #define GAN_ERROR_MALLOC_FAILED 5
00060 #define GAN_ERROR_DIFFERENT_DIMS 6
00061 #define GAN_ERROR_INCOMPATIBLE 7
00062 #define GAN_ERROR_MATRIX_NOT_SQUARE 8
00063 #define GAN_ERROR_INPLACE_TRANSPOSE 9
00064 #define GAN_ERROR_INPLACE_MULTIPLY 10
00065 #define GAN_ERROR_ARRAY_TOO_SMALL 11
00066 #define GAN_ERROR_ILLEGAL_TYPE 12
00067 #define GAN_ERROR_NO_IMPLICIT_INV 13
00068 #define GAN_ERROR_CLAPACK_ILLEGAL_ARG 14
00069 #define GAN_ERROR_CBLAS_ILLEGAL_ARG 15
00070 #define GAN_ERROR_CBLAS_FAILED 16
00071 #define GAN_ERROR_NOT_POSITIVE_DEFINITE 17
00072 #define GAN_ERROR_DIVISION_BY_ZERO 18
00073 #define GAN_ERROR_SQRT_OF_NEG_NUMBER 19
00074 #define GAN_ERROR_NO_CONVERGENCE 20
00075 #define GAN_ERROR_SINGULAR_MATRIX 21
00076 #define GAN_ERROR_IMAGE_TOO_SMALL 22
00077 #define GAN_ERROR_NO_DATA 23
00078 #define GAN_ERROR_NOT_ENOUGH_DATA 24
00079 #define GAN_ERROR_OPENING_FILE 25
00080 #define GAN_ERROR_CORRUPTED_FILE 26
00081 #define GAN_ERROR_OUTSIDE_RANGE 27
00082 #define GAN_ERROR_TOO_LARGE 28
00083 #define GAN_ERROR_TOO_SMALL 29
00084 #define GAN_ERROR_TRUNCATED_FILE 30
00085 #define GAN_ERROR_NOT_INITIALISED 31
00086 #define GAN_ERROR_ILLEGAL_ARGUMENT 32
00087 #define GAN_ERROR_CCMATH_FAILED 33
00088 #define GAN_ERROR_NO_SOLUTION 34
00089 #define GAN_ERROR_READING_FROM_FILE 35
00090 #define GAN_ERROR_WRITING_TO_FILE 36
00091 #define GAN_ERROR_EXTERNAL_LIBRARY_CALL 37
00092 #define GAN_ERROR_ILLEGAL_IMAGE_TYPE 38
00093 #define GAN_ERROR_ILLEGAL_IMAGE_FORMAT 39
00094 #define GAN_ERROR_ILLEGAL_IMAGE_FILE_FORMAT 40
00095 #define GAN_ERROR_ILLEGAL_IMAGE_CHANNEL 41
00096
00097 const char *gan_err_string_at_lowest_level(void);
00098 const char *gan_err_string(int error_code);
00099 void gan_err_default_reporter(void);
00100
00109 #ifdef __cplusplus
00110 }
00111 #endif
00112
00113 #endif