// /usr/libexec/gcc/powerpc-unknown-linux-gnu/4.2.0/cc1plus -quiet -I. -I. -I.. -I../include -MD enblend-enblend.d -MF .deps/enblend-enblend.Tpo -MP -MT enblend-enblend.o -MQ enblend-enblend.o -D_GNU_SOURCE -D__unix__ -D__gnu_linux__ -D__linux__ -Dunix -D__unix -Dlinux -D__linux -Asystem=linux -Asystem=unix -Asystem=posix -DHAVE_CONFIG_H -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DENBLEND_CACHE_IMAGES -DNDEBUG enblend.cc -msecure-plt -quiet -dumpbase enblend.cc -mcpu=970 -auxbase-strip enblend-enblend.o -g -g -O3 -O2 -Wall -ffast-math -o - -frandom-seed=0 # 1 "enblend.cc" # 1 "/var/tmp/portage/media-gfx/enblend-3.0/work/enblend-3.0/src//" # 1 "" # 1 "" # 1 "enblend.cc" # 21 "enblend.cc" # 1 "../config.h" 1 # 22 "enblend.cc" 2 # 30 "enblend.cc" # 1 "float_cast.h" 1 # 63 "float_cast.h" # 1 "/usr/include/math.h" 1 3 4 # 28 "/usr/include/math.h" 3 4 # 1 "/usr/include/features.h" 1 3 4 # 322 "/usr/include/features.h" 3 4 # 1 "/usr/include/sys/cdefs.h" 1 3 4 # 324 "/usr/include/sys/cdefs.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 325 "/usr/include/sys/cdefs.h" 2 3 4 # 323 "/usr/include/features.h" 2 3 4 # 345 "/usr/include/features.h" 3 4 # 1 "/usr/include/gnu/stubs.h" 1 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 5 "/usr/include/gnu/stubs.h" 2 3 4 # 1 "/usr/include/gnu/stubs-32.h" 1 3 4 # 8 "/usr/include/gnu/stubs.h" 2 3 4 # 346 "/usr/include/features.h" 2 3 4 # 29 "/usr/include/math.h" 2 3 4 extern "C" { # 1 "/usr/include/bits/huge_val.h" 1 3 4 # 35 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/bits/huge_valf.h" 1 3 4 # 37 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/bits/huge_vall.h" 1 3 4 # 38 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/bits/inf.h" 1 3 4 # 41 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/bits/nan.h" 1 3 4 # 44 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/bits/mathdef.h" 1 3 4 # 38 "/usr/include/bits/mathdef.h" 3 4 typedef float float_t; typedef double double_t; # 48 "/usr/include/math.h" 2 3 4 # 71 "/usr/include/math.h" 3 4 # 1 "/usr/include/bits/mathcalls.h" 1 3 4 # 53 "/usr/include/bits/mathcalls.h" 3 4 extern double acos (double __x) throw (); extern double __acos (double __x) throw (); extern double asin (double __x) throw (); extern double __asin (double __x) throw (); extern double atan (double __x) throw (); extern double __atan (double __x) throw (); extern double atan2 (double __y, double __x) throw (); extern double __atan2 (double __y, double __x) throw (); extern double cos (double __x) throw (); extern double __cos (double __x) throw (); extern double sin (double __x) throw (); extern double __sin (double __x) throw (); extern double tan (double __x) throw (); extern double __tan (double __x) throw (); extern double cosh (double __x) throw (); extern double __cosh (double __x) throw (); extern double sinh (double __x) throw (); extern double __sinh (double __x) throw (); extern double tanh (double __x) throw (); extern double __tanh (double __x) throw (); extern void sincos (double __x, double *__sinx, double *__cosx) throw (); extern void __sincos (double __x, double *__sinx, double *__cosx) throw (); extern double acosh (double __x) throw (); extern double __acosh (double __x) throw (); extern double asinh (double __x) throw (); extern double __asinh (double __x) throw (); extern double atanh (double __x) throw (); extern double __atanh (double __x) throw (); extern double exp (double __x) throw (); extern double __exp (double __x) throw (); extern double frexp (double __x, int *__exponent) throw (); extern double __frexp (double __x, int *__exponent) throw (); extern double ldexp (double __x, int __exponent) throw (); extern double __ldexp (double __x, int __exponent) throw (); extern double log (double __x) throw (); extern double __log (double __x) throw (); extern double log10 (double __x) throw (); extern double __log10 (double __x) throw (); extern double modf (double __x, double *__iptr) throw (); extern double __modf (double __x, double *__iptr) throw (); extern double exp10 (double __x) throw (); extern double __exp10 (double __x) throw (); extern double pow10 (double __x) throw (); extern double __pow10 (double __x) throw (); extern double expm1 (double __x) throw (); extern double __expm1 (double __x) throw (); extern double log1p (double __x) throw (); extern double __log1p (double __x) throw (); extern double logb (double __x) throw (); extern double __logb (double __x) throw (); extern double exp2 (double __x) throw (); extern double __exp2 (double __x) throw (); extern double log2 (double __x) throw (); extern double __log2 (double __x) throw (); extern double pow (double __x, double __y) throw (); extern double __pow (double __x, double __y) throw (); extern double sqrt (double __x) throw (); extern double __sqrt (double __x) throw (); extern double hypot (double __x, double __y) throw (); extern double __hypot (double __x, double __y) throw (); extern double cbrt (double __x) throw (); extern double __cbrt (double __x) throw (); extern double ceil (double __x) throw () __attribute__ ((__const__)); extern double __ceil (double __x) throw () __attribute__ ((__const__)); extern double fabs (double __x) throw () __attribute__ ((__const__)); extern double __fabs (double __x) throw () __attribute__ ((__const__)); extern double floor (double __x) throw () __attribute__ ((__const__)); extern double __floor (double __x) throw () __attribute__ ((__const__)); extern double fmod (double __x, double __y) throw (); extern double __fmod (double __x, double __y) throw (); extern int __isinf (double __value) throw () __attribute__ ((__const__)); extern int __finite (double __value) throw () __attribute__ ((__const__)); extern int isinf (double __value) throw () __attribute__ ((__const__)); extern int finite (double __value) throw () __attribute__ ((__const__)); extern double drem (double __x, double __y) throw (); extern double __drem (double __x, double __y) throw (); extern double significand (double __x) throw (); extern double __significand (double __x) throw (); extern double copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double __copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double nan (__const char *__tagb) throw () __attribute__ ((__const__)); extern double __nan (__const char *__tagb) throw () __attribute__ ((__const__)); extern int __isnan (double __value) throw () __attribute__ ((__const__)); extern int isnan (double __value) throw () __attribute__ ((__const__)); extern double j0 (double) throw (); extern double __j0 (double) throw (); extern double j1 (double) throw (); extern double __j1 (double) throw (); extern double jn (int, double) throw (); extern double __jn (int, double) throw (); extern double y0 (double) throw (); extern double __y0 (double) throw (); extern double y1 (double) throw (); extern double __y1 (double) throw (); extern double yn (int, double) throw (); extern double __yn (int, double) throw (); extern double erf (double) throw (); extern double __erf (double) throw (); extern double erfc (double) throw (); extern double __erfc (double) throw (); extern double lgamma (double) throw (); extern double __lgamma (double) throw (); extern double tgamma (double) throw (); extern double __tgamma (double) throw (); extern double gamma (double) throw (); extern double __gamma (double) throw (); extern double lgamma_r (double, int *__signgamp) throw (); extern double __lgamma_r (double, int *__signgamp) throw (); extern double rint (double __x) throw (); extern double __rint (double __x) throw (); extern double nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double remainder (double __x, double __y) throw (); extern double __remainder (double __x, double __y) throw (); extern double scalbn (double __x, int __n) throw (); extern double __scalbn (double __x, int __n) throw (); extern int ilogb (double __x) throw (); extern int __ilogb (double __x) throw (); extern double scalbln (double __x, long int __n) throw (); extern double __scalbln (double __x, long int __n) throw (); extern double nearbyint (double __x) throw (); extern double __nearbyint (double __x) throw (); extern double round (double __x) throw () __attribute__ ((__const__)); extern double __round (double __x) throw () __attribute__ ((__const__)); extern double trunc (double __x) throw () __attribute__ ((__const__)); extern double __trunc (double __x) throw () __attribute__ ((__const__)); extern double remquo (double __x, double __y, int *__quo) throw (); extern double __remquo (double __x, double __y, int *__quo) throw (); extern long int lrint (double __x) throw (); extern long int __lrint (double __x) throw (); extern long long int llrint (double __x) throw (); extern long long int __llrint (double __x) throw (); extern long int lround (double __x) throw (); extern long int __lround (double __x) throw (); extern long long int llround (double __x) throw (); extern long long int __llround (double __x) throw (); extern double fdim (double __x, double __y) throw (); extern double __fdim (double __x, double __y) throw (); extern double fmax (double __x, double __y) throw (); extern double __fmax (double __x, double __y) throw (); extern double fmin (double __x, double __y) throw (); extern double __fmin (double __x, double __y) throw (); extern int __fpclassify (double __value) throw () __attribute__ ((__const__)); extern int __signbit (double __value) throw () __attribute__ ((__const__)); extern double fma (double __x, double __y, double __z) throw (); extern double __fma (double __x, double __y, double __z) throw (); extern double scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw (); # 72 "/usr/include/math.h" 2 3 4 # 94 "/usr/include/math.h" 3 4 # 1 "/usr/include/bits/mathcalls.h" 1 3 4 # 53 "/usr/include/bits/mathcalls.h" 3 4 extern float acosf (float __x) throw (); extern float __acosf (float __x) throw (); extern float asinf (float __x) throw (); extern float __asinf (float __x) throw (); extern float atanf (float __x) throw (); extern float __atanf (float __x) throw (); extern float atan2f (float __y, float __x) throw (); extern float __atan2f (float __y, float __x) throw (); extern float cosf (float __x) throw (); extern float __cosf (float __x) throw (); extern float sinf (float __x) throw (); extern float __sinf (float __x) throw (); extern float tanf (float __x) throw (); extern float __tanf (float __x) throw (); extern float coshf (float __x) throw (); extern float __coshf (float __x) throw (); extern float sinhf (float __x) throw (); extern float __sinhf (float __x) throw (); extern float tanhf (float __x) throw (); extern float __tanhf (float __x) throw (); extern void sincosf (float __x, float *__sinx, float *__cosx) throw (); extern void __sincosf (float __x, float *__sinx, float *__cosx) throw (); extern float acoshf (float __x) throw (); extern float __acoshf (float __x) throw (); extern float asinhf (float __x) throw (); extern float __asinhf (float __x) throw (); extern float atanhf (float __x) throw (); extern float __atanhf (float __x) throw (); extern float expf (float __x) throw (); extern float __expf (float __x) throw (); extern float frexpf (float __x, int *__exponent) throw (); extern float __frexpf (float __x, int *__exponent) throw (); extern float ldexpf (float __x, int __exponent) throw (); extern float __ldexpf (float __x, int __exponent) throw (); extern float logf (float __x) throw (); extern float __logf (float __x) throw (); extern float log10f (float __x) throw (); extern float __log10f (float __x) throw (); extern float modff (float __x, float *__iptr) throw (); extern float __modff (float __x, float *__iptr) throw (); extern float exp10f (float __x) throw (); extern float __exp10f (float __x) throw (); extern float pow10f (float __x) throw (); extern float __pow10f (float __x) throw (); extern float expm1f (float __x) throw (); extern float __expm1f (float __x) throw (); extern float log1pf (float __x) throw (); extern float __log1pf (float __x) throw (); extern float logbf (float __x) throw (); extern float __logbf (float __x) throw (); extern float exp2f (float __x) throw (); extern float __exp2f (float __x) throw (); extern float log2f (float __x) throw (); extern float __log2f (float __x) throw (); extern float powf (float __x, float __y) throw (); extern float __powf (float __x, float __y) throw (); extern float sqrtf (float __x) throw (); extern float __sqrtf (float __x) throw (); extern float hypotf (float __x, float __y) throw (); extern float __hypotf (float __x, float __y) throw (); extern float cbrtf (float __x) throw (); extern float __cbrtf (float __x) throw (); extern float ceilf (float __x) throw () __attribute__ ((__const__)); extern float __ceilf (float __x) throw () __attribute__ ((__const__)); extern float fabsf (float __x) throw () __attribute__ ((__const__)); extern float __fabsf (float __x) throw () __attribute__ ((__const__)); extern float floorf (float __x) throw () __attribute__ ((__const__)); extern float __floorf (float __x) throw () __attribute__ ((__const__)); extern float fmodf (float __x, float __y) throw (); extern float __fmodf (float __x, float __y) throw (); extern int __isinff (float __value) throw () __attribute__ ((__const__)); extern int __finitef (float __value) throw () __attribute__ ((__const__)); extern int isinff (float __value) throw () __attribute__ ((__const__)); extern int finitef (float __value) throw () __attribute__ ((__const__)); extern float dremf (float __x, float __y) throw (); extern float __dremf (float __x, float __y) throw (); extern float significandf (float __x) throw (); extern float __significandf (float __x) throw (); extern float copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float nanf (__const char *__tagb) throw () __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) throw () __attribute__ ((__const__)); extern int __isnanf (float __value) throw () __attribute__ ((__const__)); extern int isnanf (float __value) throw () __attribute__ ((__const__)); extern float j0f (float) throw (); extern float __j0f (float) throw (); extern float j1f (float) throw (); extern float __j1f (float) throw (); extern float jnf (int, float) throw (); extern float __jnf (int, float) throw (); extern float y0f (float) throw (); extern float __y0f (float) throw (); extern float y1f (float) throw (); extern float __y1f (float) throw (); extern float ynf (int, float) throw (); extern float __ynf (int, float) throw (); extern float erff (float) throw (); extern float __erff (float) throw (); extern float erfcf (float) throw (); extern float __erfcf (float) throw (); extern float lgammaf (float) throw (); extern float __lgammaf (float) throw (); extern float tgammaf (float) throw (); extern float __tgammaf (float) throw (); extern float gammaf (float) throw (); extern float __gammaf (float) throw (); extern float lgammaf_r (float, int *__signgamp) throw (); extern float __lgammaf_r (float, int *__signgamp) throw (); extern float rintf (float __x) throw (); extern float __rintf (float __x) throw (); extern float nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float remainderf (float __x, float __y) throw (); extern float __remainderf (float __x, float __y) throw (); extern float scalbnf (float __x, int __n) throw (); extern float __scalbnf (float __x, int __n) throw (); extern int ilogbf (float __x) throw (); extern int __ilogbf (float __x) throw (); extern float scalblnf (float __x, long int __n) throw (); extern float __scalblnf (float __x, long int __n) throw (); extern float nearbyintf (float __x) throw (); extern float __nearbyintf (float __x) throw (); extern float roundf (float __x) throw () __attribute__ ((__const__)); extern float __roundf (float __x) throw () __attribute__ ((__const__)); extern float truncf (float __x) throw () __attribute__ ((__const__)); extern float __truncf (float __x) throw () __attribute__ ((__const__)); extern float remquof (float __x, float __y, int *__quo) throw (); extern float __remquof (float __x, float __y, int *__quo) throw (); extern long int lrintf (float __x) throw (); extern long int __lrintf (float __x) throw (); extern long long int llrintf (float __x) throw (); extern long long int __llrintf (float __x) throw (); extern long int lroundf (float __x) throw (); extern long int __lroundf (float __x) throw (); extern long long int llroundf (float __x) throw (); extern long long int __llroundf (float __x) throw (); extern float fdimf (float __x, float __y) throw (); extern float __fdimf (float __x, float __y) throw (); extern float fmaxf (float __x, float __y) throw (); extern float __fmaxf (float __x, float __y) throw (); extern float fminf (float __x, float __y) throw (); extern float __fminf (float __x, float __y) throw (); extern int __fpclassifyf (float __value) throw () __attribute__ ((__const__)); extern int __signbitf (float __value) throw () __attribute__ ((__const__)); extern float fmaf (float __x, float __y, float __z) throw (); extern float __fmaf (float __x, float __y, float __z) throw (); extern float scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw (); # 95 "/usr/include/math.h" 2 3 4 # 141 "/usr/include/math.h" 3 4 # 1 "/usr/include/bits/mathcalls.h" 1 3 4 # 53 "/usr/include/bits/mathcalls.h" 3 4 extern long double acosl (long double __x) throw (); extern long double __acosl (long double __x) throw (); extern long double asinl (long double __x) throw (); extern long double __asinl (long double __x) throw (); extern long double atanl (long double __x) throw (); extern long double __atanl (long double __x) throw (); extern long double atan2l (long double __y, long double __x) throw (); extern long double __atan2l (long double __y, long double __x) throw (); extern long double cosl (long double __x) throw (); extern long double __cosl (long double __x) throw (); extern long double sinl (long double __x) throw (); extern long double __sinl (long double __x) throw (); extern long double tanl (long double __x) throw (); extern long double __tanl (long double __x) throw (); extern long double coshl (long double __x) throw (); extern long double __coshl (long double __x) throw (); extern long double sinhl (long double __x) throw (); extern long double __sinhl (long double __x) throw (); extern long double tanhl (long double __x) throw (); extern long double __tanhl (long double __x) throw (); extern void sincosl (long double __x, long double *__sinx, long double *__cosx) throw (); extern void __sincosl (long double __x, long double *__sinx, long double *__cosx) throw (); extern long double acoshl (long double __x) throw (); extern long double __acoshl (long double __x) throw (); extern long double asinhl (long double __x) throw (); extern long double __asinhl (long double __x) throw (); extern long double atanhl (long double __x) throw (); extern long double __atanhl (long double __x) throw (); extern long double expl (long double __x) throw (); extern long double __expl (long double __x) throw (); extern long double frexpl (long double __x, int *__exponent) throw (); extern long double __frexpl (long double __x, int *__exponent) throw (); extern long double ldexpl (long double __x, int __exponent) throw (); extern long double __ldexpl (long double __x, int __exponent) throw (); extern long double logl (long double __x) throw (); extern long double __logl (long double __x) throw (); extern long double log10l (long double __x) throw (); extern long double __log10l (long double __x) throw (); extern long double modfl (long double __x, long double *__iptr) throw (); extern long double __modfl (long double __x, long double *__iptr) throw (); extern long double exp10l (long double __x) throw (); extern long double __exp10l (long double __x) throw (); extern long double pow10l (long double __x) throw (); extern long double __pow10l (long double __x) throw (); extern long double expm1l (long double __x) throw (); extern long double __expm1l (long double __x) throw (); extern long double log1pl (long double __x) throw (); extern long double __log1pl (long double __x) throw (); extern long double logbl (long double __x) throw (); extern long double __logbl (long double __x) throw (); extern long double exp2l (long double __x) throw (); extern long double __exp2l (long double __x) throw (); extern long double log2l (long double __x) throw (); extern long double __log2l (long double __x) throw (); extern long double powl (long double __x, long double __y) throw (); extern long double __powl (long double __x, long double __y) throw (); extern long double sqrtl (long double __x) throw (); extern long double __sqrtl (long double __x) throw (); extern long double hypotl (long double __x, long double __y) throw (); extern long double __hypotl (long double __x, long double __y) throw (); extern long double cbrtl (long double __x) throw (); extern long double __cbrtl (long double __x) throw (); extern long double ceill (long double __x) throw () __attribute__ ((__const__)); extern long double __ceill (long double __x) throw () __attribute__ ((__const__)); extern long double fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double __fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double floorl (long double __x) throw () __attribute__ ((__const__)); extern long double __floorl (long double __x) throw () __attribute__ ((__const__)); extern long double fmodl (long double __x, long double __y) throw (); extern long double __fmodl (long double __x, long double __y) throw (); extern int __isinfl (long double __value) throw () __attribute__ ((__const__)); extern int __finitel (long double __value) throw () __attribute__ ((__const__)); extern int isinfl (long double __value) throw () __attribute__ ((__const__)); extern int finitel (long double __value) throw () __attribute__ ((__const__)); extern long double dreml (long double __x, long double __y) throw (); extern long double __dreml (long double __x, long double __y) throw (); extern long double significandl (long double __x) throw (); extern long double __significandl (long double __x) throw (); extern long double copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double nanl (__const char *__tagb) throw () __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) throw () __attribute__ ((__const__)); extern int __isnanl (long double __value) throw () __attribute__ ((__const__)); extern int isnanl (long double __value) throw () __attribute__ ((__const__)); extern long double j0l (long double) throw (); extern long double __j0l (long double) throw (); extern long double j1l (long double) throw (); extern long double __j1l (long double) throw (); extern long double jnl (int, long double) throw (); extern long double __jnl (int, long double) throw (); extern long double y0l (long double) throw (); extern long double __y0l (long double) throw (); extern long double y1l (long double) throw (); extern long double __y1l (long double) throw (); extern long double ynl (int, long double) throw (); extern long double __ynl (int, long double) throw (); extern long double erfl (long double) throw (); extern long double __erfl (long double) throw (); extern long double erfcl (long double) throw (); extern long double __erfcl (long double) throw (); extern long double lgammal (long double) throw (); extern long double __lgammal (long double) throw (); extern long double tgammal (long double) throw (); extern long double __tgammal (long double) throw (); extern long double gammal (long double) throw (); extern long double __gammal (long double) throw (); extern long double lgammal_r (long double, int *__signgamp) throw (); extern long double __lgammal_r (long double, int *__signgamp) throw (); extern long double rintl (long double __x) throw (); extern long double __rintl (long double __x) throw (); extern long double nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double remainderl (long double __x, long double __y) throw (); extern long double __remainderl (long double __x, long double __y) throw (); extern long double scalbnl (long double __x, int __n) throw (); extern long double __scalbnl (long double __x, int __n) throw (); extern int ilogbl (long double __x) throw (); extern int __ilogbl (long double __x) throw (); extern long double scalblnl (long double __x, long int __n) throw (); extern long double __scalblnl (long double __x, long int __n) throw (); extern long double nearbyintl (long double __x) throw (); extern long double __nearbyintl (long double __x) throw (); extern long double roundl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundl (long double __x) throw () __attribute__ ((__const__)); extern long double truncl (long double __x) throw () __attribute__ ((__const__)); extern long double __truncl (long double __x) throw () __attribute__ ((__const__)); extern long double remquol (long double __x, long double __y, int *__quo) throw (); extern long double __remquol (long double __x, long double __y, int *__quo) throw (); extern long int lrintl (long double __x) throw (); extern long int __lrintl (long double __x) throw (); extern long long int llrintl (long double __x) throw (); extern long long int __llrintl (long double __x) throw (); extern long int lroundl (long double __x) throw (); extern long int __lroundl (long double __x) throw (); extern long long int llroundl (long double __x) throw (); extern long long int __llroundl (long double __x) throw (); extern long double fdiml (long double __x, long double __y) throw (); extern long double __fdiml (long double __x, long double __y) throw (); extern long double fmaxl (long double __x, long double __y) throw (); extern long double __fmaxl (long double __x, long double __y) throw (); extern long double fminl (long double __x, long double __y) throw (); extern long double __fminl (long double __x, long double __y) throw (); extern int __fpclassifyl (long double __value) throw () __attribute__ ((__const__)); extern int __signbitl (long double __value) throw () __attribute__ ((__const__)); extern long double fmal (long double __x, long double __y, long double __z) throw (); extern long double __fmal (long double __x, long double __y, long double __z) throw (); extern long double scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw (); # 142 "/usr/include/math.h" 2 3 4 # 157 "/usr/include/math.h" 3 4 extern int signgam; # 198 "/usr/include/math.h" 3 4 enum { FP_NAN, FP_INFINITE, FP_ZERO, FP_SUBNORMAL, FP_NORMAL }; # 284 "/usr/include/math.h" 3 4 typedef enum { _IEEE_ = -1, _SVID_, _XOPEN_, _POSIX_, _ISOC_ } _LIB_VERSION_TYPE; extern _LIB_VERSION_TYPE _LIB_VERSION; # 307 "/usr/include/math.h" 3 4 struct __exception { int type; char *name; double arg1; double arg2; double retval; }; extern int matherr (struct __exception *__exc) throw (); # 409 "/usr/include/math.h" 3 4 # 1 "/usr/include/bits/mathinline.h" 1 3 4 # 63 "/usr/include/bits/mathinline.h" 3 4 __inline int __signbitf (float __x) throw () { __extension__ union { float __f; int __i; } __u = { __f: __x }; return __u.__i < 0; } __inline int __signbit (double __x) throw () { __extension__ union { double __d; int __i[2]; } __u = { __d: __x }; return __u.__i[0] < 0; } # 83 "/usr/include/bits/mathinline.h" 3 4 __inline long int lrint (double __x) throw (); __inline long int lrint (double __x) throw () { union { double __d; int __ll[2]; } __u; __asm__ ("fctiw %0,%1" : "=f"(__u.__d) : "f"(__x)); return __u.__ll[1]; } __inline long int lrintf (float __x) throw (); __inline long int lrintf (float __x) throw () { union { double __d; int __ll[2]; } __u; __asm__ ("fctiw %0,%1" : "=f"(__u.__d) : "f"(__x)); return __u.__ll[1]; } __inline double fdim (double __x, double __y) throw (); __inline double fdim (double __x, double __y) throw () { return __x <= __y ? 0 : __x - __y; } __inline float fdimf (float __x, float __y) throw (); __inline float fdimf (float __x, float __y) throw () { return __x <= __y ? 0 : __x - __y; } # 410 "/usr/include/math.h" 2 3 4 # 465 "/usr/include/math.h" 3 4 } # 64 "float_cast.h" 2 # 31 "enblend.cc" 2 # 47 "enblend.cc" # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/algorithm" 1 3 # 63 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/algorithm" 3 # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/algorithm" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 1 3 # 65 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++config.h" 1 3 # 41 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++config.h" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/os_defines.h" 1 3 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++config.h" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/cpu_defines.h" 1 3 # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++config.h" 2 3 # 149 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++config.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { namespace __gnu_cxx_ldbl128 { } using namespace __gnu_cxx_ldbl128 __attribute__((__strong__)); } # 66 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstring" 1 3 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstring" 3 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstring" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstddef" 1 3 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstddef" 3 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstddef" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4 # 152 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 3 4 typedef int ptrdiff_t; # 214 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 3 4 typedef unsigned int size_t; # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstddef" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { using ::ptrdiff_t; using ::size_t; } # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstring" 2 3 # 1 "/usr/include/string.h" 1 3 4 # 28 "/usr/include/string.h" 3 4 extern "C" { # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4 # 34 "/usr/include/string.h" 2 3 4 extern void *memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *memmove (void *__dest, __const void *__src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memchr (__const void *__s, int __c, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern void *rawmemchr (__const void *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern void *memrchr (__const void *__s, int __c, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strcat (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strncat (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern int strcmp (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcoll (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strxfrm (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (2))); # 1 "/usr/include/xlocale.h" 1 3 4 # 28 "/usr/include/xlocale.h" 3 4 typedef struct __locale_struct { struct locale_data *__locales[13]; const unsigned short int *__ctype_b; const int *__ctype_tolower; const int *__ctype_toupper; const char *__names[13]; } *__locale_t; # 119 "/usr/include/string.h" 2 3 4 extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, __locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4))); extern char *strdup (__const char *__s) throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); extern char *strndup (__const char *__string, size_t __n) throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); # 165 "/usr/include/string.h" 3 4 extern char *strchr (__const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strrchr (__const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strchrnul (__const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern size_t strcspn (__const char *__s, __const char *__reject) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strspn (__const char *__s, __const char *__accept) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strpbrk (__const char *__s, __const char *__accept) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strstr (__const char *__haystack, __const char *__needle) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strtok (char *__restrict __s, __const char *__restrict __delim) throw () __attribute__ ((__nonnull__ (2))); extern char *__strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) throw () __attribute__ ((__nonnull__ (2, 3))); extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) throw () __attribute__ ((__nonnull__ (2, 3))); extern char *strcasestr (__const char *__haystack, __const char *__needle) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memmem (__const void *__haystack, size_t __haystacklen, __const void *__needle, size_t __needlelen) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); extern void *__mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern size_t strlen (__const char *__s) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern size_t strnlen (__const char *__string, size_t __maxlen) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strerror (int __errnum) throw (); # 281 "/usr/include/string.h" 3 4 extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) throw () __attribute__ ((__nonnull__ (2))); extern char *strerror_l (int __errnum, __locale_t __l) throw (); extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern void bcopy (__const void *__src, void *__dest, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *index (__const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *rindex (__const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern int ffs (int __i) throw () __attribute__ ((__const__)); extern int ffsl (long int __l) throw () __attribute__ ((__const__)); __extension__ extern int ffsll (long long int __ll) throw () __attribute__ ((__const__)); extern int strcasecmp (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcasecmp_l (__const char *__s1, __const char *__s2, __locale_t __loc) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern int strncasecmp_l (__const char *__s1, __const char *__s2, size_t __n, __locale_t __loc) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); extern char *strsep (char **__restrict __stringp, __const char *__restrict __delim) throw () __attribute__ ((__nonnull__ (1, 2))); extern int strverscmp (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strsignal (int __sig) throw (); extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *__stpncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *stpncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1))); extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern char *basename (__const char *__filename) throw () __attribute__ ((__nonnull__ (1))); # 432 "/usr/include/string.h" 3 4 } # 53 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstring" 2 3 # 78 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstring" 3 namespace std __attribute__ ((__visibility__ ("default"))) { using ::memcpy; using ::memmove; using ::strcpy; using ::strncpy; using ::strcat; using ::strncat; using ::memcmp; using ::strcmp; using ::strcoll; using ::strncmp; using ::strxfrm; using ::strcspn; using ::strspn; using ::strtok; using ::memset; using ::strerror; using ::strlen; using ::memchr; inline void* memchr(void* __p, int __c, size_t __n) { return memchr(const_cast(__p), __c, __n); } using ::strchr; inline char* strchr(char* __s1, int __n) { return __builtin_strchr(const_cast(__s1), __n); } using ::strpbrk; inline char* strpbrk(char* __s1, const char* __s2) { return __builtin_strpbrk(const_cast(__s1), __s2); } using ::strrchr; inline char* strrchr(char* __s1, int __n) { return __builtin_strrchr(const_cast(__s1), __n); } using ::strstr; inline char* strstr(char* __s1, const char* __s2) { return __builtin_strstr(const_cast(__s1), __s2); } } # 67 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/climits" 1 3 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/climits" 3 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/climits" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/limits.h" 1 3 4 # 11 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/limits.h" 3 4 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/syslimits.h" 1 3 4 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/limits.h" 1 3 4 # 122 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/limits.h" 3 4 # 1 "/usr/include/limits.h" 1 3 4 # 145 "/usr/include/limits.h" 3 4 # 1 "/usr/include/bits/posix1_lim.h" 1 3 4 # 153 "/usr/include/bits/posix1_lim.h" 3 4 # 1 "/usr/include/bits/local_lim.h" 1 3 4 # 36 "/usr/include/bits/local_lim.h" 3 4 # 1 "/usr/include/linux/limits.h" 1 3 4 # 37 "/usr/include/bits/local_lim.h" 2 3 4 # 154 "/usr/include/bits/posix1_lim.h" 2 3 4 # 146 "/usr/include/limits.h" 2 3 4 # 1 "/usr/include/bits/posix2_lim.h" 1 3 4 # 150 "/usr/include/limits.h" 2 3 4 # 1 "/usr/include/bits/xopen_lim.h" 1 3 4 # 34 "/usr/include/bits/xopen_lim.h" 3 4 # 1 "/usr/include/bits/stdio_lim.h" 1 3 4 # 35 "/usr/include/bits/xopen_lim.h" 2 3 4 # 154 "/usr/include/limits.h" 2 3 4 # 123 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/limits.h" 2 3 4 # 8 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/syslimits.h" 2 3 4 # 12 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/limits.h" 2 3 4 # 51 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/climits" 2 3 # 68 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdlib" 1 3 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdlib" 3 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdlib" 3 # 72 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdlib" 3 # 1 "/usr/include/stdlib.h" 1 3 4 # 33 "/usr/include/stdlib.h" 3 4 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4 # 34 "/usr/include/stdlib.h" 2 3 4 extern "C" { # 1 "/usr/include/bits/waitflags.h" 1 3 4 # 43 "/usr/include/stdlib.h" 2 3 4 # 1 "/usr/include/bits/waitstatus.h" 1 3 4 # 65 "/usr/include/bits/waitstatus.h" 3 4 # 1 "/usr/include/endian.h" 1 3 4 # 37 "/usr/include/endian.h" 3 4 # 1 "/usr/include/bits/endian.h" 1 3 4 # 38 "/usr/include/endian.h" 2 3 4 # 66 "/usr/include/bits/waitstatus.h" 2 3 4 union wait { int w_status; struct { unsigned int:16; unsigned int __w_retcode:8; unsigned int __w_coredump:1; unsigned int __w_termsig:7; } __wait_terminated; struct { unsigned int:16; unsigned int __w_stopsig:8; unsigned int __w_stopval:8; } __wait_stopped; }; # 44 "/usr/include/stdlib.h" 2 3 4 # 96 "/usr/include/stdlib.h" 3 4 typedef struct { int quot; int rem; } div_t; typedef struct { long int quot; long int rem; } ldiv_t; __extension__ typedef struct { long long int quot; long long int rem; } lldiv_t; # 140 "/usr/include/stdlib.h" 3 4 extern size_t __ctype_get_mb_cur_max (void) throw () ; extern double atof (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; extern int atoi (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; extern long int atol (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; __extension__ extern long long int atoll (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; extern double strtod (__const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) ; extern float strtof (__const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) ; extern long double strtold (__const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) ; extern long int strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) ; extern unsigned long int strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) ; __extension__ extern long long int strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) ; __extension__ extern unsigned long long int strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) ; __extension__ extern long long int strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) ; __extension__ extern unsigned long long int strtoull (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) ; # 240 "/usr/include/stdlib.h" 3 4 extern long int strtol_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ; extern unsigned long int strtoul_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ; __extension__ extern long long int strtoll_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ; __extension__ extern unsigned long long int strtoull_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ; extern double strtod_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))) ; extern float strtof_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))) ; extern long double strtold_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))) ; extern double __strtod_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) throw () __attribute__ ((__nonnull__ (1))) ; extern float __strtof_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) throw () __attribute__ ((__nonnull__ (1))) ; extern long double __strtold_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) throw () __attribute__ ((__nonnull__ (1))) ; extern long int __strtol_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) throw () __attribute__ ((__nonnull__ (1))) ; extern unsigned long int __strtoul_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) throw () __attribute__ ((__nonnull__ (1))) ; __extension__ extern long long int __strtoll_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) throw () __attribute__ ((__nonnull__ (1))) ; __extension__ extern unsigned long long int __strtoull_internal (__const char * __restrict __nptr, char **__restrict __endptr, int __base, int __group) throw () __attribute__ ((__nonnull__ (1))) ; extern __inline double strtod (__const char *__restrict __nptr, char **__restrict __endptr) throw () { return __strtod_internal (__nptr, __endptr, 0); } extern __inline long int strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () { return __strtol_internal (__nptr, __endptr, __base, 0); } extern __inline unsigned long int strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () { return __strtoul_internal (__nptr, __endptr, __base, 0); } extern __inline float strtof (__const char *__restrict __nptr, char **__restrict __endptr) throw () { return __strtof_internal (__nptr, __endptr, 0); } extern __inline long double strtold (__const char *__restrict __nptr, char **__restrict __endptr) throw () { return __strtold_internal (__nptr, __endptr, 0); } __extension__ extern __inline long long int strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () { return __strtoll_internal (__nptr, __endptr, __base, 0); } __extension__ extern __inline unsigned long long int strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () { return __strtoull_internal (__nptr, __endptr, __base, 0); } __extension__ extern __inline long long int strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () { return __strtoll_internal (__nptr, __endptr, __base, 0); } __extension__ extern __inline unsigned long long int strtoull (__const char * __restrict __nptr, char **__restrict __endptr, int __base) throw () { return __strtoull_internal (__nptr, __endptr, __base, 0); } extern __inline double atof (__const char *__nptr) throw () { return strtod (__nptr, (char **) __null); } extern __inline int atoi (__const char *__nptr) throw () { return (int) strtol (__nptr, (char **) __null, 10); } extern __inline long int atol (__const char *__nptr) throw () { return strtol (__nptr, (char **) __null, 10); } __extension__ extern __inline long long int atoll (__const char *__nptr) throw () { return strtoll (__nptr, (char **) __null, 10); } # 429 "/usr/include/stdlib.h" 3 4 extern char *l64a (long int __n) throw () ; extern long int a64l (__const char *__s) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; # 1 "/usr/include/sys/types.h" 1 3 4 # 29 "/usr/include/sys/types.h" 3 4 extern "C" { # 1 "/usr/include/bits/types.h" 1 3 4 # 28 "/usr/include/bits/types.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 29 "/usr/include/bits/types.h" 2 3 4 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4 # 32 "/usr/include/bits/types.h" 2 3 4 typedef unsigned char __u_char; typedef unsigned short int __u_short; typedef unsigned int __u_int; typedef unsigned long int __u_long; typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef signed short int __int16_t; typedef unsigned short int __uint16_t; typedef signed int __int32_t; typedef unsigned int __uint32_t; __extension__ typedef signed long long int __int64_t; __extension__ typedef unsigned long long int __uint64_t; __extension__ typedef long long int __quad_t; __extension__ typedef unsigned long long int __u_quad_t; # 134 "/usr/include/bits/types.h" 3 4 # 1 "/usr/include/bits/typesizes.h" 1 3 4 # 135 "/usr/include/bits/types.h" 2 3 4 __extension__ typedef __u_quad_t __dev_t; __extension__ typedef unsigned int __uid_t; __extension__ typedef unsigned int __gid_t; __extension__ typedef unsigned long int __ino_t; __extension__ typedef __u_quad_t __ino64_t; __extension__ typedef unsigned int __mode_t; __extension__ typedef unsigned int __nlink_t; __extension__ typedef long int __off_t; __extension__ typedef __quad_t __off64_t; __extension__ typedef int __pid_t; __extension__ typedef struct { int __val[2]; } __fsid_t; __extension__ typedef long int __clock_t; __extension__ typedef unsigned long int __rlim_t; __extension__ typedef __u_quad_t __rlim64_t; __extension__ typedef unsigned int __id_t; __extension__ typedef long int __time_t; __extension__ typedef unsigned int __useconds_t; __extension__ typedef long int __suseconds_t; __extension__ typedef int __daddr_t; __extension__ typedef long int __swblk_t; __extension__ typedef int __key_t; __extension__ typedef int __clockid_t; __extension__ typedef void * __timer_t; __extension__ typedef long int __blksize_t; __extension__ typedef long int __blkcnt_t; __extension__ typedef __quad_t __blkcnt64_t; __extension__ typedef unsigned long int __fsblkcnt_t; __extension__ typedef __u_quad_t __fsblkcnt64_t; __extension__ typedef unsigned long int __fsfilcnt_t; __extension__ typedef __u_quad_t __fsfilcnt64_t; __extension__ typedef int __ssize_t; typedef __off64_t __loff_t; typedef __quad_t *__qaddr_t; typedef char *__caddr_t; __extension__ typedef int __intptr_t; __extension__ typedef unsigned int __socklen_t; # 32 "/usr/include/sys/types.h" 2 3 4 typedef __u_char u_char; typedef __u_short u_short; typedef __u_int u_int; typedef __u_long u_long; typedef __quad_t quad_t; typedef __u_quad_t u_quad_t; typedef __fsid_t fsid_t; typedef __loff_t loff_t; typedef __ino64_t ino_t; typedef __ino64_t ino64_t; typedef __dev_t dev_t; typedef __gid_t gid_t; typedef __mode_t mode_t; typedef __nlink_t nlink_t; typedef __uid_t uid_t; typedef __off64_t off_t; typedef __off64_t off64_t; typedef __pid_t pid_t; typedef __id_t id_t; typedef __ssize_t ssize_t; typedef __daddr_t daddr_t; typedef __caddr_t caddr_t; typedef __key_t key_t; # 133 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/time.h" 1 3 4 # 59 "/usr/include/time.h" 3 4 typedef __clock_t clock_t; # 75 "/usr/include/time.h" 3 4 typedef __time_t time_t; # 93 "/usr/include/time.h" 3 4 typedef __clockid_t clockid_t; # 105 "/usr/include/time.h" 3 4 typedef __timer_t timer_t; # 134 "/usr/include/sys/types.h" 2 3 4 typedef __useconds_t useconds_t; typedef __suseconds_t suseconds_t; # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4 # 148 "/usr/include/sys/types.h" 2 3 4 typedef unsigned long int ulong; typedef unsigned short int ushort; typedef unsigned int uint; # 195 "/usr/include/sys/types.h" 3 4 typedef int int8_t __attribute__ ((__mode__ (__QI__))); typedef int int16_t __attribute__ ((__mode__ (__HI__))); typedef int int32_t __attribute__ ((__mode__ (__SI__))); typedef int int64_t __attribute__ ((__mode__ (__DI__))); typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); typedef int register_t __attribute__ ((__mode__ (__word__))); # 220 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/sys/select.h" 1 3 4 # 31 "/usr/include/sys/select.h" 3 4 # 1 "/usr/include/bits/select.h" 1 3 4 # 32 "/usr/include/sys/select.h" 2 3 4 # 1 "/usr/include/bits/sigset.h" 1 3 4 # 24 "/usr/include/bits/sigset.h" 3 4 typedef int __sig_atomic_t; typedef struct { unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; } __sigset_t; # 35 "/usr/include/sys/select.h" 2 3 4 typedef __sigset_t sigset_t; # 1 "/usr/include/time.h" 1 3 4 # 121 "/usr/include/time.h" 3 4 struct timespec { __time_t tv_sec; long int tv_nsec; }; # 45 "/usr/include/sys/select.h" 2 3 4 # 1 "/usr/include/bits/time.h" 1 3 4 # 69 "/usr/include/bits/time.h" 3 4 struct timeval { __time_t tv_sec; __suseconds_t tv_usec; }; # 47 "/usr/include/sys/select.h" 2 3 4 # 55 "/usr/include/sys/select.h" 3 4 typedef long int __fd_mask; # 67 "/usr/include/sys/select.h" 3 4 typedef struct { __fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))]; } fd_set; typedef __fd_mask fd_mask; # 99 "/usr/include/sys/select.h" 3 4 extern "C" { # 109 "/usr/include/sys/select.h" 3 4 extern int select (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, struct timeval *__restrict __timeout); # 121 "/usr/include/sys/select.h" 3 4 extern int pselect (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, const struct timespec *__restrict __timeout, const __sigset_t *__restrict __sigmask); } # 221 "/usr/include/sys/types.h" 2 3 4 # 1 "/usr/include/sys/sysmacros.h" 1 3 4 # 30 "/usr/include/sys/sysmacros.h" 3 4 __extension__ extern __inline unsigned int gnu_dev_major (unsigned long long int __dev) throw (); __extension__ extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev) throw (); __extension__ extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw (); __extension__ extern __inline unsigned int gnu_dev_major (unsigned long long int __dev) throw () { return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); } __extension__ extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev) throw () { return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); } __extension__ extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw () { return ((__minor & 0xff) | ((__major & 0xfff) << 8) | (((unsigned long long int) (__minor & ~0xff)) << 12) | (((unsigned long long int) (__major & ~0xfff)) << 32)); } # 224 "/usr/include/sys/types.h" 2 3 4 typedef __blksize_t blksize_t; # 248 "/usr/include/sys/types.h" 3 4 typedef __blkcnt64_t blkcnt_t; typedef __fsblkcnt64_t fsblkcnt_t; typedef __fsfilcnt64_t fsfilcnt_t; typedef __blkcnt64_t blkcnt64_t; typedef __fsblkcnt64_t fsblkcnt64_t; typedef __fsfilcnt64_t fsfilcnt64_t; # 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 # 24 "/usr/include/bits/pthreadtypes.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 25 "/usr/include/bits/pthreadtypes.h" 2 3 4 # 51 "/usr/include/bits/pthreadtypes.h" 3 4 typedef unsigned long int pthread_t; typedef union { char __size[36]; long int __align; } pthread_attr_t; # 68 "/usr/include/bits/pthreadtypes.h" 3 4 typedef struct __pthread_internal_slist { struct __pthread_internal_slist *__next; } __pthread_slist_t; typedef union { struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; int __kind; unsigned int __nusers; __extension__ union { int __spins; __pthread_slist_t __list; }; } __data; char __size[24]; long int __align; } pthread_mutex_t; typedef union { char __size[4]; int __align; } pthread_mutexattr_t; typedef union { struct { int __lock; unsigned int __futex; __extension__ unsigned long long int __total_seq; __extension__ unsigned long long int __wakeup_seq; __extension__ unsigned long long int __woken_seq; void *__mutex; unsigned int __nwaiters; unsigned int __broadcast_seq; } __data; char __size[48]; __extension__ long long int __align; } pthread_cond_t; typedef union { char __size[4]; int __align; } pthread_condattr_t; typedef unsigned int pthread_key_t; typedef int pthread_once_t; typedef union { # 171 "/usr/include/bits/pthreadtypes.h" 3 4 struct { int __lock; unsigned int __nr_readers; unsigned int __readers_wakeup; unsigned int __writer_wakeup; unsigned int __nr_readers_queued; unsigned int __nr_writers_queued; unsigned int __flags; int __writer; } __data; char __size[32]; long int __align; } pthread_rwlock_t; typedef union { char __size[8]; long int __align; } pthread_rwlockattr_t; typedef volatile int pthread_spinlock_t; typedef union { char __size[20]; long int __align; } pthread_barrier_t; typedef union { char __size[4]; int __align; } pthread_barrierattr_t; # 271 "/usr/include/sys/types.h" 2 3 4 } # 439 "/usr/include/stdlib.h" 2 3 4 extern long int random (void) throw (); extern void srandom (unsigned int __seed) throw (); extern char *initstate (unsigned int __seed, char *__statebuf, size_t __statelen) throw () __attribute__ ((__nonnull__ (2))); extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1))); struct random_data { int32_t *fptr; int32_t *rptr; int32_t *state; int rand_type; int rand_deg; int rand_sep; int32_t *end_ptr; }; extern int random_r (struct random_data *__restrict __buf, int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int srandom_r (unsigned int __seed, struct random_data *__buf) throw () __attribute__ ((__nonnull__ (2))); extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, size_t __statelen, struct random_data *__restrict __buf) throw () __attribute__ ((__nonnull__ (2, 4))); extern int setstate_r (char *__restrict __statebuf, struct random_data *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2))); extern int rand (void) throw (); extern void srand (unsigned int __seed) throw (); extern int rand_r (unsigned int *__seed) throw (); extern double drand48 (void) throw (); extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); extern long int lrand48 (void) throw (); extern long int nrand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); extern long int mrand48 (void) throw (); extern long int jrand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); extern void srand48 (long int __seedval) throw (); extern unsigned short int *seed48 (unsigned short int __seed16v[3]) throw () __attribute__ ((__nonnull__ (1))); extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1))); struct drand48_data { unsigned short int __x[3]; unsigned short int __old_x[3]; unsigned short int __c; unsigned short int __init; unsigned long long int __a; }; extern int drand48_r (struct drand48_data *__restrict __buffer, double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int erand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int lrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int nrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int mrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int jrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int srand48_r (long int __seedval, struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (2))); extern int seed48_r (unsigned short int __seed16v[3], struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); extern int lcong48_r (unsigned short int __param[7], struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) ; extern void *calloc (size_t __nmemb, size_t __size) throw () __attribute__ ((__malloc__)) ; extern void *realloc (void *__ptr, size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); extern void free (void *__ptr) throw (); extern void cfree (void *__ptr) throw (); # 1 "/usr/include/alloca.h" 1 3 4 # 25 "/usr/include/alloca.h" 3 4 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4 # 26 "/usr/include/alloca.h" 2 3 4 extern "C" { extern void *alloca (size_t __size) throw (); } # 613 "/usr/include/stdlib.h" 2 3 4 extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) ; extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) throw () __attribute__ ((__nonnull__ (1))) ; extern void abort (void) throw () __attribute__ ((__noreturn__)); extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1))); extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) throw () __attribute__ ((__nonnull__ (1))); extern void exit (int __status) throw () __attribute__ ((__noreturn__)); extern void _Exit (int __status) throw () __attribute__ ((__noreturn__)); extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) ; extern char *__secure_getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) ; extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1))); extern int setenv (__const char *__name, __const char *__value, int __replace) throw () __attribute__ ((__nonnull__ (2))); extern int unsetenv (__const char *__name) throw (); extern int clearenv (void) throw (); # 698 "/usr/include/stdlib.h" 3 4 extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ; # 712 "/usr/include/stdlib.h" 3 4 extern int mkstemp (char *__template) __asm__ ("" "mkstemp64") __attribute__ ((__nonnull__ (1))) ; extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ; # 729 "/usr/include/stdlib.h" 3 4 extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ; extern int system (__const char *__command) ; extern char *canonicalize_file_name (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) ; # 755 "/usr/include/stdlib.h" 3 4 extern char *realpath (__const char *__restrict __name, char *__restrict __resolved) throw () ; typedef int (*__compar_fn_t) (__const void *, __const void *); typedef __compar_fn_t comparison_fn_t; extern void *bsearch (__const void *__key, __const void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 2, 5))) ; extern void qsort (void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); extern int abs (int __x) throw () __attribute__ ((__const__)) ; extern long int labs (long int __x) throw () __attribute__ ((__const__)) ; __extension__ extern long long int llabs (long long int __x) throw () __attribute__ ((__const__)) ; extern div_t div (int __numer, int __denom) throw () __attribute__ ((__const__)) ; extern ldiv_t ldiv (long int __numer, long int __denom) throw () __attribute__ ((__const__)) ; __extension__ extern lldiv_t lldiv (long long int __numer, long long int __denom) throw () __attribute__ ((__const__)) ; # 820 "/usr/include/stdlib.h" 3 4 extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; extern char *gcvt (double __value, int __ndigit, char *__buf) throw () __attribute__ ((__nonnull__ (3))) ; extern char *qecvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; extern char *qfcvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; extern char *qgcvt (long double __value, int __ndigit, char *__buf) throw () __attribute__ ((__nonnull__ (3))) ; extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); extern int qecvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); extern int qfcvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); extern int mblen (__const char *__s, size_t __n) throw () ; extern int mbtowc (wchar_t *__restrict __pwc, __const char *__restrict __s, size_t __n) throw () ; extern int wctomb (char *__s, wchar_t __wchar) throw () ; extern size_t mbstowcs (wchar_t *__restrict __pwcs, __const char *__restrict __s, size_t __n) throw (); extern size_t wcstombs (char *__restrict __s, __const wchar_t *__restrict __pwcs, size_t __n) throw (); extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))) ; # 908 "/usr/include/stdlib.h" 3 4 extern int getsubopt (char **__restrict __optionp, char *__const *__restrict __tokens, char **__restrict __valuep) throw () __attribute__ ((__nonnull__ (1, 2, 3))) ; extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1))); extern int posix_openpt (int __oflag) ; extern int grantpt (int __fd) throw (); extern int unlockpt (int __fd) throw (); extern char *ptsname (int __fd) throw () ; extern int ptsname_r (int __fd, char *__buf, size_t __buflen) throw () __attribute__ ((__nonnull__ (2))); extern int getpt (void); extern int getloadavg (double __loadavg[], int __nelem) throw () __attribute__ ((__nonnull__ (1))); # 976 "/usr/include/stdlib.h" 3 4 } # 73 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdlib" 2 3 # 104 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdlib" 3 namespace std __attribute__ ((__visibility__ ("default"))) { using ::div_t; using ::ldiv_t; using ::abort; using ::abs; using ::atexit; using ::atof; using ::atoi; using ::atol; using ::bsearch; using ::calloc; using ::div; using ::exit; using ::free; using ::getenv; using ::labs; using ::ldiv; using ::malloc; using ::mblen; using ::mbstowcs; using ::mbtowc; using ::qsort; using ::rand; using ::realloc; using ::srand; using ::strtod; using ::strtol; using ::strtoul; using ::system; using ::wcstombs; using ::wctomb; inline long abs(long __i) { return labs(__i); } inline ldiv_t div(long __i, long __j) { return ldiv(__i, __j); } } # 161 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdlib" 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { using ::lldiv_t; using ::_Exit; inline long long abs(long long __x) { return __x >= 0 ? __x : -__x; } using ::llabs; inline lldiv_t div(long long __n, long long __d) { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } using ::lldiv; # 194 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdlib" 3 using ::atoll; using ::strtoll; using ::strtoull; using ::strtof; using ::strtold; } namespace std __attribute__ ((__visibility__ ("default"))) { using ::__gnu_cxx::lldiv_t; using ::__gnu_cxx::_Exit; using ::__gnu_cxx::abs; using ::__gnu_cxx::llabs; using ::__gnu_cxx::div; using ::__gnu_cxx::lldiv; using ::__gnu_cxx::atoll; using ::__gnu_cxx::strtof; using ::__gnu_cxx::strtoll; using ::__gnu_cxx::strtoull; using ::__gnu_cxx::strtold; } # 69 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iosfwd" 1 3 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iosfwd" 3 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iosfwd" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 1 3 # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 3 # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdio" 1 3 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdio" 3 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdio" 3 # 1 "/usr/include/stdio.h" 1 3 4 # 30 "/usr/include/stdio.h" 3 4 extern "C" { # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4 # 35 "/usr/include/stdio.h" 2 3 4 # 45 "/usr/include/stdio.h" 3 4 struct _IO_FILE; typedef struct _IO_FILE FILE; # 65 "/usr/include/stdio.h" 3 4 typedef struct _IO_FILE __FILE; # 75 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/libio.h" 1 3 4 # 32 "/usr/include/libio.h" 3 4 # 1 "/usr/include/_G_config.h" 1 3 4 # 14 "/usr/include/_G_config.h" 3 4 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4 # 355 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 3 4 typedef unsigned int wint_t; # 15 "/usr/include/_G_config.h" 2 3 4 # 24 "/usr/include/_G_config.h" 3 4 # 1 "/usr/include/wchar.h" 1 3 4 # 48 "/usr/include/wchar.h" 3 4 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4 # 49 "/usr/include/wchar.h" 2 3 4 # 1 "/usr/include/bits/wchar.h" 1 3 4 # 51 "/usr/include/wchar.h" 2 3 4 # 76 "/usr/include/wchar.h" 3 4 typedef struct { int __count; union { wint_t __wch; char __wchb[4]; } __value; } __mbstate_t; # 25 "/usr/include/_G_config.h" 2 3 4 typedef struct { __off_t __pos; __mbstate_t __state; } _G_fpos_t; typedef struct { __off64_t __pos; __mbstate_t __state; } _G_fpos64_t; # 44 "/usr/include/_G_config.h" 3 4 # 1 "/usr/include/gconv.h" 1 3 4 # 28 "/usr/include/gconv.h" 3 4 # 1 "/usr/include/wchar.h" 1 3 4 # 48 "/usr/include/wchar.h" 3 4 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4 # 49 "/usr/include/wchar.h" 2 3 4 # 29 "/usr/include/gconv.h" 2 3 4 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4 # 32 "/usr/include/gconv.h" 2 3 4 enum { __GCONV_OK = 0, __GCONV_NOCONV, __GCONV_NODB, __GCONV_NOMEM, __GCONV_EMPTY_INPUT, __GCONV_FULL_OUTPUT, __GCONV_ILLEGAL_INPUT, __GCONV_INCOMPLETE_INPUT, __GCONV_ILLEGAL_DESCRIPTOR, __GCONV_INTERNAL_ERROR }; enum { __GCONV_IS_LAST = 0x0001, __GCONV_IGNORE_ERRORS = 0x0002 }; struct __gconv_step; struct __gconv_step_data; struct __gconv_loaded_object; struct __gconv_trans_data; typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *, __const unsigned char **, __const unsigned char *, unsigned char **, size_t *, int, int); typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char); typedef int (*__gconv_init_fct) (struct __gconv_step *); typedef void (*__gconv_end_fct) (struct __gconv_step *); typedef int (*__gconv_trans_fct) (struct __gconv_step *, struct __gconv_step_data *, void *, __const unsigned char *, __const unsigned char **, __const unsigned char *, unsigned char **, size_t *); typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *, __const unsigned char *, unsigned char *, unsigned char *); typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***, size_t *); typedef int (*__gconv_trans_init_fct) (void **, const char *); typedef void (*__gconv_trans_end_fct) (void *); struct __gconv_trans_data { __gconv_trans_fct __trans_fct; __gconv_trans_context_fct __trans_context_fct; __gconv_trans_end_fct __trans_end_fct; void *__data; struct __gconv_trans_data *__next; }; struct __gconv_step { struct __gconv_loaded_object *__shlib_handle; __const char *__modname; int __counter; char *__from_name; char *__to_name; __gconv_fct __fct; __gconv_btowc_fct __btowc_fct; __gconv_init_fct __init_fct; __gconv_end_fct __end_fct; int __min_needed_from; int __max_needed_from; int __min_needed_to; int __max_needed_to; int __stateful; void *__data; }; struct __gconv_step_data { unsigned char *__outbuf; unsigned char *__outbufend; int __flags; int __invocation_counter; int __internal_use; __mbstate_t *__statep; __mbstate_t __state; struct __gconv_trans_data *__trans; }; typedef struct __gconv_info { size_t __nsteps; struct __gconv_step *__steps; __extension__ struct __gconv_step_data __data []; } *__gconv_t; # 45 "/usr/include/_G_config.h" 2 3 4 typedef union { struct __gconv_info __cd; struct { struct __gconv_info __cd; struct __gconv_step_data __data; } __combined; } _G_iconv_t; typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); # 33 "/usr/include/libio.h" 2 3 4 # 53 "/usr/include/libio.h" 3 4 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stdarg.h" 1 3 4 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stdarg.h" 3 4 typedef __builtin_va_list __gnuc_va_list; # 54 "/usr/include/libio.h" 2 3 4 # 167 "/usr/include/libio.h" 3 4 struct _IO_jump_t; struct _IO_FILE; # 177 "/usr/include/libio.h" 3 4 typedef void _IO_lock_t; struct _IO_marker { struct _IO_marker *_next; struct _IO_FILE *_sbuf; int _pos; # 200 "/usr/include/libio.h" 3 4 }; enum __codecvt_result { __codecvt_ok, __codecvt_partial, __codecvt_error, __codecvt_noconv }; # 268 "/usr/include/libio.h" 3 4 struct _IO_FILE { int _flags; char* _IO_read_ptr; char* _IO_read_end; char* _IO_read_base; char* _IO_write_base; char* _IO_write_ptr; char* _IO_write_end; char* _IO_buf_base; char* _IO_buf_end; char *_IO_save_base; char *_IO_backup_base; char *_IO_save_end; struct _IO_marker *_markers; struct _IO_FILE *_chain; int _fileno; int _flags2; __off_t _old_offset; unsigned short _cur_column; signed char _vtable_offset; char _shortbuf[1]; _IO_lock_t *_lock; # 316 "/usr/include/libio.h" 3 4 __off64_t _offset; # 325 "/usr/include/libio.h" 3 4 void *__pad1; void *__pad2; void *__pad3; void *__pad4; size_t __pad5; int _mode; char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; }; struct _IO_FILE_plus; extern struct _IO_FILE_plus _IO_2_1_stdin_; extern struct _IO_FILE_plus _IO_2_1_stdout_; extern struct _IO_FILE_plus _IO_2_1_stderr_; # 361 "/usr/include/libio.h" 3 4 typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, size_t __n); typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); typedef int __io_close_fn (void *__cookie); typedef __io_read_fn cookie_read_function_t; typedef __io_write_fn cookie_write_function_t; typedef __io_seek_fn cookie_seek_function_t; typedef __io_close_fn cookie_close_function_t; typedef struct { __io_read_fn *read; __io_write_fn *write; __io_seek_fn *seek; __io_close_fn *close; } _IO_cookie_io_functions_t; typedef _IO_cookie_io_functions_t cookie_io_functions_t; struct _IO_cookie_file; extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, void *__cookie, _IO_cookie_io_functions_t __fns); extern "C" { extern int __underflow (_IO_FILE *); extern int __uflow (_IO_FILE *); extern int __overflow (_IO_FILE *, int); extern wint_t __wunderflow (_IO_FILE *); extern wint_t __wuflow (_IO_FILE *); extern wint_t __woverflow (_IO_FILE *, wint_t); # 451 "/usr/include/libio.h" 3 4 extern int _IO_getc (_IO_FILE *__fp); extern int _IO_putc (int __c, _IO_FILE *__fp); extern int _IO_feof (_IO_FILE *__fp) throw (); extern int _IO_ferror (_IO_FILE *__fp) throw (); extern int _IO_peekc_locked (_IO_FILE *__fp); extern void _IO_flockfile (_IO_FILE *) throw (); extern void _IO_funlockfile (_IO_FILE *) throw (); extern int _IO_ftrylockfile (_IO_FILE *) throw (); # 481 "/usr/include/libio.h" 3 4 extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, __gnuc_va_list, int *__restrict); extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, __gnuc_va_list); extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); extern void _IO_free_backup_area (_IO_FILE *) throw (); # 543 "/usr/include/libio.h" 3 4 } # 76 "/usr/include/stdio.h" 2 3 4 typedef __gnuc_va_list va_list; # 89 "/usr/include/stdio.h" 3 4 typedef _G_fpos64_t fpos_t; typedef _G_fpos64_t fpos64_t; # 141 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/bits/stdio_lim.h" 1 3 4 # 142 "/usr/include/stdio.h" 2 3 4 extern struct _IO_FILE *stdin; extern struct _IO_FILE *stdout; extern struct _IO_FILE *stderr; extern int remove (__const char *__filename) throw (); extern int rename (__const char *__old, __const char *__new) throw (); extern int renameat (int __oldfd, __const char *__old, int __newfd, __const char *__new) throw (); # 175 "/usr/include/stdio.h" 3 4 extern FILE *tmpfile (void) __asm__ ("" "tmpfile64") ; extern FILE *tmpfile64 (void) ; extern char *tmpnam (char *__s) throw () ; extern char *tmpnam_r (char *__s) throw () ; # 204 "/usr/include/stdio.h" 3 4 extern char *tempnam (__const char *__dir, __const char *__pfx) throw () __attribute__ ((__malloc__)) ; extern int fclose (FILE *__stream); extern int fflush (FILE *__stream); # 229 "/usr/include/stdio.h" 3 4 extern int fflush_unlocked (FILE *__stream); # 239 "/usr/include/stdio.h" 3 4 extern int fcloseall (void); # 260 "/usr/include/stdio.h" 3 4 extern FILE *fopen (__const char *__restrict __filename, __const char *__restrict __modes) __asm__ ("" "fopen64") ; extern FILE *freopen (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream) __asm__ ("" "freopen64") ; extern FILE *fopen64 (__const char *__restrict __filename, __const char *__restrict __modes) ; extern FILE *freopen64 (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream) ; extern FILE *fdopen (int __fd, __const char *__modes) throw () ; extern FILE *fopencookie (void *__restrict __magic_cookie, __const char *__restrict __modes, _IO_cookie_io_functions_t __io_funcs) throw () ; extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) throw () ; extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () ; extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw (); extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) throw (); extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, size_t __size) throw (); extern void setlinebuf (FILE *__stream) throw (); extern int fprintf (FILE *__restrict __stream, __const char *__restrict __format, ...); extern int printf (__const char *__restrict __format, ...); extern int sprintf (char *__restrict __s, __const char *__restrict __format, ...) throw (); extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg); extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); extern int vsprintf (char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) throw (); extern int snprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, ...) throw () __attribute__ ((__format__ (__printf__, 3, 4))); extern int vsnprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__printf__, 3, 0))); extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__printf__, 2, 0))) ; extern int __asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () __attribute__ ((__format__ (__printf__, 2, 3))) ; extern int asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () __attribute__ ((__format__ (__printf__, 2, 3))) ; extern int vdprintf (int __fd, __const char *__restrict __fmt, __gnuc_va_list __arg) __attribute__ ((__format__ (__printf__, 2, 0))); extern int dprintf (int __fd, __const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); extern int fscanf (FILE *__restrict __stream, __const char *__restrict __format, ...) ; extern int scanf (__const char *__restrict __format, ...) ; extern int sscanf (__const char *__restrict __s, __const char *__restrict __format, ...) throw (); extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 2, 0))) ; extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 1, 0))) ; extern int vsscanf (__const char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__scanf__, 2, 0))); extern int fgetc (FILE *__stream); extern int getc (FILE *__stream); extern int getchar (void); # 464 "/usr/include/stdio.h" 3 4 extern int getc_unlocked (FILE *__stream); extern int getchar_unlocked (void); # 475 "/usr/include/stdio.h" 3 4 extern int fgetc_unlocked (FILE *__stream); extern int fputc (int __c, FILE *__stream); extern int putc (int __c, FILE *__stream); extern int putchar (int __c); # 508 "/usr/include/stdio.h" 3 4 extern int fputc_unlocked (int __c, FILE *__stream); extern int putc_unlocked (int __c, FILE *__stream); extern int putchar_unlocked (int __c); extern int getw (FILE *__stream); extern int putw (int __w, FILE *__stream); extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) ; extern char *gets (char *__s) ; # 554 "/usr/include/stdio.h" 3 4 extern char *fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) ; # 570 "/usr/include/stdio.h" 3 4 extern __ssize_t __getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) ; extern __ssize_t getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) ; extern __ssize_t getline (char **__restrict __lineptr, size_t *__restrict __n, FILE *__restrict __stream) ; extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); extern int puts (__const char *__s); extern int ungetc (int __c, FILE *__stream); extern size_t fread (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) ; extern size_t fwrite (__const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __s) ; # 631 "/usr/include/stdio.h" 3 4 extern int fputs_unlocked (__const char *__restrict __s, FILE *__restrict __stream); # 642 "/usr/include/stdio.h" 3 4 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) ; extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) ; extern int fseek (FILE *__stream, long int __off, int __whence); extern long int ftell (FILE *__stream) ; extern void rewind (FILE *__stream); # 686 "/usr/include/stdio.h" 3 4 extern int fseeko (FILE *__stream, __off64_t __off, int __whence) __asm__ ("" "fseeko64"); extern __off64_t ftello (FILE *__stream) __asm__ ("" "ftello64"); # 711 "/usr/include/stdio.h" 3 4 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos) __asm__ ("" "fgetpos64"); extern int fsetpos (FILE *__stream, __const fpos_t *__pos) __asm__ ("" "fsetpos64"); extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); extern __off64_t ftello64 (FILE *__stream) ; extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); extern void clearerr (FILE *__stream) throw (); extern int feof (FILE *__stream) throw () ; extern int ferror (FILE *__stream) throw () ; extern void clearerr_unlocked (FILE *__stream) throw (); extern int feof_unlocked (FILE *__stream) throw () ; extern int ferror_unlocked (FILE *__stream) throw () ; extern void perror (__const char *__s); # 1 "/usr/include/bits/sys_errlist.h" 1 3 4 # 27 "/usr/include/bits/sys_errlist.h" 3 4 extern int sys_nerr; extern __const char *__const sys_errlist[]; extern int _sys_nerr; extern __const char *__const _sys_errlist[]; # 759 "/usr/include/stdio.h" 2 3 4 extern int fileno (FILE *__stream) throw () ; extern int fileno_unlocked (FILE *__stream) throw () ; # 778 "/usr/include/stdio.h" 3 4 extern FILE *popen (__const char *__command, __const char *__modes) ; extern int pclose (FILE *__stream); extern char *ctermid (char *__s) throw (); extern char *cuserid (char *__s); struct obstack; extern int obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __format, ...) throw () __attribute__ ((__format__ (__printf__, 2, 3))); extern int obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __format, __gnuc_va_list __args) throw () __attribute__ ((__format__ (__printf__, 2, 0))); extern void flockfile (FILE *__stream) throw (); extern int ftrylockfile (FILE *__stream) throw () ; extern void funlockfile (FILE *__stream) throw (); # 839 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/bits/stdio.h" 1 3 4 # 33 "/usr/include/bits/stdio.h" 3 4 inline int vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg) { return vfprintf (stdout, __fmt, __arg); } inline int getchar (void) { return _IO_getc (stdin); } inline int fgetc_unlocked (FILE *__fp) { return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); } inline int getc_unlocked (FILE *__fp) { return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); } inline int getchar_unlocked (void) { return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); } inline int putchar (int __c) { return _IO_putc (__c, stdout); } inline int fputc_unlocked (int __c, FILE *__stream) { return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } inline int putc_unlocked (int __c, FILE *__stream) { return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } inline int putchar_unlocked (int __c) { return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); } inline __ssize_t getline (char **__lineptr, size_t *__n, FILE *__stream) { return __getdelim (__lineptr, __n, '\n', __stream); } inline int feof_unlocked (FILE *__stream) throw () { return (((__stream)->_flags & 0x10) != 0); } inline int ferror_unlocked (FILE *__stream) throw () { return (((__stream)->_flags & 0x20) != 0); } # 840 "/usr/include/stdio.h" 2 3 4 # 848 "/usr/include/stdio.h" 3 4 } # 54 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdio" 2 3 # 98 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdio" 3 namespace std __attribute__ ((__visibility__ ("default"))) { using ::FILE; using ::fpos_t; using ::clearerr; using ::fclose; using ::feof; using ::ferror; using ::fflush; using ::fgetc; using ::fgetpos; using ::fgets; using ::fopen; using ::fprintf; using ::fputc; using ::fputs; using ::fread; using ::freopen; using ::fscanf; using ::fseek; using ::fsetpos; using ::ftell; using ::fwrite; using ::getc; using ::getchar; using ::gets; using ::perror; using ::printf; using ::putc; using ::putchar; using ::puts; using ::remove; using ::rename; using ::rewind; using ::scanf; using ::setbuf; using ::setvbuf; using ::sprintf; using ::sscanf; using ::tmpfile; using ::tmpnam; using ::ungetc; using ::vfprintf; using ::vprintf; using ::vsprintf; } # 155 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdio" 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { # 170 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdio" 3 using ::snprintf; using ::vfscanf; using ::vscanf; using ::vsnprintf; using ::vsscanf; } namespace std __attribute__ ((__visibility__ ("default"))) { using ::__gnu_cxx::snprintf; using ::__gnu_cxx::vfscanf; using ::__gnu_cxx::vscanf; using ::__gnu_cxx::vsnprintf; using ::__gnu_cxx::vsscanf; } # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/clocale" 1 3 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/clocale" 3 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/clocale" 3 # 1 "/usr/include/locale.h" 1 3 4 # 29 "/usr/include/locale.h" 3 4 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4 # 30 "/usr/include/locale.h" 2 3 4 # 1 "/usr/include/bits/locale.h" 1 3 4 # 27 "/usr/include/bits/locale.h" 3 4 enum { __LC_CTYPE = 0, __LC_NUMERIC = 1, __LC_TIME = 2, __LC_COLLATE = 3, __LC_MONETARY = 4, __LC_MESSAGES = 5, __LC_ALL = 6, __LC_PAPER = 7, __LC_NAME = 8, __LC_ADDRESS = 9, __LC_TELEPHONE = 10, __LC_MEASUREMENT = 11, __LC_IDENTIFICATION = 12 }; # 31 "/usr/include/locale.h" 2 3 4 extern "C" { # 51 "/usr/include/locale.h" 3 4 struct lconv { char *decimal_point; char *thousands_sep; char *grouping; char *int_curr_symbol; char *currency_symbol; char *mon_decimal_point; char *mon_thousands_sep; char *mon_grouping; char *positive_sign; char *negative_sign; char int_frac_digits; char frac_digits; char p_cs_precedes; char p_sep_by_space; char n_cs_precedes; char n_sep_by_space; char p_sign_posn; char n_sign_posn; char int_p_cs_precedes; char int_p_sep_by_space; char int_n_cs_precedes; char int_n_sep_by_space; char int_p_sign_posn; char int_n_sign_posn; # 121 "/usr/include/locale.h" 3 4 }; extern char *setlocale (int __category, __const char *__locale) throw (); extern struct lconv *localeconv (void) throw (); # 148 "/usr/include/locale.h" 3 4 typedef __locale_t locale_t; extern __locale_t newlocale (int __category_mask, __const char *__locale, __locale_t __base) throw (); # 189 "/usr/include/locale.h" 3 4 extern __locale_t duplocale (__locale_t __dataset) throw (); extern void freelocale (__locale_t __dataset) throw (); extern __locale_t uselocale (__locale_t __dataset) throw (); } # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/clocale" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { using ::lconv; using ::setlocale; using ::localeconv; } # 50 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 2 3 # 1 "/usr/include/langinfo.h" 1 3 4 # 24 "/usr/include/langinfo.h" 3 4 # 1 "/usr/include/nl_types.h" 1 3 4 # 31 "/usr/include/nl_types.h" 3 4 extern "C" { typedef void *nl_catd; typedef int nl_item; extern nl_catd catopen (__const char *__cat_name, int __flag) __attribute__ ((__nonnull__ (1))); extern char *catgets (nl_catd __catalog, int __set, int __number, __const char *__string) throw () __attribute__ ((__nonnull__ (1))); extern int catclose (nl_catd __catalog) throw () __attribute__ ((__nonnull__ (1))); } # 25 "/usr/include/langinfo.h" 2 3 4 # 1 "/usr/include/bits/locale.h" 1 3 4 # 27 "/usr/include/langinfo.h" 2 3 4 extern "C" { # 42 "/usr/include/langinfo.h" 3 4 enum { ABDAY_1 = (((__LC_TIME) << 16) | (0)), ABDAY_2, ABDAY_3, ABDAY_4, ABDAY_5, ABDAY_6, ABDAY_7, DAY_1, DAY_2, DAY_3, DAY_4, DAY_5, DAY_6, DAY_7, ABMON_1, ABMON_2, ABMON_3, ABMON_4, ABMON_5, ABMON_6, ABMON_7, ABMON_8, ABMON_9, ABMON_10, ABMON_11, ABMON_12, MON_1, MON_2, MON_3, MON_4, MON_5, MON_6, MON_7, MON_8, MON_9, MON_10, MON_11, MON_12, AM_STR, PM_STR, D_T_FMT, D_FMT, T_FMT, T_FMT_AMPM, ERA, __ERA_YEAR, ERA_D_FMT, ALT_DIGITS, ERA_D_T_FMT, ERA_T_FMT, _NL_TIME_ERA_NUM_ENTRIES, _NL_TIME_ERA_ENTRIES, _NL_WABDAY_1, _NL_WABDAY_2, _NL_WABDAY_3, _NL_WABDAY_4, _NL_WABDAY_5, _NL_WABDAY_6, _NL_WABDAY_7, _NL_WDAY_1, _NL_WDAY_2, _NL_WDAY_3, _NL_WDAY_4, _NL_WDAY_5, _NL_WDAY_6, _NL_WDAY_7, _NL_WABMON_1, _NL_WABMON_2, _NL_WABMON_3, _NL_WABMON_4, _NL_WABMON_5, _NL_WABMON_6, _NL_WABMON_7, _NL_WABMON_8, _NL_WABMON_9, _NL_WABMON_10, _NL_WABMON_11, _NL_WABMON_12, _NL_WMON_1, _NL_WMON_2, _NL_WMON_3, _NL_WMON_4, _NL_WMON_5, _NL_WMON_6, _NL_WMON_7, _NL_WMON_8, _NL_WMON_9, _NL_WMON_10, _NL_WMON_11, _NL_WMON_12, _NL_WAM_STR, _NL_WPM_STR, _NL_WD_T_FMT, _NL_WD_FMT, _NL_WT_FMT, _NL_WT_FMT_AMPM, _NL_WERA_YEAR, _NL_WERA_D_FMT, _NL_WALT_DIGITS, _NL_WERA_D_T_FMT, _NL_WERA_T_FMT, _NL_TIME_WEEK_NDAYS, _NL_TIME_WEEK_1STDAY, _NL_TIME_WEEK_1STWEEK, _NL_TIME_FIRST_WEEKDAY, _NL_TIME_FIRST_WORKDAY, _NL_TIME_CAL_DIRECTION, _NL_TIME_TIMEZONE, _DATE_FMT, _NL_W_DATE_FMT, _NL_TIME_CODESET, _NL_NUM_LC_TIME, _NL_COLLATE_NRULES = (((__LC_COLLATE) << 16) | (0)), _NL_COLLATE_RULESETS, _NL_COLLATE_TABLEMB, _NL_COLLATE_WEIGHTMB, _NL_COLLATE_EXTRAMB, _NL_COLLATE_INDIRECTMB, _NL_COLLATE_GAP1, _NL_COLLATE_GAP2, _NL_COLLATE_GAP3, _NL_COLLATE_TABLEWC, _NL_COLLATE_WEIGHTWC, _NL_COLLATE_EXTRAWC, _NL_COLLATE_INDIRECTWC, _NL_COLLATE_SYMB_HASH_SIZEMB, _NL_COLLATE_SYMB_TABLEMB, _NL_COLLATE_SYMB_EXTRAMB, _NL_COLLATE_COLLSEQMB, _NL_COLLATE_COLLSEQWC, _NL_COLLATE_CODESET, _NL_NUM_LC_COLLATE, _NL_CTYPE_CLASS = (((__LC_CTYPE) << 16) | (0)), _NL_CTYPE_TOUPPER, _NL_CTYPE_GAP1, _NL_CTYPE_TOLOWER, _NL_CTYPE_GAP2, _NL_CTYPE_CLASS32, _NL_CTYPE_GAP3, _NL_CTYPE_GAP4, _NL_CTYPE_GAP5, _NL_CTYPE_GAP6, _NL_CTYPE_CLASS_NAMES, _NL_CTYPE_MAP_NAMES, _NL_CTYPE_WIDTH, _NL_CTYPE_MB_CUR_MAX, _NL_CTYPE_CODESET_NAME, CODESET = _NL_CTYPE_CODESET_NAME, _NL_CTYPE_TOUPPER32, _NL_CTYPE_TOLOWER32, _NL_CTYPE_CLASS_OFFSET, _NL_CTYPE_MAP_OFFSET, _NL_CTYPE_INDIGITS_MB_LEN, _NL_CTYPE_INDIGITS0_MB, _NL_CTYPE_INDIGITS1_MB, _NL_CTYPE_INDIGITS2_MB, _NL_CTYPE_INDIGITS3_MB, _NL_CTYPE_INDIGITS4_MB, _NL_CTYPE_INDIGITS5_MB, _NL_CTYPE_INDIGITS6_MB, _NL_CTYPE_INDIGITS7_MB, _NL_CTYPE_INDIGITS8_MB, _NL_CTYPE_INDIGITS9_MB, _NL_CTYPE_INDIGITS_WC_LEN, _NL_CTYPE_INDIGITS0_WC, _NL_CTYPE_INDIGITS1_WC, _NL_CTYPE_INDIGITS2_WC, _NL_CTYPE_INDIGITS3_WC, _NL_CTYPE_INDIGITS4_WC, _NL_CTYPE_INDIGITS5_WC, _NL_CTYPE_INDIGITS6_WC, _NL_CTYPE_INDIGITS7_WC, _NL_CTYPE_INDIGITS8_WC, _NL_CTYPE_INDIGITS9_WC, _NL_CTYPE_OUTDIGIT0_MB, _NL_CTYPE_OUTDIGIT1_MB, _NL_CTYPE_OUTDIGIT2_MB, _NL_CTYPE_OUTDIGIT3_MB, _NL_CTYPE_OUTDIGIT4_MB, _NL_CTYPE_OUTDIGIT5_MB, _NL_CTYPE_OUTDIGIT6_MB, _NL_CTYPE_OUTDIGIT7_MB, _NL_CTYPE_OUTDIGIT8_MB, _NL_CTYPE_OUTDIGIT9_MB, _NL_CTYPE_OUTDIGIT0_WC, _NL_CTYPE_OUTDIGIT1_WC, _NL_CTYPE_OUTDIGIT2_WC, _NL_CTYPE_OUTDIGIT3_WC, _NL_CTYPE_OUTDIGIT4_WC, _NL_CTYPE_OUTDIGIT5_WC, _NL_CTYPE_OUTDIGIT6_WC, _NL_CTYPE_OUTDIGIT7_WC, _NL_CTYPE_OUTDIGIT8_WC, _NL_CTYPE_OUTDIGIT9_WC, _NL_CTYPE_TRANSLIT_TAB_SIZE, _NL_CTYPE_TRANSLIT_FROM_IDX, _NL_CTYPE_TRANSLIT_FROM_TBL, _NL_CTYPE_TRANSLIT_TO_IDX, _NL_CTYPE_TRANSLIT_TO_TBL, _NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN, _NL_CTYPE_TRANSLIT_DEFAULT_MISSING, _NL_CTYPE_TRANSLIT_IGNORE_LEN, _NL_CTYPE_TRANSLIT_IGNORE, _NL_CTYPE_MAP_TO_NONASCII, _NL_CTYPE_EXTRA_MAP_1, _NL_CTYPE_EXTRA_MAP_2, _NL_CTYPE_EXTRA_MAP_3, _NL_CTYPE_EXTRA_MAP_4, _NL_CTYPE_EXTRA_MAP_5, _NL_CTYPE_EXTRA_MAP_6, _NL_CTYPE_EXTRA_MAP_7, _NL_CTYPE_EXTRA_MAP_8, _NL_CTYPE_EXTRA_MAP_9, _NL_CTYPE_EXTRA_MAP_10, _NL_CTYPE_EXTRA_MAP_11, _NL_CTYPE_EXTRA_MAP_12, _NL_CTYPE_EXTRA_MAP_13, _NL_CTYPE_EXTRA_MAP_14, _NL_NUM_LC_CTYPE, __INT_CURR_SYMBOL = (((__LC_MONETARY) << 16) | (0)), __CURRENCY_SYMBOL, __MON_DECIMAL_POINT, __MON_THOUSANDS_SEP, __MON_GROUPING, __POSITIVE_SIGN, __NEGATIVE_SIGN, __INT_FRAC_DIGITS, __FRAC_DIGITS, __P_CS_PRECEDES, __P_SEP_BY_SPACE, __N_CS_PRECEDES, __N_SEP_BY_SPACE, __P_SIGN_POSN, __N_SIGN_POSN, _NL_MONETARY_CRNCYSTR, __INT_P_CS_PRECEDES, __INT_P_SEP_BY_SPACE, __INT_N_CS_PRECEDES, __INT_N_SEP_BY_SPACE, __INT_P_SIGN_POSN, __INT_N_SIGN_POSN, _NL_MONETARY_DUO_INT_CURR_SYMBOL, _NL_MONETARY_DUO_CURRENCY_SYMBOL, _NL_MONETARY_DUO_INT_FRAC_DIGITS, _NL_MONETARY_DUO_FRAC_DIGITS, _NL_MONETARY_DUO_P_CS_PRECEDES, _NL_MONETARY_DUO_P_SEP_BY_SPACE, _NL_MONETARY_DUO_N_CS_PRECEDES, _NL_MONETARY_DUO_N_SEP_BY_SPACE, _NL_MONETARY_DUO_INT_P_CS_PRECEDES, _NL_MONETARY_DUO_INT_P_SEP_BY_SPACE, _NL_MONETARY_DUO_INT_N_CS_PRECEDES, _NL_MONETARY_DUO_INT_N_SEP_BY_SPACE, _NL_MONETARY_DUO_P_SIGN_POSN, _NL_MONETARY_DUO_N_SIGN_POSN, _NL_MONETARY_DUO_INT_P_SIGN_POSN, _NL_MONETARY_DUO_INT_N_SIGN_POSN, _NL_MONETARY_UNO_VALID_FROM, _NL_MONETARY_UNO_VALID_TO, _NL_MONETARY_DUO_VALID_FROM, _NL_MONETARY_DUO_VALID_TO, _NL_MONETARY_CONVERSION_RATE, _NL_MONETARY_DECIMAL_POINT_WC, _NL_MONETARY_THOUSANDS_SEP_WC, _NL_MONETARY_CODESET, _NL_NUM_LC_MONETARY, __DECIMAL_POINT = (((__LC_NUMERIC) << 16) | (0)), RADIXCHAR = __DECIMAL_POINT, __THOUSANDS_SEP, THOUSEP = __THOUSANDS_SEP, __GROUPING, _NL_NUMERIC_DECIMAL_POINT_WC, _NL_NUMERIC_THOUSANDS_SEP_WC, _NL_NUMERIC_CODESET, _NL_NUM_LC_NUMERIC, __YESEXPR = (((__LC_MESSAGES) << 16) | (0)), __NOEXPR, __YESSTR, __NOSTR, _NL_MESSAGES_CODESET, _NL_NUM_LC_MESSAGES, _NL_PAPER_HEIGHT = (((__LC_PAPER) << 16) | (0)), _NL_PAPER_WIDTH, _NL_PAPER_CODESET, _NL_NUM_LC_PAPER, _NL_NAME_NAME_FMT = (((__LC_NAME) << 16) | (0)), _NL_NAME_NAME_GEN, _NL_NAME_NAME_MR, _NL_NAME_NAME_MRS, _NL_NAME_NAME_MISS, _NL_NAME_NAME_MS, _NL_NAME_CODESET, _NL_NUM_LC_NAME, _NL_ADDRESS_POSTAL_FMT = (((__LC_ADDRESS) << 16) | (0)), _NL_ADDRESS_COUNTRY_NAME, _NL_ADDRESS_COUNTRY_POST, _NL_ADDRESS_COUNTRY_AB2, _NL_ADDRESS_COUNTRY_AB3, _NL_ADDRESS_COUNTRY_CAR, _NL_ADDRESS_COUNTRY_NUM, _NL_ADDRESS_COUNTRY_ISBN, _NL_ADDRESS_LANG_NAME, _NL_ADDRESS_LANG_AB, _NL_ADDRESS_LANG_TERM, _NL_ADDRESS_LANG_LIB, _NL_ADDRESS_CODESET, _NL_NUM_LC_ADDRESS, _NL_TELEPHONE_TEL_INT_FMT = (((__LC_TELEPHONE) << 16) | (0)), _NL_TELEPHONE_TEL_DOM_FMT, _NL_TELEPHONE_INT_SELECT, _NL_TELEPHONE_INT_PREFIX, _NL_TELEPHONE_CODESET, _NL_NUM_LC_TELEPHONE, _NL_MEASUREMENT_MEASUREMENT = (((__LC_MEASUREMENT) << 16) | (0)), _NL_MEASUREMENT_CODESET, _NL_NUM_LC_MEASUREMENT, _NL_IDENTIFICATION_TITLE = (((__LC_IDENTIFICATION) << 16) | (0)), _NL_IDENTIFICATION_SOURCE, _NL_IDENTIFICATION_ADDRESS, _NL_IDENTIFICATION_CONTACT, _NL_IDENTIFICATION_EMAIL, _NL_IDENTIFICATION_TEL, _NL_IDENTIFICATION_FAX, _NL_IDENTIFICATION_LANGUAGE, _NL_IDENTIFICATION_TERRITORY, _NL_IDENTIFICATION_AUDIENCE, _NL_IDENTIFICATION_APPLICATION, _NL_IDENTIFICATION_ABBREVIATION, _NL_IDENTIFICATION_REVISION, _NL_IDENTIFICATION_DATE, _NL_IDENTIFICATION_CATEGORY, _NL_IDENTIFICATION_CODESET, _NL_NUM_LC_IDENTIFICATION, _NL_NUM }; # 582 "/usr/include/langinfo.h" 3 4 extern char *nl_langinfo (nl_item __item) throw (); # 593 "/usr/include/langinfo.h" 3 4 extern char *nl_langinfo_l (nl_item __item, __locale_t l); } # 51 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 2 3 # 1 "/usr/include/iconv.h" 1 3 4 # 24 "/usr/include/iconv.h" 3 4 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4 # 25 "/usr/include/iconv.h" 2 3 4 extern "C" { typedef void *iconv_t; extern iconv_t iconv_open (__const char *__tocode, __const char *__fromcode); extern size_t iconv (iconv_t __cd, char **__restrict __inbuf, size_t *__restrict __inbytesleft, char **__restrict __outbuf, size_t *__restrict __outbytesleft); extern int iconv_close (iconv_t __cd); } # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 2 3 # 1 "/usr/include/libintl.h" 1 3 4 # 35 "/usr/include/libintl.h" 3 4 extern "C" { extern char *gettext (__const char *__msgid) throw () __attribute__ ((__format_arg__ (1))); extern char *dgettext (__const char *__domainname, __const char *__msgid) throw () __attribute__ ((__format_arg__ (2))); extern char *__dgettext (__const char *__domainname, __const char *__msgid) throw () __attribute__ ((__format_arg__ (2))); extern char *dcgettext (__const char *__domainname, __const char *__msgid, int __category) throw () __attribute__ ((__format_arg__ (2))); extern char *__dcgettext (__const char *__domainname, __const char *__msgid, int __category) throw () __attribute__ ((__format_arg__ (2))); extern char *ngettext (__const char *__msgid1, __const char *__msgid2, unsigned long int __n) throw () __attribute__ ((__format_arg__ (1))) __attribute__ ((__format_arg__ (2))); extern char *dngettext (__const char *__domainname, __const char *__msgid1, __const char *__msgid2, unsigned long int __n) throw () __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); extern char *dcngettext (__const char *__domainname, __const char *__msgid1, __const char *__msgid2, unsigned long int __n, int __category) throw () __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); extern char *textdomain (__const char *__domainname) throw (); extern char *bindtextdomain (__const char *__domainname, __const char *__dirname) throw (); extern char *bind_textdomain_codeset (__const char *__domainname, __const char *__codeset) throw (); # 122 "/usr/include/libintl.h" 3 4 } # 53 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdarg" 1 3 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdarg" 3 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdarg" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stdarg.h" 1 3 4 # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cstdarg" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { using ::va_list; } # 54 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++locale.h" 2 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { extern "C" __typeof(uselocale) __uselocale; } namespace std __attribute__ ((__visibility__ ("default"))) { typedef __locale_t __c_locale; inline int __convert_from_v(const __c_locale& __cloc __attribute__ ((__unused__)), char* __out, const int __size __attribute__ ((__unused__)), const char* __fmt, ...) { __c_locale __old = __gnu_cxx::__uselocale(__cloc); va_list __args; __builtin_va_start(__args,__fmt); const int __ret = std::vsnprintf(__out, __size, __fmt, __args); __builtin_va_end(__args); __gnu_cxx::__uselocale(__old); return __ret; } } # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iosfwd" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++io.h" 1 3 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++io.h" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr.h" 1 3 # 33 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr.h" 3 #pragma GCC visibility push(default) # 114 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr.h" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr-default.h" 1 3 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr-default.h" 3 # 1 "/usr/include/pthread.h" 1 3 4 # 24 "/usr/include/pthread.h" 3 4 # 1 "/usr/include/sched.h" 1 3 4 # 29 "/usr/include/sched.h" 3 4 # 1 "/usr/include/time.h" 1 3 4 # 30 "/usr/include/sched.h" 2 3 4 # 1 "/usr/include/bits/sched.h" 1 3 4 # 66 "/usr/include/bits/sched.h" 3 4 struct sched_param { int __sched_priority; }; extern "C" { extern int clone (int (*__fn) (void *__arg), void *__child_stack, int __flags, void *__arg, ...) throw (); extern int unshare (int __flags) throw (); extern int sched_getcpu (void) throw (); } struct __sched_param { int __sched_priority; }; # 108 "/usr/include/bits/sched.h" 3 4 typedef unsigned long int __cpu_mask; typedef struct { __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; } cpu_set_t; # 134 "/usr/include/bits/sched.h" 3 4 extern int __sched_cpucount (size_t __setsize, cpu_set_t *__setp) throw (); # 33 "/usr/include/sched.h" 2 3 4 extern "C" { extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param) throw (); extern int sched_getparam (__pid_t __pid, struct sched_param *__param) throw (); extern int sched_setscheduler (__pid_t __pid, int __policy, __const struct sched_param *__param) throw (); extern int sched_getscheduler (__pid_t __pid) throw (); extern int sched_yield (void) throw (); extern int sched_get_priority_max (int __algorithm) throw (); extern int sched_get_priority_min (int __algorithm) throw (); extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) throw (); # 77 "/usr/include/sched.h" 3 4 extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, __const cpu_set_t *__cpuset) throw (); extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, cpu_set_t *__cpuset) throw (); } # 25 "/usr/include/pthread.h" 2 3 4 # 1 "/usr/include/time.h" 1 3 4 # 31 "/usr/include/time.h" 3 4 extern "C" { # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4 # 40 "/usr/include/time.h" 2 3 4 # 1 "/usr/include/bits/time.h" 1 3 4 # 44 "/usr/include/time.h" 2 3 4 # 132 "/usr/include/time.h" 3 4 struct tm { int tm_sec; int tm_min; int tm_hour; int tm_mday; int tm_mon; int tm_year; int tm_wday; int tm_yday; int tm_isdst; long int tm_gmtoff; __const char *tm_zone; }; struct itimerspec { struct timespec it_interval; struct timespec it_value; }; struct sigevent; # 181 "/usr/include/time.h" 3 4 extern clock_t clock (void) throw (); extern time_t time (time_t *__timer) throw (); extern double difftime (time_t __time1, time_t __time0) throw () __attribute__ ((__const__)); extern time_t mktime (struct tm *__tp) throw (); extern size_t strftime (char *__restrict __s, size_t __maxsize, __const char *__restrict __format, __const struct tm *__restrict __tp) throw (); extern char *strptime (__const char *__restrict __s, __const char *__restrict __fmt, struct tm *__tp) throw (); extern size_t strftime_l (char *__restrict __s, size_t __maxsize, __const char *__restrict __format, __const struct tm *__restrict __tp, __locale_t __loc) throw (); extern char *strptime_l (__const char *__restrict __s, __const char *__restrict __fmt, struct tm *__tp, __locale_t __loc) throw (); extern struct tm *gmtime (__const time_t *__timer) throw (); extern struct tm *localtime (__const time_t *__timer) throw (); extern struct tm *gmtime_r (__const time_t *__restrict __timer, struct tm *__restrict __tp) throw (); extern struct tm *localtime_r (__const time_t *__restrict __timer, struct tm *__restrict __tp) throw (); extern char *asctime (__const struct tm *__tp) throw (); extern char *ctime (__const time_t *__timer) throw (); extern char *asctime_r (__const struct tm *__restrict __tp, char *__restrict __buf) throw (); extern char *ctime_r (__const time_t *__restrict __timer, char *__restrict __buf) throw (); extern char *__tzname[2]; extern int __daylight; extern long int __timezone; extern char *tzname[2]; extern void tzset (void) throw (); extern int daylight; extern long int timezone; extern int stime (__const time_t *__when) throw (); # 312 "/usr/include/time.h" 3 4 extern time_t timegm (struct tm *__tp) throw (); extern time_t timelocal (struct tm *__tp) throw (); extern int dysize (int __year) throw () __attribute__ ((__const__)); # 327 "/usr/include/time.h" 3 4 extern int nanosleep (__const struct timespec *__requested_time, struct timespec *__remaining); extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw (); extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw (); extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) throw (); extern int clock_nanosleep (clockid_t __clock_id, int __flags, __const struct timespec *__req, struct timespec *__rem); extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw (); extern int timer_create (clockid_t __clock_id, struct sigevent *__restrict __evp, timer_t *__restrict __timerid) throw (); extern int timer_delete (timer_t __timerid) throw (); extern int timer_settime (timer_t __timerid, int __flags, __const struct itimerspec *__restrict __value, struct itimerspec *__restrict __ovalue) throw (); extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) throw (); extern int timer_getoverrun (timer_t __timerid) throw (); # 389 "/usr/include/time.h" 3 4 extern int getdate_err; # 398 "/usr/include/time.h" 3 4 extern struct tm *getdate (__const char *__string); # 412 "/usr/include/time.h" 3 4 extern int getdate_r (__const char *__restrict __string, struct tm *__restrict __resbufp); } # 26 "/usr/include/pthread.h" 2 3 4 # 1 "/usr/include/signal.h" 1 3 4 # 31 "/usr/include/signal.h" 3 4 extern "C" { # 1 "/usr/include/bits/sigset.h" 1 3 4 # 34 "/usr/include/signal.h" 2 3 4 # 400 "/usr/include/signal.h" 3 4 } # 29 "/usr/include/pthread.h" 2 3 4 # 1 "/usr/include/bits/setjmp.h" 1 3 4 # 33 "/usr/include/bits/setjmp.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 34 "/usr/include/bits/setjmp.h" 2 3 4 # 48 "/usr/include/bits/setjmp.h" 3 4 typedef long int __jmp_buf[64 + (12 * 4)] __attribute__ ((__aligned__ (16))); # 31 "/usr/include/pthread.h" 2 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 32 "/usr/include/pthread.h" 2 3 4 enum { PTHREAD_CREATE_JOINABLE, PTHREAD_CREATE_DETACHED }; enum { PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK_NP, PTHREAD_MUTEX_ADAPTIVE_NP , PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP }; enum { PTHREAD_MUTEX_STALLED_NP, PTHREAD_MUTEX_ROBUST_NP }; enum { PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT, PTHREAD_PRIO_PROTECT }; # 114 "/usr/include/pthread.h" 3 4 enum { PTHREAD_RWLOCK_PREFER_READER_NP, PTHREAD_RWLOCK_PREFER_WRITER_NP, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP }; # 144 "/usr/include/pthread.h" 3 4 enum { PTHREAD_INHERIT_SCHED, PTHREAD_EXPLICIT_SCHED }; enum { PTHREAD_SCOPE_SYSTEM, PTHREAD_SCOPE_PROCESS }; enum { PTHREAD_PROCESS_PRIVATE, PTHREAD_PROCESS_SHARED }; # 179 "/usr/include/pthread.h" 3 4 struct _pthread_cleanup_buffer { void (*__routine) (void *); void *__arg; int __canceltype; struct _pthread_cleanup_buffer *__prev; }; enum { PTHREAD_CANCEL_ENABLE, PTHREAD_CANCEL_DISABLE }; enum { PTHREAD_CANCEL_DEFERRED, PTHREAD_CANCEL_ASYNCHRONOUS }; # 217 "/usr/include/pthread.h" 3 4 extern "C" { extern int pthread_create (pthread_t *__restrict __newthread, __const pthread_attr_t *__restrict __attr, void *(*__start_routine) (void *), void *__restrict __arg) throw () __attribute__ ((__nonnull__ (1, 3))); extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); extern int pthread_join (pthread_t __th, void **__thread_return); extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) throw (); extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, __const struct timespec *__abstime); extern int pthread_detach (pthread_t __th) throw (); extern pthread_t pthread_self (void) throw () __attribute__ ((__const__)); extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) throw (); extern int pthread_attr_init (pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_destroy (pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, int *__detachstate) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, int __detachstate) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr, size_t *__guardsize) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setguardsize (pthread_attr_t *__attr, size_t __guardsize) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict __attr, struct sched_param *__restrict __param) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, __const struct sched_param *__restrict __param) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict __attr, int *__restrict __policy) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict __attr, int *__restrict __inherit) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, int __inherit) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, int *__restrict __scope) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr) throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__)); extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)); extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict __attr, size_t *__restrict __stacksize) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr, size_t *__restrict __stacksize) throw () __attribute__ ((__nonnull__ (1, 2, 3))); extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, size_t __stacksize) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, size_t __cpusetsize, __const cpu_set_t *__cpuset) throw () __attribute__ ((__nonnull__ (1, 3))); extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr, size_t __cpusetsize, cpu_set_t *__cpuset) throw () __attribute__ ((__nonnull__ (1, 3))); extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (2))); extern int pthread_setschedparam (pthread_t __target_thread, int __policy, __const struct sched_param *__param) throw () __attribute__ ((__nonnull__ (3))); extern int pthread_getschedparam (pthread_t __target_thread, int *__restrict __policy, struct sched_param *__restrict __param) throw () __attribute__ ((__nonnull__ (2, 3))); extern int pthread_setschedprio (pthread_t __target_thread, int __prio) throw (); extern int pthread_getconcurrency (void) throw (); extern int pthread_setconcurrency (int __level) throw (); extern int pthread_yield (void) throw (); extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, __const cpu_set_t *__cpuset) throw () __attribute__ ((__nonnull__ (3))); extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, cpu_set_t *__cpuset) throw () __attribute__ ((__nonnull__ (3))); # 463 "/usr/include/pthread.h" 3 4 extern int pthread_once (pthread_once_t *__once_control, void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); # 475 "/usr/include/pthread.h" 3 4 extern int pthread_setcancelstate (int __state, int *__oldstate); extern int pthread_setcanceltype (int __type, int *__oldtype); extern int pthread_cancel (pthread_t __th); extern void pthread_testcancel (void); typedef struct { struct { __jmp_buf __cancel_jmp_buf; int __mask_was_saved; } __cancel_jmp_buf[1]; void *__pad[4]; } __pthread_unwind_buf_t __attribute__ ((__aligned__)); # 509 "/usr/include/pthread.h" 3 4 struct __pthread_cleanup_frame { void (*__cancel_routine) (void *); void *__cancel_arg; int __do_it; int __cancel_type; }; class __pthread_cleanup_class { void (*__cancel_routine) (void *); void *__cancel_arg; int __do_it; int __cancel_type; public: __pthread_cleanup_class (void (*__fct) (void *), void *__arg) : __cancel_routine (__fct), __cancel_arg (__arg), __do_it (1) { } ~__pthread_cleanup_class () { if (__do_it) __cancel_routine (__cancel_arg); } void __setdoit (int __newval) { __do_it = __newval; } void __defer () { pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, &__cancel_type); } void __restore () const { pthread_setcanceltype (__cancel_type, 0); } }; # 709 "/usr/include/pthread.h" 3 4 struct __jmp_buf_tag; extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) throw (); extern int pthread_mutex_init (pthread_mutex_t *__mutex, __const pthread_mutexattr_t *__mutexattr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_lock (pthread_mutex_t *__mutex) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, __const struct timespec *__restrict __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_getprioceiling (__const pthread_mutex_t * __restrict __mutex, int *__restrict __prioceiling) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, int __prioceiling, int *__restrict __old_ceiling) throw () __attribute__ ((__nonnull__ (1, 3))); extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * __restrict __attr, int *__restrict __pshared) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, int __pshared) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict __attr, int *__restrict __kind) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t * __restrict __attr, int *__restrict __protocol) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, int __protocol) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t * __restrict __attr, int *__restrict __prioceiling) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, int __prioceiling) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr, int *__robustness) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, int __robustness) throw () __attribute__ ((__nonnull__ (1))); # 843 "/usr/include/pthread.h" 3 4 extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, __const pthread_rwlockattr_t *__restrict __attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, __const struct timespec *__restrict __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, __const struct timespec *__restrict __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pshared) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, int __pshared) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pref) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, int __pref) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_cond_init (pthread_cond_t *__restrict __cond, __const pthread_condattr_t *__restrict __cond_attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_cond_destroy (pthread_cond_t *__cond) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_cond_signal (pthread_cond_t *__cond) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_cond_broadcast (pthread_cond_t *__cond) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex) __attribute__ ((__nonnull__ (1, 2))); # 955 "/usr/include/pthread.h" 3 4 extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex, __const struct timespec *__restrict __abstime) __attribute__ ((__nonnull__ (1, 2, 3))); extern int pthread_condattr_init (pthread_condattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_condattr_destroy (pthread_condattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_condattr_getpshared (__const pthread_condattr_t * __restrict __attr, int *__restrict __pshared) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, int __pshared) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_condattr_getclock (__const pthread_condattr_t * __restrict __attr, __clockid_t *__restrict __clock_id) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_condattr_setclock (pthread_condattr_t *__attr, __clockid_t __clock_id) throw () __attribute__ ((__nonnull__ (1))); # 999 "/usr/include/pthread.h" 3 4 extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_spin_destroy (pthread_spinlock_t *__lock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_spin_lock (pthread_spinlock_t *__lock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_spin_trylock (pthread_spinlock_t *__lock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_spin_unlock (pthread_spinlock_t *__lock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, __const pthread_barrierattr_t *__restrict __attr, unsigned int __count) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_barrier_wait (pthread_barrier_t *__barrier) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * __restrict __attr, int *__restrict __pshared) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, int __pshared) throw () __attribute__ ((__nonnull__ (1))); # 1066 "/usr/include/pthread.h" 3 4 extern int pthread_key_create (pthread_key_t *__key, void (*__destr_function) (void *)) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_key_delete (pthread_key_t __key) throw (); extern void *pthread_getspecific (pthread_key_t __key) throw (); extern int pthread_setspecific (pthread_key_t __key, __const void *__pointer) throw () ; extern int pthread_getcpuclockid (pthread_t __thread_id, __clockid_t *__clock_id) throw () __attribute__ ((__nonnull__ (2))); # 1100 "/usr/include/pthread.h" 3 4 extern int pthread_atfork (void (*__prepare) (void), void (*__parent) (void), void (*__child) (void)) throw (); extern __inline int pthread_equal (pthread_t __thread1, pthread_t __thread2) throw () { return __thread1 == __thread2; } } # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr-default.h" 2 3 # 1 "/usr/include/unistd.h" 1 3 4 # 28 "/usr/include/unistd.h" 3 4 extern "C" { # 173 "/usr/include/unistd.h" 3 4 # 1 "/usr/include/bits/posix_opt.h" 1 3 4 # 174 "/usr/include/unistd.h" 2 3 4 # 1 "/usr/include/bits/environments.h" 1 3 4 # 23 "/usr/include/bits/environments.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 24 "/usr/include/bits/environments.h" 2 3 4 # 178 "/usr/include/unistd.h" 2 3 4 # 197 "/usr/include/unistd.h" 3 4 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4 # 198 "/usr/include/unistd.h" 2 3 4 # 238 "/usr/include/unistd.h" 3 4 typedef __intptr_t intptr_t; typedef __socklen_t socklen_t; # 258 "/usr/include/unistd.h" 3 4 extern int access (__const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1))); extern int euidaccess (__const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1))); extern int eaccess (__const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1))); extern int faccessat (int __fd, __const char *__file, int __type, int __flag) throw () __attribute__ ((__nonnull__ (2))) ; # 304 "/usr/include/unistd.h" 3 4 extern __off64_t lseek (int __fd, __off64_t __offset, int __whence) throw () __asm__ ("" "lseek64"); extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) throw (); extern int close (int __fd); extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ; extern ssize_t write (int __fd, __const void *__buf, size_t __n) ; # 355 "/usr/include/unistd.h" 3 4 extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64") ; extern ssize_t pwrite (int __fd, __const void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pwrite64") ; # 371 "/usr/include/unistd.h" 3 4 extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) ; extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n, __off64_t __offset) ; extern int pipe (int __pipedes[2]) throw () ; # 393 "/usr/include/unistd.h" 3 4 extern unsigned int alarm (unsigned int __seconds) throw (); # 405 "/usr/include/unistd.h" 3 4 extern unsigned int sleep (unsigned int __seconds); extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) throw (); extern int usleep (__useconds_t __useconds); # 429 "/usr/include/unistd.h" 3 4 extern int pause (void); extern int chown (__const char *__file, __uid_t __owner, __gid_t __group) throw () __attribute__ ((__nonnull__ (1))) ; extern int fchown (int __fd, __uid_t __owner, __gid_t __group) throw () ; extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group) throw () __attribute__ ((__nonnull__ (1))) ; extern int fchownat (int __fd, __const char *__file, __uid_t __owner, __gid_t __group, int __flag) throw () __attribute__ ((__nonnull__ (2))) ; extern int chdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) ; extern int fchdir (int __fd) throw () ; # 471 "/usr/include/unistd.h" 3 4 extern char *getcwd (char *__buf, size_t __size) throw () ; extern char *get_current_dir_name (void) throw (); extern char *getwd (char *__buf) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) ; extern int dup (int __fd) throw () ; extern int dup2 (int __fd, int __fd2) throw (); extern char **__environ; extern char **environ; extern int execve (__const char *__path, char *__const __argv[], char *__const __envp[]) throw () __attribute__ ((__nonnull__ (1))); extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[]) throw (); extern int execv (__const char *__path, char *__const __argv[]) throw () __attribute__ ((__nonnull__ (1))); extern int execle (__const char *__path, __const char *__arg, ...) throw () __attribute__ ((__nonnull__ (1))); extern int execl (__const char *__path, __const char *__arg, ...) throw () __attribute__ ((__nonnull__ (1))); extern int execvp (__const char *__file, char *__const __argv[]) throw () __attribute__ ((__nonnull__ (1))); extern int execlp (__const char *__file, __const char *__arg, ...) throw () __attribute__ ((__nonnull__ (1))); extern int nice (int __inc) throw () ; extern void _exit (int __status) __attribute__ ((__noreturn__)); # 1 "/usr/include/bits/confname.h" 1 3 4 # 26 "/usr/include/bits/confname.h" 3 4 enum { _PC_LINK_MAX, _PC_MAX_CANON, _PC_MAX_INPUT, _PC_NAME_MAX, _PC_PATH_MAX, _PC_PIPE_BUF, _PC_CHOWN_RESTRICTED, _PC_NO_TRUNC, _PC_VDISABLE, _PC_SYNC_IO, _PC_ASYNC_IO, _PC_PRIO_IO, _PC_SOCK_MAXBUF, _PC_FILESIZEBITS, _PC_REC_INCR_XFER_SIZE, _PC_REC_MAX_XFER_SIZE, _PC_REC_MIN_XFER_SIZE, _PC_REC_XFER_ALIGN, _PC_ALLOC_SIZE_MIN, _PC_SYMLINK_MAX, _PC_2_SYMLINKS }; enum { _SC_ARG_MAX, _SC_CHILD_MAX, _SC_CLK_TCK, _SC_NGROUPS_MAX, _SC_OPEN_MAX, _SC_STREAM_MAX, _SC_TZNAME_MAX, _SC_JOB_CONTROL, _SC_SAVED_IDS, _SC_REALTIME_SIGNALS, _SC_PRIORITY_SCHEDULING, _SC_TIMERS, _SC_ASYNCHRONOUS_IO, _SC_PRIORITIZED_IO, _SC_SYNCHRONIZED_IO, _SC_FSYNC, _SC_MAPPED_FILES, _SC_MEMLOCK, _SC_MEMLOCK_RANGE, _SC_MEMORY_PROTECTION, _SC_MESSAGE_PASSING, _SC_SEMAPHORES, _SC_SHARED_MEMORY_OBJECTS, _SC_AIO_LISTIO_MAX, _SC_AIO_MAX, _SC_AIO_PRIO_DELTA_MAX, _SC_DELAYTIMER_MAX, _SC_MQ_OPEN_MAX, _SC_MQ_PRIO_MAX, _SC_VERSION, _SC_PAGESIZE, _SC_RTSIG_MAX, _SC_SEM_NSEMS_MAX, _SC_SEM_VALUE_MAX, _SC_SIGQUEUE_MAX, _SC_TIMER_MAX, _SC_BC_BASE_MAX, _SC_BC_DIM_MAX, _SC_BC_SCALE_MAX, _SC_BC_STRING_MAX, _SC_COLL_WEIGHTS_MAX, _SC_EQUIV_CLASS_MAX, _SC_EXPR_NEST_MAX, _SC_LINE_MAX, _SC_RE_DUP_MAX, _SC_CHARCLASS_NAME_MAX, _SC_2_VERSION, _SC_2_C_BIND, _SC_2_C_DEV, _SC_2_FORT_DEV, _SC_2_FORT_RUN, _SC_2_SW_DEV, _SC_2_LOCALEDEF, _SC_PII, _SC_PII_XTI, _SC_PII_SOCKET, _SC_PII_INTERNET, _SC_PII_OSI, _SC_POLL, _SC_SELECT, _SC_UIO_MAXIOV, _SC_IOV_MAX = _SC_UIO_MAXIOV, _SC_PII_INTERNET_STREAM, _SC_PII_INTERNET_DGRAM, _SC_PII_OSI_COTS, _SC_PII_OSI_CLTS, _SC_PII_OSI_M, _SC_T_IOV_MAX, _SC_THREADS, _SC_THREAD_SAFE_FUNCTIONS, _SC_GETGR_R_SIZE_MAX, _SC_GETPW_R_SIZE_MAX, _SC_LOGIN_NAME_MAX, _SC_TTY_NAME_MAX, _SC_THREAD_DESTRUCTOR_ITERATIONS, _SC_THREAD_KEYS_MAX, _SC_THREAD_STACK_MIN, _SC_THREAD_THREADS_MAX, _SC_THREAD_ATTR_STACKADDR, _SC_THREAD_ATTR_STACKSIZE, _SC_THREAD_PRIORITY_SCHEDULING, _SC_THREAD_PRIO_INHERIT, _SC_THREAD_PRIO_PROTECT, _SC_THREAD_PROCESS_SHARED, _SC_NPROCESSORS_CONF, _SC_NPROCESSORS_ONLN, _SC_PHYS_PAGES, _SC_AVPHYS_PAGES, _SC_ATEXIT_MAX, _SC_PASS_MAX, _SC_XOPEN_VERSION, _SC_XOPEN_XCU_VERSION, _SC_XOPEN_UNIX, _SC_XOPEN_CRYPT, _SC_XOPEN_ENH_I18N, _SC_XOPEN_SHM, _SC_2_CHAR_TERM, _SC_2_C_VERSION, _SC_2_UPE, _SC_XOPEN_XPG2, _SC_XOPEN_XPG3, _SC_XOPEN_XPG4, _SC_CHAR_BIT, _SC_CHAR_MAX, _SC_CHAR_MIN, _SC_INT_MAX, _SC_INT_MIN, _SC_LONG_BIT, _SC_WORD_BIT, _SC_MB_LEN_MAX, _SC_NZERO, _SC_SSIZE_MAX, _SC_SCHAR_MAX, _SC_SCHAR_MIN, _SC_SHRT_MAX, _SC_SHRT_MIN, _SC_UCHAR_MAX, _SC_UINT_MAX, _SC_ULONG_MAX, _SC_USHRT_MAX, _SC_NL_ARGMAX, _SC_NL_LANGMAX, _SC_NL_MSGMAX, _SC_NL_NMAX, _SC_NL_SETMAX, _SC_NL_TEXTMAX, _SC_XBS5_ILP32_OFF32, _SC_XBS5_ILP32_OFFBIG, _SC_XBS5_LP64_OFF64, _SC_XBS5_LPBIG_OFFBIG, _SC_XOPEN_LEGACY, _SC_XOPEN_REALTIME, _SC_XOPEN_REALTIME_THREADS, _SC_ADVISORY_INFO, _SC_BARRIERS, _SC_BASE, _SC_C_LANG_SUPPORT, _SC_C_LANG_SUPPORT_R, _SC_CLOCK_SELECTION, _SC_CPUTIME, _SC_THREAD_CPUTIME, _SC_DEVICE_IO, _SC_DEVICE_SPECIFIC, _SC_DEVICE_SPECIFIC_R, _SC_FD_MGMT, _SC_FIFO, _SC_PIPE, _SC_FILE_ATTRIBUTES, _SC_FILE_LOCKING, _SC_FILE_SYSTEM, _SC_MONOTONIC_CLOCK, _SC_MULTI_PROCESS, _SC_SINGLE_PROCESS, _SC_NETWORKING, _SC_READER_WRITER_LOCKS, _SC_SPIN_LOCKS, _SC_REGEXP, _SC_REGEX_VERSION, _SC_SHELL, _SC_SIGNALS, _SC_SPAWN, _SC_SPORADIC_SERVER, _SC_THREAD_SPORADIC_SERVER, _SC_SYSTEM_DATABASE, _SC_SYSTEM_DATABASE_R, _SC_TIMEOUTS, _SC_TYPED_MEMORY_OBJECTS, _SC_USER_GROUPS, _SC_USER_GROUPS_R, _SC_2_PBS, _SC_2_PBS_ACCOUNTING, _SC_2_PBS_LOCATE, _SC_2_PBS_MESSAGE, _SC_2_PBS_TRACK, _SC_SYMLOOP_MAX, _SC_STREAMS, _SC_2_PBS_CHECKPOINT, _SC_V6_ILP32_OFF32, _SC_V6_ILP32_OFFBIG, _SC_V6_LP64_OFF64, _SC_V6_LPBIG_OFFBIG, _SC_HOST_NAME_MAX, _SC_TRACE, _SC_TRACE_EVENT_FILTER, _SC_TRACE_INHERIT, _SC_TRACE_LOG, _SC_LEVEL1_ICACHE_SIZE, _SC_LEVEL1_ICACHE_ASSOC, _SC_LEVEL1_ICACHE_LINESIZE, _SC_LEVEL1_DCACHE_SIZE, _SC_LEVEL1_DCACHE_ASSOC, _SC_LEVEL1_DCACHE_LINESIZE, _SC_LEVEL2_CACHE_SIZE, _SC_LEVEL2_CACHE_ASSOC, _SC_LEVEL2_CACHE_LINESIZE, _SC_LEVEL3_CACHE_SIZE, _SC_LEVEL3_CACHE_ASSOC, _SC_LEVEL3_CACHE_LINESIZE, _SC_LEVEL4_CACHE_SIZE, _SC_LEVEL4_CACHE_ASSOC, _SC_LEVEL4_CACHE_LINESIZE, _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, _SC_RAW_SOCKETS }; enum { _CS_PATH, _CS_V6_WIDTH_RESTRICTED_ENVS, _CS_GNU_LIBC_VERSION, _CS_GNU_LIBPTHREAD_VERSION, _CS_LFS_CFLAGS = 1000, _CS_LFS_LDFLAGS, _CS_LFS_LIBS, _CS_LFS_LINTFLAGS, _CS_LFS64_CFLAGS, _CS_LFS64_LDFLAGS, _CS_LFS64_LIBS, _CS_LFS64_LINTFLAGS, _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, _CS_XBS5_ILP32_OFF32_LDFLAGS, _CS_XBS5_ILP32_OFF32_LIBS, _CS_XBS5_ILP32_OFF32_LINTFLAGS, _CS_XBS5_ILP32_OFFBIG_CFLAGS, _CS_XBS5_ILP32_OFFBIG_LDFLAGS, _CS_XBS5_ILP32_OFFBIG_LIBS, _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, _CS_XBS5_LP64_OFF64_CFLAGS, _CS_XBS5_LP64_OFF64_LDFLAGS, _CS_XBS5_LP64_OFF64_LIBS, _CS_XBS5_LP64_OFF64_LINTFLAGS, _CS_XBS5_LPBIG_OFFBIG_CFLAGS, _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, _CS_XBS5_LPBIG_OFFBIG_LIBS, _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, _CS_POSIX_V6_ILP32_OFF32_CFLAGS, _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, _CS_POSIX_V6_ILP32_OFF32_LIBS, _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_LIBS, _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, _CS_POSIX_V6_LP64_OFF64_CFLAGS, _CS_POSIX_V6_LP64_OFF64_LDFLAGS, _CS_POSIX_V6_LP64_OFF64_LIBS, _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS }; # 555 "/usr/include/unistd.h" 2 3 4 extern long int pathconf (__const char *__path, int __name) throw () __attribute__ ((__nonnull__ (1))); extern long int fpathconf (int __fd, int __name) throw (); extern long int sysconf (int __name) throw (); extern size_t confstr (int __name, char *__buf, size_t __len) throw (); extern __pid_t getpid (void) throw (); extern __pid_t getppid (void) throw (); extern __pid_t getpgrp (void) throw (); # 591 "/usr/include/unistd.h" 3 4 extern __pid_t __getpgid (__pid_t __pid) throw (); extern __pid_t getpgid (__pid_t __pid) throw (); extern int setpgid (__pid_t __pid, __pid_t __pgid) throw (); # 617 "/usr/include/unistd.h" 3 4 extern int setpgrp (void) throw (); # 634 "/usr/include/unistd.h" 3 4 extern __pid_t setsid (void) throw (); extern __pid_t getsid (__pid_t __pid) throw (); extern __uid_t getuid (void) throw (); extern __uid_t geteuid (void) throw (); extern __gid_t getgid (void) throw (); extern __gid_t getegid (void) throw (); extern int getgroups (int __size, __gid_t __list[]) throw () ; extern int group_member (__gid_t __gid) throw (); extern int setuid (__uid_t __uid) throw (); extern int setreuid (__uid_t __ruid, __uid_t __euid) throw (); extern int seteuid (__uid_t __uid) throw (); extern int setgid (__gid_t __gid) throw (); extern int setregid (__gid_t __rgid, __gid_t __egid) throw (); extern int setegid (__gid_t __gid) throw (); extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) throw (); extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) throw (); extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) throw (); extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) throw (); extern __pid_t fork (void) throw (); extern __pid_t vfork (void) throw (); extern char *ttyname (int __fd) throw (); extern int ttyname_r (int __fd, char *__buf, size_t __buflen) throw () __attribute__ ((__nonnull__ (2))) ; extern int isatty (int __fd) throw (); extern int ttyslot (void) throw (); extern int link (__const char *__from, __const char *__to) throw () __attribute__ ((__nonnull__ (1, 2))) ; extern int linkat (int __fromfd, __const char *__from, int __tofd, __const char *__to, int __flags) throw () __attribute__ ((__nonnull__ (2, 4))) ; extern int symlink (__const char *__from, __const char *__to) throw () __attribute__ ((__nonnull__ (1, 2))) ; extern ssize_t readlink (__const char *__restrict __path, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (1, 2))) ; extern int symlinkat (__const char *__from, int __tofd, __const char *__to) throw () __attribute__ ((__nonnull__ (1, 3))) ; extern ssize_t readlinkat (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (2, 3))) ; extern int unlink (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); extern int unlinkat (int __fd, __const char *__name, int __flag) throw () __attribute__ ((__nonnull__ (2))); extern int rmdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))); extern __pid_t tcgetpgrp (int __fd) throw (); extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) throw (); extern char *getlogin (void); extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))); extern int setlogin (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); # 837 "/usr/include/unistd.h" 3 4 # 1 "/usr/include/getopt.h" 1 3 4 # 50 "/usr/include/getopt.h" 3 4 extern "C" { # 59 "/usr/include/getopt.h" 3 4 extern char *optarg; # 73 "/usr/include/getopt.h" 3 4 extern int optind; extern int opterr; extern int optopt; # 152 "/usr/include/getopt.h" 3 4 extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) throw (); # 171 "/usr/include/getopt.h" 3 4 } # 838 "/usr/include/unistd.h" 2 3 4 extern int gethostname (char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))); extern int sethostname (__const char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))) ; extern int sethostid (long int __id) throw () ; extern int getdomainname (char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))) ; extern int setdomainname (__const char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))) ; extern int vhangup (void) throw (); extern int revoke (__const char *__file) throw () __attribute__ ((__nonnull__ (1))) ; extern int profil (unsigned short int *__sample_buffer, size_t __size, size_t __offset, unsigned int __scale) throw () __attribute__ ((__nonnull__ (1))); extern int acct (__const char *__name) throw (); extern char *getusershell (void) throw (); extern void endusershell (void) throw (); extern void setusershell (void) throw (); extern int daemon (int __nochdir, int __noclose) throw () ; extern int chroot (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) ; extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1))); # 923 "/usr/include/unistd.h" 3 4 extern int fsync (int __fd); extern long int gethostid (void); extern void sync (void) throw (); extern int getpagesize (void) throw () __attribute__ ((__const__)); extern int getdtablesize (void) throw (); # 952 "/usr/include/unistd.h" 3 4 extern int truncate (__const char *__file, __off64_t __length) throw () __asm__ ("" "truncate64") __attribute__ ((__nonnull__ (1))) ; extern int truncate64 (__const char *__file, __off64_t __length) throw () __attribute__ ((__nonnull__ (1))) ; # 973 "/usr/include/unistd.h" 3 4 extern int ftruncate (int __fd, __off64_t __length) throw () __asm__ ("" "ftruncate64") ; extern int ftruncate64 (int __fd, __off64_t __length) throw () ; # 990 "/usr/include/unistd.h" 3 4 extern int brk (void *__addr) throw () ; extern void *sbrk (intptr_t __delta) throw (); # 1011 "/usr/include/unistd.h" 3 4 extern long int syscall (long int __sysno, ...) throw (); # 1037 "/usr/include/unistd.h" 3 4 extern int lockf (int __fd, int __cmd, __off64_t __len) __asm__ ("" "lockf64") ; extern int lockf64 (int __fd, int __cmd, __off64_t __len) ; # 1065 "/usr/include/unistd.h" 3 4 extern int fdatasync (int __fildes); extern char *crypt (__const char *__key, __const char *__salt) throw () __attribute__ ((__nonnull__ (1, 2))); extern void encrypt (char *__block, int __edflag) throw () __attribute__ ((__nonnull__ (1))); extern void swab (__const void *__restrict __from, void *__restrict __to, ssize_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *ctermid (char *__s) throw (); # 1103 "/usr/include/unistd.h" 3 4 } # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr-default.h" 2 3 typedef pthread_key_t __gthread_key_t; typedef pthread_once_t __gthread_once_t; typedef pthread_mutex_t __gthread_mutex_t; typedef pthread_mutex_t __gthread_recursive_mutex_t; # 88 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr-default.h" 3 static __typeof(pthread_once) __gthrw_pthread_once __attribute__ ((__weakref__("pthread_once"))); static __typeof(pthread_getspecific) __gthrw_pthread_getspecific __attribute__ ((__weakref__("pthread_getspecific"))); static __typeof(pthread_setspecific) __gthrw_pthread_setspecific __attribute__ ((__weakref__("pthread_setspecific"))); static __typeof(pthread_create) __gthrw_pthread_create __attribute__ ((__weakref__("pthread_create"))); static __typeof(pthread_cancel) __gthrw_pthread_cancel __attribute__ ((__weakref__("pthread_cancel"))); static __typeof(pthread_mutex_lock) __gthrw_pthread_mutex_lock __attribute__ ((__weakref__("pthread_mutex_lock"))); static __typeof(pthread_mutex_trylock) __gthrw_pthread_mutex_trylock __attribute__ ((__weakref__("pthread_mutex_trylock"))); static __typeof(pthread_mutex_unlock) __gthrw_pthread_mutex_unlock __attribute__ ((__weakref__("pthread_mutex_unlock"))); static __typeof(pthread_mutex_init) __gthrw_pthread_mutex_init __attribute__ ((__weakref__("pthread_mutex_init"))); static __typeof(pthread_key_create) __gthrw_pthread_key_create __attribute__ ((__weakref__("pthread_key_create"))); static __typeof(pthread_key_delete) __gthrw_pthread_key_delete __attribute__ ((__weakref__("pthread_key_delete"))); static __typeof(pthread_mutexattr_init) __gthrw_pthread_mutexattr_init __attribute__ ((__weakref__("pthread_mutexattr_init"))); static __typeof(pthread_mutexattr_settype) __gthrw_pthread_mutexattr_settype __attribute__ ((__weakref__("pthread_mutexattr_settype"))); static __typeof(pthread_mutexattr_destroy) __gthrw_pthread_mutexattr_destroy __attribute__ ((__weakref__("pthread_mutexattr_destroy"))); # 198 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr-default.h" 3 static inline int __gthread_active_p (void) { static void *const __gthread_active_ptr = __extension__ (void *) &__gthrw_pthread_cancel; return __gthread_active_ptr != 0; } # 567 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr-default.h" 3 static inline int __gthread_once (__gthread_once_t *once, void (*func) (void)) { if (__gthread_active_p ()) return __gthrw_pthread_once (once, func); else return -1; } static inline int __gthread_key_create (__gthread_key_t *key, void (*dtor) (void *)) { return __gthrw_pthread_key_create (key, dtor); } static inline int __gthread_key_delete (__gthread_key_t key) { return __gthrw_pthread_key_delete (key); } static inline void * __gthread_getspecific (__gthread_key_t key) { return __gthrw_pthread_getspecific (key); } static inline int __gthread_setspecific (__gthread_key_t key, const void *ptr) { return __gthrw_pthread_setspecific (key, ptr); } static inline int __gthread_mutex_lock (__gthread_mutex_t *mutex) { if (__gthread_active_p ()) return __gthrw_pthread_mutex_lock (mutex); else return 0; } static inline int __gthread_mutex_trylock (__gthread_mutex_t *mutex) { if (__gthread_active_p ()) return __gthrw_pthread_mutex_trylock (mutex); else return 0; } static inline int __gthread_mutex_unlock (__gthread_mutex_t *mutex) { if (__gthread_active_p ()) return __gthrw_pthread_mutex_unlock (mutex); else return 0; } # 649 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr-default.h" 3 static inline int __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex) { return __gthread_mutex_lock (mutex); } static inline int __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex) { return __gthread_mutex_trylock (mutex); } static inline int __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex) { return __gthread_mutex_unlock (mutex); } # 115 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/gthr.h" 2 3 #pragma GCC visibility pop # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++io.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { typedef __gthread_mutex_t __c_lock; typedef FILE __c_file; } # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iosfwd" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cctype" 1 3 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cctype" 3 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cctype" 3 # 1 "/usr/include/ctype.h" 1 3 4 # 30 "/usr/include/ctype.h" 3 4 extern "C" { # 48 "/usr/include/ctype.h" 3 4 enum { _ISupper = (1 << (0)), _ISlower = (1 << (1)), _ISalpha = (1 << (2)), _ISdigit = (1 << (3)), _ISxdigit = (1 << (4)), _ISspace = (1 << (5)), _ISprint = (1 << (6)), _ISgraph = (1 << (7)), _ISblank = (1 << (8)), _IScntrl = (1 << (9)), _ISpunct = (1 << (10)), _ISalnum = (1 << (11)) }; # 81 "/usr/include/ctype.h" 3 4 extern __const unsigned short int **__ctype_b_loc (void) __attribute__ ((__const)); extern __const __int32_t **__ctype_tolower_loc (void) __attribute__ ((__const)); extern __const __int32_t **__ctype_toupper_loc (void) __attribute__ ((__const)); # 96 "/usr/include/ctype.h" 3 4 extern int isalnum (int) throw (); extern int isalpha (int) throw (); extern int iscntrl (int) throw (); extern int isdigit (int) throw (); extern int islower (int) throw (); extern int isgraph (int) throw (); extern int isprint (int) throw (); extern int ispunct (int) throw (); extern int isspace (int) throw (); extern int isupper (int) throw (); extern int isxdigit (int) throw (); extern int tolower (int __c) throw (); extern int toupper (int __c) throw (); extern int isblank (int) throw (); extern int isctype (int __c, int __mask) throw (); extern int isascii (int __c) throw (); extern int toascii (int __c) throw (); extern int _toupper (int) throw (); extern int _tolower (int) throw (); # 247 "/usr/include/ctype.h" 3 4 extern int isalnum_l (int, __locale_t) throw (); extern int isalpha_l (int, __locale_t) throw (); extern int iscntrl_l (int, __locale_t) throw (); extern int isdigit_l (int, __locale_t) throw (); extern int islower_l (int, __locale_t) throw (); extern int isgraph_l (int, __locale_t) throw (); extern int isprint_l (int, __locale_t) throw (); extern int ispunct_l (int, __locale_t) throw (); extern int isspace_l (int, __locale_t) throw (); extern int isupper_l (int, __locale_t) throw (); extern int isxdigit_l (int, __locale_t) throw (); extern int isblank_l (int, __locale_t) throw (); extern int __tolower_l (int __c, __locale_t __l) throw (); extern int tolower_l (int __c, __locale_t __l) throw (); extern int __toupper_l (int __c, __locale_t __l) throw (); extern int toupper_l (int __c, __locale_t __l) throw (); # 323 "/usr/include/ctype.h" 3 4 } # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cctype" 2 3 # 68 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cctype" 3 namespace std __attribute__ ((__visibility__ ("default"))) { using ::isalnum; using ::isalpha; using ::iscntrl; using ::isdigit; using ::isgraph; using ::islower; using ::isprint; using ::ispunct; using ::isspace; using ::isupper; using ::isxdigit; using ::tolower; using ::toupper; } # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iosfwd" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stringfwd.h" 1 3 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stringfwd.h" 3 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stringfwd.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template class allocator; template struct char_traits; template, typename _Alloc = allocator<_CharT> > class basic_string; template<> struct char_traits; typedef basic_string string; template<> struct char_traits; typedef basic_string wstring; } # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iosfwd" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/postypes.h" 1 3 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/postypes.h" 3 # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/postypes.h" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cwchar" 1 3 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cwchar" 3 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cwchar" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ctime" 1 3 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ctime" 3 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ctime" 3 # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ctime" 3 namespace std __attribute__ ((__visibility__ ("default"))) { using ::clock_t; using ::time_t; using ::tm; using ::clock; using ::difftime; using ::mktime; using ::time; using ::asctime; using ::ctime; using ::gmtime; using ::localtime; using ::strftime; } # 53 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cwchar" 2 3 # 1 "/usr/include/wchar.h" 1 3 4 # 48 "/usr/include/wchar.h" 3 4 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4 # 49 "/usr/include/wchar.h" 2 3 4 # 93 "/usr/include/wchar.h" 3 4 typedef __mbstate_t mbstate_t; # 118 "/usr/include/wchar.h" 3 4 extern "C" { struct tm; extern wchar_t *wcscpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw (); extern wchar_t *wcsncpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw (); extern wchar_t *wcscat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw (); extern wchar_t *wcsncat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw (); extern int wcscmp (__const wchar_t *__s1, __const wchar_t *__s2) throw () __attribute__ ((__pure__)); extern int wcsncmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n) throw () __attribute__ ((__pure__)); extern int wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) throw (); extern int wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n) throw (); extern int wcscasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, __locale_t __loc) throw (); extern int wcsncasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n, __locale_t __loc) throw (); extern int wcscoll (__const wchar_t *__s1, __const wchar_t *__s2) throw (); extern size_t wcsxfrm (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw (); extern int wcscoll_l (__const wchar_t *__s1, __const wchar_t *__s2, __locale_t __loc) throw (); extern size_t wcsxfrm_l (wchar_t *__s1, __const wchar_t *__s2, size_t __n, __locale_t __loc) throw (); extern wchar_t *wcsdup (__const wchar_t *__s) throw () __attribute__ ((__malloc__)); extern wchar_t *wcschr (__const wchar_t *__wcs, wchar_t __wc) throw () __attribute__ ((__pure__)); extern wchar_t *wcsrchr (__const wchar_t *__wcs, wchar_t __wc) throw () __attribute__ ((__pure__)); extern wchar_t *wcschrnul (__const wchar_t *__s, wchar_t __wc) throw () __attribute__ ((__pure__)); extern size_t wcscspn (__const wchar_t *__wcs, __const wchar_t *__reject) throw () __attribute__ ((__pure__)); extern size_t wcsspn (__const wchar_t *__wcs, __const wchar_t *__accept) throw () __attribute__ ((__pure__)); extern wchar_t *wcspbrk (__const wchar_t *__wcs, __const wchar_t *__accept) throw () __attribute__ ((__pure__)); extern wchar_t *wcsstr (__const wchar_t *__haystack, __const wchar_t *__needle) throw () __attribute__ ((__pure__)); extern wchar_t *wcstok (wchar_t *__restrict __s, __const wchar_t *__restrict __delim, wchar_t **__restrict __ptr) throw (); extern size_t wcslen (__const wchar_t *__s) throw () __attribute__ ((__pure__)); extern wchar_t *wcswcs (__const wchar_t *__haystack, __const wchar_t *__needle) throw () __attribute__ ((__pure__)); extern size_t wcsnlen (__const wchar_t *__s, size_t __maxlen) throw () __attribute__ ((__pure__)); extern wchar_t *wmemchr (__const wchar_t *__s, wchar_t __c, size_t __n) throw () __attribute__ ((__pure__)); extern int wmemcmp (__const wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () __attribute__ ((__pure__)); extern wchar_t *wmemcpy (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw (); extern wchar_t *wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n) throw (); extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw (); extern wchar_t *wmempcpy (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw (); extern wint_t btowc (int __c) throw (); extern int wctob (wint_t __c) throw (); extern int mbsinit (__const mbstate_t *__ps) throw () __attribute__ ((__pure__)); extern size_t mbrtowc (wchar_t *__restrict __pwc, __const char *__restrict __s, size_t __n, mbstate_t *__p) throw (); extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, mbstate_t *__restrict __ps) throw (); extern size_t __mbrlen (__const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) throw (); extern size_t mbrlen (__const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) throw (); # 341 "/usr/include/wchar.h" 3 4 extern __inline size_t mbrlen (__const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) throw () { return (__ps != __null ? mbrtowc (__null, __s, __n, __ps) : __mbrlen (__s, __n, __null)); } extern size_t mbsrtowcs (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw (); extern size_t wcsrtombs (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw (); extern size_t mbsnrtowcs (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) throw (); extern size_t wcsnrtombs (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) throw (); extern int wcwidth (wchar_t __c) throw (); extern int wcswidth (__const wchar_t *__s, size_t __n) throw (); extern double wcstod (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw (); extern float wcstof (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw (); extern long double wcstold (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw (); extern long int wcstol (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw (); extern unsigned long int wcstoul (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw (); __extension__ extern long long int wcstoll (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw (); __extension__ extern unsigned long long int wcstoull (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw (); __extension__ extern long long int wcstoq (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw (); __extension__ extern unsigned long long int wcstouq (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw (); # 467 "/usr/include/wchar.h" 3 4 extern long int wcstol_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) throw (); extern unsigned long int wcstoul_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) throw (); __extension__ extern long long int wcstoll_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) throw (); __extension__ extern unsigned long long int wcstoull_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) throw (); extern double wcstod_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, __locale_t __loc) throw (); extern float wcstof_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, __locale_t __loc) throw (); extern long double wcstold_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, __locale_t __loc) throw (); extern double __wcstod_internal (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __group) throw (); extern float __wcstof_internal (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __group) throw (); extern long double __wcstold_internal (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __group) throw (); extern long int __wcstol_internal (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, int __group) throw (); extern unsigned long int __wcstoul_internal (__const wchar_t *__restrict __npt, wchar_t **__restrict __endptr, int __base, int __group) throw (); __extension__ extern long long int __wcstoll_internal (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, int __group) throw (); __extension__ extern unsigned long long int __wcstoull_internal (__const wchar_t * __restrict __nptr, wchar_t ** __restrict __endptr, int __base, int __group) throw (); extern __inline double wcstod (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw () { return __wcstod_internal (__nptr, __endptr, 0); } extern __inline long int wcstol (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw () { return __wcstol_internal (__nptr, __endptr, __base, 0); } extern __inline unsigned long int wcstoul (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw () { return __wcstoul_internal (__nptr, __endptr, __base, 0); } extern __inline float wcstof (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw () { return __wcstof_internal (__nptr, __endptr, 0); } extern __inline long double wcstold (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw () { return __wcstold_internal (__nptr, __endptr, 0); } __extension__ extern __inline long long int wcstoq (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw () { return __wcstoll_internal (__nptr, __endptr, __base, 0); } __extension__ extern __inline unsigned long long int wcstouq (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw () { return __wcstoull_internal (__nptr, __endptr, __base, 0); } extern wchar_t *wcpcpy (wchar_t *__dest, __const wchar_t *__src) throw (); extern wchar_t *wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n) throw (); # 607 "/usr/include/wchar.h" 3 4 extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) throw (); extern int fwide (__FILE *__fp, int __mode) throw (); extern int fwprintf (__FILE *__restrict __stream, __const wchar_t *__restrict __format, ...) ; extern int wprintf (__const wchar_t *__restrict __format, ...) ; extern int swprintf (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __format, ...) throw () ; extern int vfwprintf (__FILE *__restrict __s, __const wchar_t *__restrict __format, __gnuc_va_list __arg) ; extern int vwprintf (__const wchar_t *__restrict __format, __gnuc_va_list __arg) ; extern int vswprintf (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __format, __gnuc_va_list __arg) throw () ; extern int fwscanf (__FILE *__restrict __stream, __const wchar_t *__restrict __format, ...) ; extern int wscanf (__const wchar_t *__restrict __format, ...) ; extern int swscanf (__const wchar_t *__restrict __s, __const wchar_t *__restrict __format, ...) throw () ; extern int vfwscanf (__FILE *__restrict __s, __const wchar_t *__restrict __format, __gnuc_va_list __arg) ; extern int vwscanf (__const wchar_t *__restrict __format, __gnuc_va_list __arg) ; extern int vswscanf (__const wchar_t *__restrict __s, __const wchar_t *__restrict __format, __gnuc_va_list __arg) throw () ; extern wint_t fgetwc (__FILE *__stream); extern wint_t getwc (__FILE *__stream); extern wint_t getwchar (void); extern wint_t fputwc (wchar_t __wc, __FILE *__stream); extern wint_t putwc (wchar_t __wc, __FILE *__stream); extern wint_t putwchar (wchar_t __wc); extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n, __FILE *__restrict __stream); extern int fputws (__const wchar_t *__restrict __ws, __FILE *__restrict __stream); extern wint_t ungetwc (wint_t __wc, __FILE *__stream); # 768 "/usr/include/wchar.h" 3 4 extern wint_t getwc_unlocked (__FILE *__stream); extern wint_t getwchar_unlocked (void); extern wint_t fgetwc_unlocked (__FILE *__stream); extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream); # 794 "/usr/include/wchar.h" 3 4 extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream); extern wint_t putwchar_unlocked (wchar_t __wc); # 804 "/usr/include/wchar.h" 3 4 extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n, __FILE *__restrict __stream); extern int fputws_unlocked (__const wchar_t *__restrict __ws, __FILE *__restrict __stream); extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize, __const wchar_t *__restrict __format, __const struct tm *__restrict __tp) throw (); extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, __const wchar_t *__restrict __format, __const struct tm *__restrict __tp, __locale_t __loc) throw (); # 858 "/usr/include/wchar.h" 3 4 } # 56 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cwchar" 2 3 # 70 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cwchar" 3 namespace std __attribute__ ((__visibility__ ("default"))) { using ::mbstate_t; } # 144 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cwchar" 3 namespace std __attribute__ ((__visibility__ ("default"))) { using ::wint_t; using ::btowc; using ::fgetwc; using ::fgetws; using ::fputwc; using ::fputws; using ::fwide; using ::fwprintf; using ::fwscanf; using ::getwc; using ::getwchar; using ::mbrlen; using ::mbrtowc; using ::mbsinit; using ::mbsrtowcs; using ::putwc; using ::putwchar; using ::swprintf; using ::swscanf; using ::ungetwc; using ::vfwprintf; using ::vfwscanf; using ::vswprintf; using ::vswscanf; using ::vwprintf; using ::vwscanf; using ::wcrtomb; using ::wcscat; using ::wcscmp; using ::wcscoll; using ::wcscpy; using ::wcscspn; using ::wcslen; using ::wcsncat; using ::wcsncmp; using ::wcsncpy; using ::wcsrtombs; using ::wcsspn; using ::wcstod; using ::wcstof; using ::wcstok; using ::wcstol; using ::wcstoul; using ::wcsxfrm; using ::wctob; using ::wmemcmp; using ::wmemcpy; using ::wmemmove; using ::wmemset; using ::wprintf; using ::wscanf; using ::wcschr; inline wchar_t* wcschr(wchar_t* __p, wchar_t __c) { return wcschr(const_cast(__p), __c); } using ::wcspbrk; inline wchar_t* wcspbrk(wchar_t* __s1, const wchar_t* __s2) { return wcspbrk(const_cast(__s1), __s2); } using ::wcsrchr; inline wchar_t* wcsrchr(wchar_t* __p, wchar_t __c) { return wcsrchr(const_cast(__p), __c); } using ::wcsstr; inline wchar_t* wcsstr(wchar_t* __s1, const wchar_t* __s2) { return wcsstr(const_cast(__s1), __s2); } using ::wmemchr; inline wchar_t* wmemchr(wchar_t* __p, wchar_t __c, size_t __n) { return wmemchr(const_cast(__p), __c, __n); } } namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { using ::wcstold; # 264 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cwchar" 3 using ::wcstoll; using ::wcstoull; } namespace std __attribute__ ((__visibility__ ("default"))) { using ::__gnu_cxx::wcstold; using ::__gnu_cxx::wcstoll; using ::__gnu_cxx::wcstoull; } # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/postypes.h" 2 3 # 1 "/usr/include/stdint.h" 1 3 4 # 28 "/usr/include/stdint.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 29 "/usr/include/stdint.h" 2 3 4 # 49 "/usr/include/stdint.h" 3 4 typedef unsigned char uint8_t; typedef unsigned short int uint16_t; typedef unsigned int uint32_t; __extension__ typedef unsigned long long int uint64_t; typedef signed char int_least8_t; typedef short int int_least16_t; typedef int int_least32_t; __extension__ typedef long long int int_least64_t; typedef unsigned char uint_least8_t; typedef unsigned short int uint_least16_t; typedef unsigned int uint_least32_t; __extension__ typedef unsigned long long int uint_least64_t; typedef signed char int_fast8_t; typedef int int_fast16_t; typedef int int_fast32_t; __extension__ typedef long long int int_fast64_t; typedef unsigned char uint_fast8_t; typedef unsigned int uint_fast16_t; typedef unsigned int uint_fast32_t; __extension__ typedef unsigned long long int uint_fast64_t; # 129 "/usr/include/stdint.h" 3 4 typedef unsigned int uintptr_t; # 138 "/usr/include/stdint.h" 3 4 __extension__ typedef long long int intmax_t; __extension__ typedef unsigned long long int uintmax_t; # 50 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/postypes.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 72 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/postypes.h" 3 typedef int64_t streamoff; typedef ptrdiff_t streamsize; template class fpos; # 94 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/postypes.h" 3 template class fpos { private: streamoff _M_off; _StateT _M_state; public: fpos() : _M_off(0), _M_state() { } # 116 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/postypes.h" 3 fpos(streamoff __off) : _M_off(__off), _M_state() { } operator streamoff() const { return _M_off; } void state(_StateT __st) { _M_state = __st; } _StateT state() const { return _M_state; } fpos& operator+=(streamoff __off) { _M_off += __off; return *this; } fpos& operator-=(streamoff __off) { _M_off -= __off; return *this; } fpos operator+(streamoff __off) const { fpos __pos(*this); __pos += __off; return __pos; } fpos operator-(streamoff __off) const { fpos __pos(*this); __pos -= __off; return __pos; } streamoff operator-(const fpos& __other) const { return _M_off - __other._M_off; } }; template inline bool operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) { return streamoff(__lhs) == streamoff(__rhs); } template inline bool operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) { return streamoff(__lhs) != streamoff(__rhs); } typedef fpos streampos; typedef fpos wstreampos; } # 50 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iosfwd" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/functexcept.h" 1 3 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/functexcept.h" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/exception_defines.h" 1 3 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/functexcept.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { void __throw_bad_exception(void) __attribute__((__noreturn__)); void __throw_bad_alloc(void) __attribute__((__noreturn__)); void __throw_bad_cast(void) __attribute__((__noreturn__)); void __throw_bad_typeid(void) __attribute__((__noreturn__)); void __throw_logic_error(const char*) __attribute__((__noreturn__)); void __throw_domain_error(const char*) __attribute__((__noreturn__)); void __throw_invalid_argument(const char*) __attribute__((__noreturn__)); void __throw_length_error(const char*) __attribute__((__noreturn__)); void __throw_out_of_range(const char*) __attribute__((__noreturn__)); void __throw_runtime_error(const char*) __attribute__((__noreturn__)); void __throw_range_error(const char*) __attribute__((__noreturn__)); void __throw_overflow_error(const char*) __attribute__((__noreturn__)); void __throw_underflow_error(const char*) __attribute__((__noreturn__)); void __throw_ios_failure(const char*) __attribute__((__noreturn__)); } # 51 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iosfwd" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template > class basic_ios; template > class basic_streambuf; template > class basic_istream; template > class basic_ostream; template > class basic_iostream; template, typename _Alloc = allocator<_CharT> > class basic_stringbuf; template, typename _Alloc = allocator<_CharT> > class basic_istringstream; template, typename _Alloc = allocator<_CharT> > class basic_ostringstream; template, typename _Alloc = allocator<_CharT> > class basic_stringstream; template > class basic_filebuf; template > class basic_ifstream; template > class basic_ofstream; template > class basic_fstream; template > class istreambuf_iterator; template > class ostreambuf_iterator; class ios_base; # 135 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iosfwd" 3 typedef basic_ios ios; typedef basic_streambuf streambuf; typedef basic_istream istream; typedef basic_ostream ostream; typedef basic_iostream iostream; typedef basic_stringbuf stringbuf; typedef basic_istringstream istringstream; typedef basic_ostringstream ostringstream; typedef basic_stringstream stringstream; typedef basic_filebuf filebuf; typedef basic_ifstream ifstream; typedef basic_ofstream ofstream; typedef basic_fstream fstream; typedef basic_ios wios; typedef basic_streambuf wstreambuf; typedef basic_istream wistream; typedef basic_ostream wostream; typedef basic_iostream wiostream; typedef basic_stringbuf wstringbuf; typedef basic_istringstream wistringstream; typedef basic_ostringstream wostringstream; typedef basic_stringstream wstringstream; typedef basic_filebuf wfilebuf; typedef basic_ifstream wifstream; typedef basic_ofstream wofstream; typedef basic_fstream wfstream; } # 71 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_pair.h" 1 3 # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_pair.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template struct pair { typedef _T1 first_type; typedef _T2 second_type; _T1 first; _T2 second; pair() : first(), second() { } pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) { } template pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) { } }; template inline bool operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return __x.first == __y.first && __x.second == __y.second; } template inline bool operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return __x.first < __y.first || (!(__y.first < __x.first) && __x.second < __y.second); } template inline bool operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return !(__x == __y); } template inline bool operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return __y < __x; } template inline bool operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return !(__y < __x); } template inline bool operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return !(__x < __y); } # 142 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_pair.h" 3 template inline pair<_T1, _T2> make_pair(_T1 __x, _T2 __y) { return pair<_T1, _T2>(__x, __y); } } # 72 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/cpp_type_traits.h" 1 3 # 41 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/cpp_type_traits.h" 3 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/cpp_type_traits.h" 3 # 74 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/cpp_type_traits.h" 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { template class __normal_iterator; } namespace std __attribute__ ((__visibility__ ("default"))) { namespace __detail { typedef char __one; typedef char __two[2]; template __one __test_type(int _Tp::*); template __two& __test_type(...); } struct __true_type { }; struct __false_type { }; template struct __truth_type { typedef __false_type __type; }; template<> struct __truth_type { typedef __true_type __type; }; template struct __traitor { enum { __value = bool(_Sp::__value) || bool(_Tp::__value) }; typedef typename __truth_type<__value>::__type __type; }; template struct __are_same { enum { __value = 0 }; typedef __false_type __type; }; template struct __are_same<_Tp, _Tp> { enum { __value = 1 }; typedef __true_type __type; }; template struct __is_void { enum { __value = 0 }; typedef __false_type __type; }; template<> struct __is_void { enum { __value = 1 }; typedef __true_type __type; }; template struct __is_integer { enum { __value = 0 }; typedef __false_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template struct __is_floating { enum { __value = 0 }; typedef __false_type __type; }; template<> struct __is_floating { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_floating { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_floating { enum { __value = 1 }; typedef __true_type __type; }; template struct __is_pointer { enum { __value = 0 }; typedef __false_type __type; }; template struct __is_pointer<_Tp*> { enum { __value = 1 }; typedef __true_type __type; }; template struct __is_normal_iterator { enum { __value = 0 }; typedef __false_type __type; }; template struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator, _Container> > { enum { __value = 1 }; typedef __true_type __type; }; template struct __is_arithmetic : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> > { }; template struct __is_fundamental : public __traitor<__is_void<_Tp>, __is_arithmetic<_Tp> > { }; template struct __is_scalar : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > { }; template struct __is_pod { enum { __value = (sizeof(__detail::__test_type<_Tp>(0)) != sizeof(__detail::__one)) }; }; template struct __is_empty { private: template struct __first { }; template struct __second : public _Up { }; public: enum { __value = sizeof(__first<_Tp>) == sizeof(__second<_Tp>) }; }; template struct __is_char { enum { __value = 0 }; typedef __false_type __type; }; template<> struct __is_char { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_char { enum { __value = 1 }; typedef __true_type __type; }; } # 73 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/type_traits.h" 1 3 # 38 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/type_traits.h" 3 # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/type_traits.h" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/utility" 1 3 # 63 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/utility" 3 # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/utility" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_relops.h" 1 3 # 74 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_relops.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { namespace rel_ops { # 90 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_relops.h" 3 template inline bool operator!=(const _Tp& __x, const _Tp& __y) { return !(__x == __y); } # 103 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_relops.h" 3 template inline bool operator>(const _Tp& __x, const _Tp& __y) { return __y < __x; } # 116 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_relops.h" 3 template inline bool operator<=(const _Tp& __x, const _Tp& __y) { return !(__y < __x); } # 129 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_relops.h" 3 template inline bool operator>=(const _Tp& __x, const _Tp& __y) { return !(__x < __y); } } } # 67 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/utility" 2 3 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/type_traits.h" 2 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { template struct __enable_if { }; template struct __enable_if { typedef _Tp __type; }; template struct __conditional_type { typedef _Iftrue __type; }; template struct __conditional_type { typedef _Iffalse __type; }; template struct __add_unsigned { private: typedef __enable_if::__value, _Tp> __if_type; public: typedef typename __if_type::__type __type; }; template<> struct __add_unsigned { typedef unsigned char __type; }; template<> struct __add_unsigned { typedef unsigned char __type; }; template<> struct __add_unsigned { typedef unsigned short __type; }; template<> struct __add_unsigned { typedef unsigned int __type; }; template<> struct __add_unsigned { typedef unsigned long __type; }; template<> struct __add_unsigned { typedef unsigned long long __type; }; template<> struct __add_unsigned; template<> struct __add_unsigned; template struct __remove_unsigned { private: typedef __enable_if::__value, _Tp> __if_type; public: typedef typename __if_type::__type __type; }; template<> struct __remove_unsigned { typedef signed char __type; }; template<> struct __remove_unsigned { typedef signed char __type; }; template<> struct __remove_unsigned { typedef short __type; }; template<> struct __remove_unsigned { typedef int __type; }; template<> struct __remove_unsigned { typedef long __type; }; template<> struct __remove_unsigned { typedef long long __type; }; template<> struct __remove_unsigned; template<> struct __remove_unsigned; } # 74 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator_base_types.h" 1 3 # 67 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator_base_types.h" 3 # 68 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator_base_types.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 80 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator_base_types.h" 3 struct input_iterator_tag {}; struct output_iterator_tag {}; struct forward_iterator_tag : public input_iterator_tag {}; struct bidirectional_iterator_tag : public forward_iterator_tag {}; struct random_access_iterator_tag : public bidirectional_iterator_tag {}; # 104 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator_base_types.h" 3 template struct iterator { typedef _Category iterator_category; typedef _Tp value_type; typedef _Distance difference_type; typedef _Pointer pointer; typedef _Reference reference; }; template struct iterator_traits { typedef typename _Iterator::iterator_category iterator_category; typedef typename _Iterator::value_type value_type; typedef typename _Iterator::difference_type difference_type; typedef typename _Iterator::pointer pointer; typedef typename _Iterator::reference reference; }; template struct iterator_traits<_Tp*> { typedef random_access_iterator_tag iterator_category; typedef _Tp value_type; typedef ptrdiff_t difference_type; typedef _Tp* pointer; typedef _Tp& reference; }; template struct iterator_traits { typedef random_access_iterator_tag iterator_category; typedef _Tp value_type; typedef ptrdiff_t difference_type; typedef const _Tp* pointer; typedef const _Tp& reference; }; template inline typename iterator_traits<_Iter>::iterator_category __iterator_category(const _Iter&) { return typename iterator_traits<_Iter>::iterator_category(); } } # 75 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator_base_funcs.h" 1 3 # 68 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator_base_funcs.h" 3 # 69 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator_base_funcs.h" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/concept_check.h" 1 3 # 38 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/concept_check.h" 3 # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/concept_check.h" 3 # 70 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator_base_funcs.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template inline typename iterator_traits<_InputIterator>::difference_type __distance(_InputIterator __first, _InputIterator __last, input_iterator_tag) { typename iterator_traits<_InputIterator>::difference_type __n = 0; while (__first != __last) { ++__first; ++__n; } return __n; } template inline typename iterator_traits<_RandomAccessIterator>::difference_type __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, random_access_iterator_tag) { return __last - __first; } # 113 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator_base_funcs.h" 3 template inline typename iterator_traits<_InputIterator>::difference_type distance(_InputIterator __first, _InputIterator __last) { return std::__distance(__first, __last, std::__iterator_category(__first)); } template inline void __advance(_InputIterator& __i, _Distance __n, input_iterator_tag) { while (__n--) ++__i; } template inline void __advance(_BidirectionalIterator& __i, _Distance __n, bidirectional_iterator_tag) { if (__n > 0) while (__n--) ++__i; else while (__n++) --__i; } template inline void __advance(_RandomAccessIterator& __i, _Distance __n, random_access_iterator_tag) { __i += __n; } # 171 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator_base_funcs.h" 3 template inline void advance(_InputIterator& __i, _Distance __n) { typename iterator_traits<_InputIterator>::difference_type __d = __n; std::__advance(__i, __d, std::__iterator_category(__i)); } } # 76 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 1 3 # 72 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 93 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3 template class reverse_iterator : public iterator::iterator_category, typename iterator_traits<_Iterator>::value_type, typename iterator_traits<_Iterator>::difference_type, typename iterator_traits<_Iterator>::pointer, typename iterator_traits<_Iterator>::reference> { protected: _Iterator current; public: typedef _Iterator iterator_type; typedef typename iterator_traits<_Iterator>::difference_type difference_type; typedef typename iterator_traits<_Iterator>::reference reference; typedef typename iterator_traits<_Iterator>::pointer pointer; public: reverse_iterator() : current() { } explicit reverse_iterator(iterator_type __x) : current(__x) { } reverse_iterator(const reverse_iterator& __x) : current(__x.current) { } template reverse_iterator(const reverse_iterator<_Iter>& __x) : current(__x.base()) { } iterator_type base() const { return current; } reference operator*() const { _Iterator __tmp = current; return *--__tmp; } pointer operator->() const { return &(operator*()); } reverse_iterator& operator++() { --current; return *this; } reverse_iterator operator++(int) { reverse_iterator __tmp = *this; --current; return __tmp; } reverse_iterator& operator--() { ++current; return *this; } reverse_iterator operator--(int) { reverse_iterator __tmp = *this; ++current; return __tmp; } reverse_iterator operator+(difference_type __n) const { return reverse_iterator(current - __n); } reverse_iterator& operator+=(difference_type __n) { current -= __n; return *this; } reverse_iterator operator-(difference_type __n) const { return reverse_iterator(current + __n); } reverse_iterator& operator-=(difference_type __n) { current += __n; return *this; } reference operator[](difference_type __n) const { return *(*this + __n); } }; # 280 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3 template inline bool operator==(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __x.base() == __y.base(); } template inline bool operator<(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __y.base() < __x.base(); } template inline bool operator!=(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return !(__x == __y); } template inline bool operator>(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __y < __x; } template inline bool operator<=(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return !(__y < __x); } template inline bool operator>=(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return !(__x < __y); } template inline typename reverse_iterator<_Iterator>::difference_type operator-(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __y.base() - __x.base(); } template inline reverse_iterator<_Iterator> operator+(typename reverse_iterator<_Iterator>::difference_type __n, const reverse_iterator<_Iterator>& __x) { return reverse_iterator<_Iterator>(__x.base() - __n); } template inline bool operator==(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return __x.base() == __y.base(); } template inline bool operator<(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return __y.base() < __x.base(); } template inline bool operator!=(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return !(__x == __y); } template inline bool operator>(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return __y < __x; } template inline bool operator<=(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return !(__y < __x); } template inline bool operator>=(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return !(__x < __y); } template inline typename reverse_iterator<_IteratorL>::difference_type operator-(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return __y.base() - __x.base(); } # 384 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3 template class back_insert_iterator : public iterator { protected: _Container* container; public: typedef _Container container_type; explicit back_insert_iterator(_Container& __x) : container(&__x) { } # 410 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3 back_insert_iterator& operator=(typename _Container::const_reference __value) { container->push_back(__value); return *this; } back_insert_iterator& operator*() { return *this; } back_insert_iterator& operator++() { return *this; } back_insert_iterator operator++(int) { return *this; } }; # 444 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3 template inline back_insert_iterator<_Container> back_inserter(_Container& __x) { return back_insert_iterator<_Container>(__x); } # 459 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3 template class front_insert_iterator : public iterator { protected: _Container* container; public: typedef _Container container_type; explicit front_insert_iterator(_Container& __x) : container(&__x) { } # 484 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3 front_insert_iterator& operator=(typename _Container::const_reference __value) { container->push_front(__value); return *this; } front_insert_iterator& operator*() { return *this; } front_insert_iterator& operator++() { return *this; } front_insert_iterator operator++(int) { return *this; } }; # 518 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3 template inline front_insert_iterator<_Container> front_inserter(_Container& __x) { return front_insert_iterator<_Container>(__x); } # 537 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3 template class insert_iterator : public iterator { protected: _Container* container; typename _Container::iterator iter; public: typedef _Container container_type; insert_iterator(_Container& __x, typename _Container::iterator __i) : container(&__x), iter(__i) {} # 579 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3 insert_iterator& operator=(const typename _Container::const_reference __value) { iter = container->insert(iter, __value); ++iter; return *this; } insert_iterator& operator*() { return *this; } insert_iterator& operator++() { return *this; } insert_iterator& operator++(int) { return *this; } }; # 614 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3 template inline insert_iterator<_Container> inserter(_Container& __x, _Iterator __i) { return insert_iterator<_Container>(__x, typename _Container::iterator(__i)); } } namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { # 633 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3 using std::iterator_traits; using std::iterator; template class __normal_iterator { protected: _Iterator _M_current; public: typedef typename iterator_traits<_Iterator>::iterator_category iterator_category; typedef typename iterator_traits<_Iterator>::value_type value_type; typedef typename iterator_traits<_Iterator>::difference_type difference_type; typedef typename iterator_traits<_Iterator>::reference reference; typedef typename iterator_traits<_Iterator>::pointer pointer; __normal_iterator() : _M_current(_Iterator()) { } explicit __normal_iterator(const _Iterator& __i) : _M_current(__i) { } template __normal_iterator(const __normal_iterator<_Iter, typename __enable_if< (std::__are_same<_Iter, typename _Container::pointer>::__value), _Container>::__type>& __i) : _M_current(__i.base()) { } reference operator*() const { return *_M_current; } pointer operator->() const { return _M_current; } __normal_iterator& operator++() { ++_M_current; return *this; } __normal_iterator operator++(int) { return __normal_iterator(_M_current++); } __normal_iterator& operator--() { --_M_current; return *this; } __normal_iterator operator--(int) { return __normal_iterator(_M_current--); } reference operator[](const difference_type& __n) const { return _M_current[__n]; } __normal_iterator& operator+=(const difference_type& __n) { _M_current += __n; return *this; } __normal_iterator operator+(const difference_type& __n) const { return __normal_iterator(_M_current + __n); } __normal_iterator& operator-=(const difference_type& __n) { _M_current -= __n; return *this; } __normal_iterator operator-(const difference_type& __n) const { return __normal_iterator(_M_current - __n); } const _Iterator& base() const { return _M_current; } }; # 730 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_iterator.h" 3 template inline bool operator==(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() == __rhs.base(); } template inline bool operator==(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() == __rhs.base(); } template inline bool operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() != __rhs.base(); } template inline bool operator!=(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() != __rhs.base(); } template inline bool operator<(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() < __rhs.base(); } template inline bool operator<(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() < __rhs.base(); } template inline bool operator>(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() > __rhs.base(); } template inline bool operator>(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() > __rhs.base(); } template inline bool operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() <= __rhs.base(); } template inline bool operator<=(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() <= __rhs.base(); } template inline bool operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() >= __rhs.base(); } template inline bool operator>=(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() >= __rhs.base(); } template inline typename __normal_iterator<_IteratorL, _Container>::difference_type operator-(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() - __rhs.base(); } template inline typename __normal_iterator<_Iterator, _Container>::difference_type operator-(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() - __rhs.base(); } template inline __normal_iterator<_Iterator, _Container> operator+(typename __normal_iterator<_Iterator, _Container>::difference_type __n, const __normal_iterator<_Iterator, _Container>& __i) { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); } } # 77 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/debug/debug.h" 1 3 # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/debug/debug.h" 3 namespace std { namespace __debug { } } namespace __gnu_cxx { namespace __debug { }; } namespace __gnu_debug { using namespace std::__debug; using namespace __gnu_cxx::__debug; } # 79 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 91 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3 template inline void swap(_Tp& __a, _Tp& __b) { _Tp __tmp = __a; __a = __b; __b = __tmp; } template struct __iter_swap { template static void iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) { typedef typename iterator_traits<_ForwardIterator1>::value_type _ValueType1; _ValueType1 __tmp = *__a; *__a = *__b; *__b = __tmp; } }; template<> struct __iter_swap { template static void iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) { swap(*__a, *__b); } }; # 141 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3 template inline void iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) { typedef typename iterator_traits<_ForwardIterator1>::value_type _ValueType1; typedef typename iterator_traits<_ForwardIterator2>::value_type _ValueType2; typedef typename iterator_traits<_ForwardIterator1>::reference _ReferenceType1; typedef typename iterator_traits<_ForwardIterator2>::reference _ReferenceType2; std::__iter_swap<__are_same<_ValueType1, _ValueType2>::__value && __are_same<_ValueType1 &, _ReferenceType1>::__value && __are_same<_ValueType2 &, _ReferenceType2>::__value>:: iter_swap(__a, __b); } # 180 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3 template inline const _Tp& min(const _Tp& __a, const _Tp& __b) { if (__b < __a) return __b; return __a; } # 202 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3 template inline const _Tp& max(const _Tp& __a, const _Tp& __b) { if (__a < __b) return __b; return __a; } # 224 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3 template inline const _Tp& min(const _Tp& __a, const _Tp& __b, _Compare __comp) { if (__comp(__b, __a)) return __b; return __a; } # 244 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3 template inline const _Tp& max(const _Tp& __a, const _Tp& __b, _Compare __comp) { if (__comp(__a, __b)) return __b; return __a; } template struct __copy { template static _OI copy(_II __first, _II __last, _OI __result) { for (; __first != __last; ++__result, ++__first) *__result = *__first; return __result; } }; template struct __copy<_BoolType, random_access_iterator_tag> { template static _OI copy(_II __first, _II __last, _OI __result) { typedef typename iterator_traits<_II>::difference_type _Distance; for(_Distance __n = __last - __first; __n > 0; --__n) { *__result = *__first; ++__first; ++__result; } return __result; } }; template<> struct __copy { template static _Tp* copy(const _Tp* __first, const _Tp* __last, _Tp* __result) { std::memmove(__result, __first, sizeof(_Tp) * (__last - __first)); return __result + (__last - __first); } }; template inline _OI __copy_aux(_II __first, _II __last, _OI __result) { typedef typename iterator_traits<_II>::value_type _ValueTypeI; typedef typename iterator_traits<_OI>::value_type _ValueTypeO; typedef typename iterator_traits<_II>::iterator_category _Category; const bool __simple = (__is_scalar<_ValueTypeI>::__value && __is_pointer<_II>::__value && __is_pointer<_OI>::__value && __are_same<_ValueTypeI, _ValueTypeO>::__value); return std::__copy<__simple, _Category>::copy(__first, __last, __result); } template typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT> >::__type __copy_aux(_CharT*, _CharT*, ostreambuf_iterator<_CharT>); template typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT> >::__type __copy_aux(const _CharT*, const _CharT*, ostreambuf_iterator<_CharT>); template typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, _CharT*>::__type __copy_aux(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, _CharT*); template struct __copy_normal { template static _OI __copy_n(_II __first, _II __last, _OI __result) { return std::__copy_aux(__first, __last, __result); } }; template<> struct __copy_normal { template static _OI __copy_n(_II __first, _II __last, _OI __result) { return std::__copy_aux(__first.base(), __last.base(), __result); } }; template<> struct __copy_normal { template static _OI __copy_n(_II __first, _II __last, _OI __result) { return _OI(std::__copy_aux(__first, __last, __result.base())); } }; template<> struct __copy_normal { template static _OI __copy_n(_II __first, _II __last, _OI __result) { return _OI(std::__copy_aux(__first.base(), __last.base(), __result.base())); } }; # 387 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3 template inline _OutputIterator copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) { ; const bool __in = __is_normal_iterator<_InputIterator>::__value; const bool __out = __is_normal_iterator<_OutputIterator>::__value; return std::__copy_normal<__in, __out>::__copy_n(__first, __last, __result); } template typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT> >::__type copy(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, ostreambuf_iterator<_CharT>); template struct __copy_backward { template static _BI2 __copy_b(_BI1 __first, _BI1 __last, _BI2 __result) { while (__first != __last) *--__result = *--__last; return __result; } }; template struct __copy_backward<_BoolType, random_access_iterator_tag> { template static _BI2 __copy_b(_BI1 __first, _BI1 __last, _BI2 __result) { typename iterator_traits<_BI1>::difference_type __n; for (__n = __last - __first; __n > 0; --__n) *--__result = *--__last; return __result; } }; template<> struct __copy_backward { template static _Tp* __copy_b(const _Tp* __first, const _Tp* __last, _Tp* __result) { const ptrdiff_t _Num = __last - __first; std::memmove(__result - _Num, __first, sizeof(_Tp) * _Num); return __result - _Num; } }; template inline _BI2 __copy_backward_aux(_BI1 __first, _BI1 __last, _BI2 __result) { typedef typename iterator_traits<_BI1>::value_type _ValueType1; typedef typename iterator_traits<_BI2>::value_type _ValueType2; typedef typename iterator_traits<_BI1>::iterator_category _Category; const bool __simple = (__is_scalar<_ValueType1>::__value && __is_pointer<_BI1>::__value && __is_pointer<_BI2>::__value && __are_same<_ValueType1, _ValueType2>::__value); return std::__copy_backward<__simple, _Category>::__copy_b(__first, __last, __result); } template struct __copy_backward_normal { template static _BI2 __copy_b_n(_BI1 __first, _BI1 __last, _BI2 __result) { return std::__copy_backward_aux(__first, __last, __result); } }; template<> struct __copy_backward_normal { template static _BI2 __copy_b_n(_BI1 __first, _BI1 __last, _BI2 __result) { return std::__copy_backward_aux(__first.base(), __last.base(), __result); } }; template<> struct __copy_backward_normal { template static _BI2 __copy_b_n(_BI1 __first, _BI1 __last, _BI2 __result) { return _BI2(std::__copy_backward_aux(__first, __last, __result.base())); } }; template<> struct __copy_backward_normal { template static _BI2 __copy_b_n(_BI1 __first, _BI1 __last, _BI2 __result) { return _BI2(std::__copy_backward_aux(__first.base(), __last.base(), __result.base())); } }; # 524 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3 template inline _BI2 copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) { ; const bool __bi1 = __is_normal_iterator<_BI1>::__value; const bool __bi2 = __is_normal_iterator<_BI2>::__value; return std::__copy_backward_normal<__bi1, __bi2>::__copy_b_n(__first, __last, __result); } template struct __fill { template static void fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { for (; __first != __last; ++__first) *__first = __value; } }; template<> struct __fill { template static void fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { const _Tp __tmp = __value; for (; __first != __last; ++__first) *__first = __tmp; } }; # 581 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3 template void fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { ; const bool __scalar = __is_scalar<_Tp>::__value; std::__fill<__scalar>::fill(__first, __last, __value); } inline void fill(unsigned char* __first, unsigned char* __last, const unsigned char& __c) { ; const unsigned char __tmp = __c; std::memset(__first, __tmp, __last - __first); } inline void fill(signed char* __first, signed char* __last, const signed char& __c) { ; const signed char __tmp = __c; std::memset(__first, static_cast(__tmp), __last - __first); } inline void fill(char* __first, char* __last, const char& __c) { ; const char __tmp = __c; std::memset(__first, static_cast(__tmp), __last - __first); } template struct __fill_n { template static _OutputIterator fill_n(_OutputIterator __first, _Size __n, const _Tp& __value) { for (; __n > 0; --__n, ++__first) *__first = __value; return __first; } }; template<> struct __fill_n { template static _OutputIterator fill_n(_OutputIterator __first, _Size __n, const _Tp& __value) { const _Tp __tmp = __value; for (; __n > 0; --__n, ++__first) *__first = __tmp; return __first; } }; # 657 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3 template _OutputIterator fill_n(_OutputIterator __first, _Size __n, const _Tp& __value) { const bool __scalar = __is_scalar<_Tp>::__value; return std::__fill_n<__scalar>::fill_n(__first, __n, __value); } template inline unsigned char* fill_n(unsigned char* __first, _Size __n, const unsigned char& __c) { std::fill(__first, __first + __n, __c); return __first + __n; } template inline signed char* fill_n(signed char* __first, _Size __n, const signed char& __c) { std::fill(__first, __first + __n, __c); return __first + __n; } template inline char* fill_n(char* __first, _Size __n, const char& __c) { std::fill(__first, __first + __n, __c); return __first + __n; } # 704 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3 template pair<_InputIterator1, _InputIterator2> mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2) { ; while (__first1 != __last1 && *__first1 == *__first2) { ++__first1; ++__first2; } return pair<_InputIterator1, _InputIterator2>(__first1, __first2); } # 739 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3 template pair<_InputIterator1, _InputIterator2> mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __binary_pred) { ; while (__first1 != __last1 && __binary_pred(*__first1, *__first2)) { ++__first1; ++__first2; } return pair<_InputIterator1, _InputIterator2>(__first1, __first2); } # 769 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3 template inline bool equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2) { ; for (; __first1 != __last1; ++__first1, ++__first2) if (!(*__first1 == *__first2)) return false; return true; } # 801 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3 template inline bool equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __binary_pred) { ; for (; __first1 != __last1; ++__first1, ++__first2) if (!__binary_pred(*__first1, *__first2)) return false; return true; } # 833 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3 template bool lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) { ; ; for (; __first1 != __last1 && __first2 != __last2; ++__first1, ++__first2) { if (*__first1 < *__first2) return true; if (*__first2 < *__first1) return false; } return __first1 == __last1 && __first2 != __last2; } # 873 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algobase.h" 3 template bool lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp) { ; ; for (; __first1 != __last1 && __first2 != __last2; ++__first1, ++__first2) { if (__comp(*__first1, *__first2)) return true; if (__comp(*__first2, *__first1)) return false; } return __first1 == __last1 && __first2 != __last2; } inline bool lexicographical_compare(const unsigned char* __first1, const unsigned char* __last1, const unsigned char* __first2, const unsigned char* __last2) { ; ; const size_t __len1 = __last1 - __first1; const size_t __len2 = __last2 - __first2; const int __result = std::memcmp(__first1, __first2, std::min(__len1, __len2)); return __result != 0 ? __result < 0 : __len1 < __len2; } inline bool lexicographical_compare(const char* __first1, const char* __last1, const char* __first2, const char* __last2) { ; ; return std::lexicographical_compare((const unsigned char*) __first1, (const unsigned char*) __last1, (const unsigned char*) __first2, (const unsigned char*) __last2); } } # 66 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/algorithm" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_construct.h" 1 3 # 65 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_construct.h" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/new" 1 3 # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/new" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/exception" 1 3 # 40 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/exception" 3 #pragma GCC visibility push(default) extern "C++" { namespace std { # 56 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/exception" 3 class exception { public: exception() throw() { } virtual ~exception() throw(); virtual const char* what() const throw(); }; class bad_exception : public exception { public: bad_exception() throw() { } virtual ~bad_exception() throw(); virtual const char* what() const throw(); }; typedef void (*terminate_handler) (); typedef void (*unexpected_handler) (); terminate_handler set_terminate(terminate_handler) throw(); void terminate() __attribute__ ((__noreturn__)); unexpected_handler set_unexpected(unexpected_handler) throw(); void unexpected() __attribute__ ((__noreturn__)); # 106 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/exception" 3 bool uncaught_exception() throw(); } namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { # 121 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/exception" 3 void __verbose_terminate_handler (); } } #pragma GCC visibility pop # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/new" 2 3 #pragma GCC visibility push(default) extern "C++" { namespace std { class bad_alloc : public exception { public: bad_alloc() throw() { } virtual ~bad_alloc() throw(); virtual const char* what() const throw(); }; struct nothrow_t { }; extern const nothrow_t nothrow; typedef void (*new_handler)(); new_handler set_new_handler(new_handler) throw(); } # 89 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/new" 3 void* operator new(std::size_t) throw (std::bad_alloc); void* operator new[](std::size_t) throw (std::bad_alloc); void operator delete(void*) throw(); void operator delete[](void*) throw(); void* operator new(std::size_t, const std::nothrow_t&) throw(); void* operator new[](std::size_t, const std::nothrow_t&) throw(); void operator delete(void*, const std::nothrow_t&) throw(); void operator delete[](void*, const std::nothrow_t&) throw(); inline void* operator new(std::size_t, void* __p) throw() { return __p; } inline void* operator new[](std::size_t, void* __p) throw() { return __p; } inline void operator delete (void*, void*) throw() { } inline void operator delete[](void*, void*) throw() { } } #pragma GCC visibility pop # 66 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_construct.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template inline void _Construct(_T1* __p, const _T2& __value) { ::new(static_cast(__p)) _T1(__value); } template inline void _Construct(_T1* __p) { ::new(static_cast(__p)) _T1(); } template inline void _Destroy(_Tp* __pointer) { __pointer->~_Tp(); } # 116 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_construct.h" 3 template inline void __destroy_aux(_ForwardIterator __first, _ForwardIterator __last, __false_type) { for (; __first != __last; ++__first) std::_Destroy(&*__first); } # 134 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_construct.h" 3 template inline void __destroy_aux(_ForwardIterator, _ForwardIterator, __true_type) { } # 146 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_construct.h" 3 template inline void _Destroy(_ForwardIterator __first, _ForwardIterator __last) { typedef typename iterator_traits<_ForwardIterator>::value_type _Value_type; typedef typename std::__is_scalar<_Value_type>::__type _Has_trivial_destructor; std::__destroy_aux(__first, __last, _Has_trivial_destructor()); } # 166 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_construct.h" 3 template class allocator; template void _Destroy(_ForwardIterator __first, _ForwardIterator __last, _Allocator __alloc) { for (; __first != __last; ++__first) __alloc.destroy(&*__first); } template inline void _Destroy(_ForwardIterator __first, _ForwardIterator __last, allocator<_Tp>) { _Destroy(__first, __last); } } # 67 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/algorithm" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_uninitialized.h" 1 3 # 67 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_uninitialized.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template inline _ForwardIterator __uninitialized_copy_aux(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, __true_type) { return std::copy(__first, __last, __result); } template inline _ForwardIterator __uninitialized_copy_aux(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, __false_type) { _ForwardIterator __cur = __result; try { for (; __first != __last; ++__first, ++__cur) std::_Construct(&*__cur, *__first); return __cur; } catch(...) { std::_Destroy(__result, __cur); throw; } } # 106 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_uninitialized.h" 3 template inline _ForwardIterator uninitialized_copy(_InputIterator __first, _InputIterator __last, _ForwardIterator __result) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; typedef typename std::__is_scalar<_ValueType>::__type _Is_POD; return std::__uninitialized_copy_aux(__first, __last, __result, _Is_POD()); } inline char* uninitialized_copy(const char* __first, const char* __last, char* __result) { std::memmove(__result, __first, __last - __first); return __result + (__last - __first); } inline wchar_t* uninitialized_copy(const wchar_t* __first, const wchar_t* __last, wchar_t* __result) { std::memmove(__result, __first, sizeof(wchar_t) * (__last - __first)); return __result + (__last - __first); } template inline void __uninitialized_fill_aux(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x, __true_type) { std::fill(__first, __last, __x); } template void __uninitialized_fill_aux(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x, __false_type) { _ForwardIterator __cur = __first; try { for (; __cur != __last; ++__cur) std::_Construct(&*__cur, __x); } catch(...) { std::_Destroy(__first, __cur); throw; } } # 168 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_uninitialized.h" 3 template inline void uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; typedef typename std::__is_scalar<_ValueType>::__type _Is_POD; std::__uninitialized_fill_aux(__first, __last, __x, _Is_POD()); } template inline void __uninitialized_fill_n_aux(_ForwardIterator __first, _Size __n, const _Tp& __x, __true_type) { std::fill_n(__first, __n, __x); } template void __uninitialized_fill_n_aux(_ForwardIterator __first, _Size __n, const _Tp& __x, __false_type) { _ForwardIterator __cur = __first; try { for (; __n > 0; --__n, ++__cur) std::_Construct(&*__cur, __x); } catch(...) { std::_Destroy(__first, __cur); throw; } } # 213 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_uninitialized.h" 3 template inline void uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; typedef typename std::__is_scalar<_ValueType>::__type _Is_POD; std::__uninitialized_fill_n_aux(__first, __n, __x, _Is_POD()); } template _ForwardIterator __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, _Allocator __alloc) { _ForwardIterator __cur = __result; try { for (; __first != __last; ++__first, ++__cur) __alloc.construct(&*__cur, *__first); return __cur; } catch(...) { std::_Destroy(__result, __cur, __alloc); throw; } } template inline _ForwardIterator __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, allocator<_Tp>) { return std::uninitialized_copy(__first, __last, __result); } template void __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x, _Allocator __alloc) { _ForwardIterator __cur = __first; try { for (; __cur != __last; ++__cur) __alloc.construct(&*__cur, __x); } catch(...) { std::_Destroy(__first, __cur, __alloc); throw; } } template inline void __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x, allocator<_Tp2>) { std::uninitialized_fill(__first, __last, __x); } template void __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, const _Tp& __x, _Allocator __alloc) { _ForwardIterator __cur = __first; try { for (; __n > 0; --__n, ++__cur) __alloc.construct(&*__cur, __x); } catch(...) { std::_Destroy(__first, __cur, __alloc); throw; } } template inline void __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, const _Tp& __x, allocator<_Tp2>) { std::uninitialized_fill_n(__first, __n, __x); } # 318 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_uninitialized.h" 3 template inline _ForwardIterator __uninitialized_copy_copy(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _ForwardIterator __result, _Allocator __alloc) { _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1, __result, __alloc); try { return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc); } catch(...) { std::_Destroy(__result, __mid, __alloc); throw; } } template inline _ForwardIterator __uninitialized_fill_copy(_ForwardIterator __result, _ForwardIterator __mid, const _Tp& __x, _InputIterator __first, _InputIterator __last, _Allocator __alloc) { std::__uninitialized_fill_a(__result, __mid, __x, __alloc); try { return std::__uninitialized_copy_a(__first, __last, __mid, __alloc); } catch(...) { std::_Destroy(__result, __mid, __alloc); throw; } } template inline void __uninitialized_copy_fill(_InputIterator __first1, _InputIterator __last1, _ForwardIterator __first2, _ForwardIterator __last2, const _Tp& __x, _Allocator __alloc) { _ForwardIterator __mid2 = std::__uninitialized_copy_a(__first1, __last1, __first2, __alloc); try { std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc); } catch(...) { std::_Destroy(__first2, __mid2, __alloc); throw; } } } # 68 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/algorithm" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 1 3 # 65 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_heap.h" 1 3 # 65 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_heap.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template bool __is_heap(_RandomAccessIterator __first, _Distance __n) { _Distance __parent = 0; for (_Distance __child = 1; __child < __n; ++__child) { if (__first[__parent] < __first[__child]) return false; if ((__child & 1) == 0) ++__parent; } return true; } template bool __is_heap(_RandomAccessIterator __first, _StrictWeakOrdering __comp, _Distance __n) { _Distance __parent = 0; for (_Distance __child = 1; __child < __n; ++__child) { if (__comp(__first[__parent], __first[__child])) return false; if ((__child & 1) == 0) ++__parent; } return true; } template bool __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { return std::__is_heap(__first, std::distance(__first, __last)); } template bool __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _StrictWeakOrdering __comp) { return std::__is_heap(__first, __comp, std::distance(__first, __last)); } template void __push_heap(_RandomAccessIterator __first, _Distance __holeIndex, _Distance __topIndex, _Tp __value) { _Distance __parent = (__holeIndex - 1) / 2; while (__holeIndex > __topIndex && *(__first + __parent) < __value) { *(__first + __holeIndex) = *(__first + __parent); __holeIndex = __parent; __parent = (__holeIndex - 1) / 2; } *(__first + __holeIndex) = __value; } # 139 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_heap.h" 3 template inline void push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; ; std::__push_heap(__first, _DistanceType((__last - __first) - 1), _DistanceType(0), _ValueType(*(__last - 1))); } template void __push_heap(_RandomAccessIterator __first, _Distance __holeIndex, _Distance __topIndex, _Tp __value, _Compare __comp) { _Distance __parent = (__holeIndex - 1) / 2; while (__holeIndex > __topIndex && __comp(*(__first + __parent), __value)) { *(__first + __holeIndex) = *(__first + __parent); __holeIndex = __parent; __parent = (__holeIndex - 1) / 2; } *(__first + __holeIndex) = __value; } # 187 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_heap.h" 3 template inline void push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; ; ; std::__push_heap(__first, _DistanceType((__last - __first) - 1), _DistanceType(0), _ValueType(*(__last - 1)), __comp); } template void __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, _Distance __len, _Tp __value) { const _Distance __topIndex = __holeIndex; _Distance __secondChild = 2 * __holeIndex + 2; while (__secondChild < __len) { if (*(__first + __secondChild) < *(__first + (__secondChild - 1))) __secondChild--; *(__first + __holeIndex) = *(__first + __secondChild); __holeIndex = __secondChild; __secondChild = 2 * (__secondChild + 1); } if (__secondChild == __len) { *(__first + __holeIndex) = *(__first + (__secondChild - 1)); __holeIndex = __secondChild - 1; } std::__push_heap(__first, __holeIndex, __topIndex, __value); } template inline void __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _RandomAccessIterator __result, _Tp __value) { typedef typename iterator_traits<_RandomAccessIterator>::difference_type _Distance; *__result = *__first; std::__adjust_heap(__first, _Distance(0), _Distance(__last - __first), __value); } # 251 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_heap.h" 3 template inline void pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; ; ; std::__pop_heap(__first, __last - 1, __last - 1, _ValueType(*(__last - 1))); } template void __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, _Distance __len, _Tp __value, _Compare __comp) { const _Distance __topIndex = __holeIndex; _Distance __secondChild = 2 * __holeIndex + 2; while (__secondChild < __len) { if (__comp(*(__first + __secondChild), *(__first + (__secondChild - 1)))) __secondChild--; *(__first + __holeIndex) = *(__first + __secondChild); __holeIndex = __secondChild; __secondChild = 2 * (__secondChild + 1); } if (__secondChild == __len) { *(__first + __holeIndex) = *(__first + (__secondChild - 1)); __holeIndex = __secondChild - 1; } std::__push_heap(__first, __holeIndex, __topIndex, __value, __comp); } template inline void __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _RandomAccessIterator __result, _Tp __value, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::difference_type _Distance; *__result = *__first; std::__adjust_heap(__first, _Distance(0), _Distance(__last - __first), __value, __comp); } # 317 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_heap.h" 3 template inline void pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { ; ; typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; std::__pop_heap(__first, __last - 1, __last - 1, _ValueType(*(__last - 1)), __comp); } # 342 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_heap.h" 3 template void make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; ; if (__last - __first < 2) return; const _DistanceType __len = __last - __first; _DistanceType __parent = (__len - 2) / 2; while (true) { std::__adjust_heap(__first, __parent, __len, _ValueType(*(__first + __parent))); if (__parent == 0) return; __parent--; } } # 382 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_heap.h" 3 template inline void make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; ; if (__last - __first < 2) return; const _DistanceType __len = __last - __first; _DistanceType __parent = (__len - 2) / 2; while (true) { std::__adjust_heap(__first, __parent, __len, _ValueType(*(__first + __parent)), __comp); if (__parent == 0) return; __parent--; } } # 420 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_heap.h" 3 template void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { ; while (__last - __first > 1) std::pop_heap(__first, _RandomAccessIterator(__last--)); } # 446 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_heap.h" 3 template void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { ; ; while (__last - __first > 1) std::pop_heap(__first, _RandomAccessIterator(__last--), __comp); } } # 66 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_tempbuf.h" 1 3 # 65 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_tempbuf.h" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 1 3 # 51 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3 # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/allocator.h" 1 3 # 53 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/allocator.h" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++allocator.h" 1 3 # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++allocator.h" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/new_allocator.h" 1 3 # 40 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/new_allocator.h" 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { using std::size_t; using std::ptrdiff_t; # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/new_allocator.h" 3 template class new_allocator { public: typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Tp* pointer; typedef const _Tp* const_pointer; typedef _Tp& reference; typedef const _Tp& const_reference; typedef _Tp value_type; template struct rebind { typedef new_allocator<_Tp1> other; }; new_allocator() throw() { } new_allocator(const new_allocator&) throw() { } template new_allocator(const new_allocator<_Tp1>&) throw() { } ~new_allocator() throw() { } pointer address(reference __x) const { return &__x; } const_pointer address(const_reference __x) const { return &__x; } pointer allocate(size_type __n, const void* = 0) { if (__builtin_expect(__n > this->max_size(), false)) std::__throw_bad_alloc(); return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); } void deallocate(pointer __p, size_type) { ::operator delete(__p); } size_type max_size() const throw() { return size_t(-1) / sizeof(_Tp); } void construct(pointer __p, const _Tp& __val) { ::new(__p) _Tp(__val); } void destroy(pointer __p) { __p->~_Tp(); } }; template inline bool operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&) { return true; } template inline bool operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&) { return false; } } # 40 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/c++allocator.h" 2 3 # 54 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/allocator.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template class allocator; template<> class allocator { public: typedef size_t size_type; typedef ptrdiff_t difference_type; typedef void* pointer; typedef const void* const_pointer; typedef void value_type; template struct rebind { typedef allocator<_Tp1> other; }; }; template class allocator: public __gnu_cxx::new_allocator<_Tp> { public: typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Tp* pointer; typedef const _Tp* const_pointer; typedef _Tp& reference; typedef const _Tp& const_reference; typedef _Tp value_type; template struct rebind { typedef allocator<_Tp1> other; }; allocator() throw() { } allocator(const allocator& __a) throw() : __gnu_cxx::new_allocator<_Tp>(__a) { } template allocator(const allocator<_Tp1>&) throw() { } ~allocator() throw() { } }; template inline bool operator==(const allocator<_T1>&, const allocator<_T2>&) { return true; } template inline bool operator!=(const allocator<_T1>&, const allocator<_T2>&) { return false; } extern template class allocator; extern template class allocator; template::__value> struct __alloc_swap { static void _S_do_it(_Alloc&, _Alloc&) { } }; template struct __alloc_swap<_Alloc, false> { static void _S_do_it(_Alloc& __one, _Alloc& __two) { if (__one != __two) swap(__one, __two); } }; } # 55 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_raw_storage_iter.h" 1 3 # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_raw_storage_iter.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template class raw_storage_iterator : public iterator { protected: _ForwardIterator _M_iter; public: explicit raw_storage_iterator(_ForwardIterator __x) : _M_iter(__x) {} raw_storage_iterator& operator*() { return *this; } raw_storage_iterator& operator=(const _Tp& __element) { std::_Construct(&*_M_iter, __element); return *this; } raw_storage_iterator<_ForwardIterator, _Tp>& operator++() { ++_M_iter; return *this; } raw_storage_iterator<_ForwardIterator, _Tp> operator++(int) { raw_storage_iterator<_ForwardIterator, _Tp> __tmp = *this; ++_M_iter; return __tmp; } }; } # 59 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/limits" 1 3 # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/limits" 3 # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/limits" 3 # 150 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/limits" 3 namespace std __attribute__ ((__visibility__ ("default"))) { enum float_round_style { round_indeterminate = -1, round_toward_zero = 0, round_to_nearest = 1, round_toward_infinity = 2, round_toward_neg_infinity = 3 }; enum float_denorm_style { denorm_indeterminate = -1, denorm_absent = 0, denorm_present = 1 }; # 192 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/limits" 3 struct __numeric_limits_base { static const bool is_specialized = false; static const int digits = 0; static const int digits10 = 0; static const bool is_signed = false; static const bool is_integer = false; static const bool is_exact = false; static const int radix = 0; static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static const bool is_iec559 = false; static const bool is_bounded = false; static const bool is_modulo = false; static const bool traps = false; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; # 285 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/limits" 3 template struct numeric_limits : public __numeric_limits_base { static _Tp min() throw() { return static_cast<_Tp>(0); } static _Tp max() throw() { return static_cast<_Tp>(0); } static _Tp epsilon() throw() { return static_cast<_Tp>(0); } static _Tp round_error() throw() { return static_cast<_Tp>(0); } static _Tp infinity() throw() { return static_cast<_Tp>(0); } static _Tp quiet_NaN() throw() { return static_cast<_Tp>(0); } static _Tp signaling_NaN() throw() { return static_cast<_Tp>(0); } static _Tp denorm_min() throw() { return static_cast<_Tp>(0); } }; template<> struct numeric_limits { static const bool is_specialized = true; static bool min() throw() { return false; } static bool max() throw() { return true; } static const int digits = 1; static const int digits10 = 0; static const bool is_signed = false; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static bool epsilon() throw() { return false; } static bool round_error() throw() { return false; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static bool infinity() throw() { return false; } static bool quiet_NaN() throw() { return false; } static bool signaling_NaN() throw() { return false; } static bool denorm_min() throw() { return false; } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = false; static const bool traps = false; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static char min() throw() { return (((char)(-1) < 0) ? (char)1 << (sizeof(char) * 8 - ((char)(-1) < 0)) : (char)0); } static char max() throw() { return (((char)(-1) < 0) ? ((char)1 << (sizeof(char) * 8 - ((char)(-1) < 0))) - 1 : ~(char)0); } static const int digits = (sizeof(char) * 8 - ((char)(-1) < 0)); static const int digits10 = ((sizeof(char) * 8 - ((char)(-1) < 0)) * 643 / 2136); static const bool is_signed = ((char)(-1) < 0); static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static char epsilon() throw() { return 0; } static char round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static char infinity() throw() { return char(); } static char quiet_NaN() throw() { return char(); } static char signaling_NaN() throw() { return char(); } static char denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = false; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static signed char min() throw() { return -127 - 1; } static signed char max() throw() { return 127; } static const int digits = (sizeof(signed char) * 8 - ((signed char)(-1) < 0)); static const int digits10 = ((sizeof(signed char) * 8 - ((signed char)(-1) < 0)) * 643 / 2136); static const bool is_signed = true; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static signed char epsilon() throw() { return 0; } static signed char round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static signed char infinity() throw() { return static_cast(0); } static signed char quiet_NaN() throw() { return static_cast(0); } static signed char signaling_NaN() throw() { return static_cast(0); } static signed char denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = false; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static unsigned char min() throw() { return 0; } static unsigned char max() throw() { return 127 * 2U + 1; } static const int digits = (sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)); static const int digits10 = ((sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)) * 643 / 2136); static const bool is_signed = false; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static unsigned char epsilon() throw() { return 0; } static unsigned char round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static unsigned char infinity() throw() { return static_cast(0); } static unsigned char quiet_NaN() throw() { return static_cast(0); } static unsigned char signaling_NaN() throw() { return static_cast(0); } static unsigned char denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = false; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static wchar_t min() throw() { return (((wchar_t)(-1) < 0) ? (wchar_t)1 << (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) : (wchar_t)0); } static wchar_t max() throw() { return (((wchar_t)(-1) < 0) ? ((wchar_t)1 << (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0))) - 1 : ~(wchar_t)0); } static const int digits = (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)); static const int digits10 = ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) * 643 / 2136); static const bool is_signed = ((wchar_t)(-1) < 0); static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static wchar_t epsilon() throw() { return 0; } static wchar_t round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static wchar_t infinity() throw() { return wchar_t(); } static wchar_t quiet_NaN() throw() { return wchar_t(); } static wchar_t signaling_NaN() throw() { return wchar_t(); } static wchar_t denorm_min() throw() { return wchar_t(); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = false; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static short min() throw() { return -32767 - 1; } static short max() throw() { return 32767; } static const int digits = (sizeof(short) * 8 - ((short)(-1) < 0)); static const int digits10 = ((sizeof(short) * 8 - ((short)(-1) < 0)) * 643 / 2136); static const bool is_signed = true; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static short epsilon() throw() { return 0; } static short round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static short infinity() throw() { return short(); } static short quiet_NaN() throw() { return short(); } static short signaling_NaN() throw() { return short(); } static short denorm_min() throw() { return short(); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = false; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static unsigned short min() throw() { return 0; } static unsigned short max() throw() { return 32767 * 2U + 1; } static const int digits = (sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)); static const int digits10 = ((sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)) * 643 / 2136); static const bool is_signed = false; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static unsigned short epsilon() throw() { return 0; } static unsigned short round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static unsigned short infinity() throw() { return static_cast(0); } static unsigned short quiet_NaN() throw() { return static_cast(0); } static unsigned short signaling_NaN() throw() { return static_cast(0); } static unsigned short denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = false; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static int min() throw() { return -2147483647 - 1; } static int max() throw() { return 2147483647; } static const int digits = (sizeof(int) * 8 - ((int)(-1) < 0)); static const int digits10 = ((sizeof(int) * 8 - ((int)(-1) < 0)) * 643 / 2136); static const bool is_signed = true; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static int epsilon() throw() { return 0; } static int round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static int infinity() throw() { return static_cast(0); } static int quiet_NaN() throw() { return static_cast(0); } static int signaling_NaN() throw() { return static_cast(0); } static int denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = false; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static unsigned int min() throw() { return 0; } static unsigned int max() throw() { return 2147483647 * 2U + 1; } static const int digits = (sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)); static const int digits10 = ((sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)) * 643 / 2136); static const bool is_signed = false; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static unsigned int epsilon() throw() { return 0; } static unsigned int round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static unsigned int infinity() throw() { return static_cast(0); } static unsigned int quiet_NaN() throw() { return static_cast(0); } static unsigned int signaling_NaN() throw() { return static_cast(0); } static unsigned int denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = false; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static long min() throw() { return -2147483647L - 1; } static long max() throw() { return 2147483647L; } static const int digits = (sizeof(long) * 8 - ((long)(-1) < 0)); static const int digits10 = ((sizeof(long) * 8 - ((long)(-1) < 0)) * 643 / 2136); static const bool is_signed = true; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static long epsilon() throw() { return 0; } static long round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static long infinity() throw() { return static_cast(0); } static long quiet_NaN() throw() { return static_cast(0); } static long signaling_NaN() throw() { return static_cast(0); } static long denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = false; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static unsigned long min() throw() { return 0; } static unsigned long max() throw() { return 2147483647L * 2UL + 1; } static const int digits = (sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)); static const int digits10 = ((sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)) * 643 / 2136); static const bool is_signed = false; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static unsigned long epsilon() throw() { return 0; } static unsigned long round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static unsigned long infinity() throw() { return static_cast(0); } static unsigned long quiet_NaN() throw() { return static_cast(0); } static unsigned long signaling_NaN() throw() { return static_cast(0); } static unsigned long denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = false; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static long long min() throw() { return -9223372036854775807LL - 1; } static long long max() throw() { return 9223372036854775807LL; } static const int digits = (sizeof(long long) * 8 - ((long long)(-1) < 0)); static const int digits10 = ((sizeof(long long) * 8 - ((long long)(-1) < 0)) * 643 / 2136); static const bool is_signed = true; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static long long epsilon() throw() { return 0; } static long long round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static long long infinity() throw() { return static_cast(0); } static long long quiet_NaN() throw() { return static_cast(0); } static long long signaling_NaN() throw() { return static_cast(0); } static long long denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = false; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static unsigned long long min() throw() { return 0; } static unsigned long long max() throw() { return 9223372036854775807LL * 2ULL + 1; } static const int digits = (sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)); static const int digits10 = ((sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)) * 643 / 2136); static const bool is_signed = false; static const bool is_integer = true; static const bool is_exact = true; static const int radix = 2; static unsigned long long epsilon() throw() { return 0; } static unsigned long long round_error() throw() { return 0; } static const int min_exponent = 0; static const int min_exponent10 = 0; static const int max_exponent = 0; static const int max_exponent10 = 0; static const bool has_infinity = false; static const bool has_quiet_NaN = false; static const bool has_signaling_NaN = false; static const float_denorm_style has_denorm = denorm_absent; static const bool has_denorm_loss = false; static unsigned long long infinity() throw() { return static_cast(0); } static unsigned long long quiet_NaN() throw() { return static_cast(0); } static unsigned long long signaling_NaN() throw() { return static_cast(0); } static unsigned long long denorm_min() throw() { return static_cast(0); } static const bool is_iec559 = false; static const bool is_bounded = true; static const bool is_modulo = true; static const bool traps = false; static const bool tinyness_before = false; static const float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static const bool is_specialized = true; static float min() throw() { return 1.17549435e-38F; } static float max() throw() { return 3.40282347e+38F; } static const int digits = 24; static const int digits10 = 6; static const bool is_signed = true; static const bool is_integer = false; static const bool is_exact = false; static const int radix = 2; static float epsilon() throw() { return 1.19209290e-7F; } static float round_error() throw() { return 0.5F; } static const int min_exponent = (-125); static const int min_exponent10 = (-37); static const int max_exponent = 128; static const int max_exponent10 = 38; static const bool has_infinity = 1; static const bool has_quiet_NaN = 1; static const bool has_signaling_NaN = has_quiet_NaN; static const float_denorm_style has_denorm = bool(1) ? denorm_present : denorm_absent; static const bool has_denorm_loss = false; static float infinity() throw() { return __builtin_huge_valf (); } static float quiet_NaN() throw() { return __builtin_nanf (""); } static float signaling_NaN() throw() { return __builtin_nansf (""); } static float denorm_min() throw() { return 1.40129846e-45F; } static const bool is_iec559 = has_infinity && has_quiet_NaN && has_denorm == denorm_present; static const bool is_bounded = true; static const bool is_modulo = false; static const bool traps = false; static const bool tinyness_before = false; static const float_round_style round_style = round_to_nearest; }; template<> struct numeric_limits { static const bool is_specialized = true; static double min() throw() { return 2.2250738585072014e-308; } static double max() throw() { return 1.7976931348623157e+308; } static const int digits = 53; static const int digits10 = 15; static const bool is_signed = true; static const bool is_integer = false; static const bool is_exact = false; static const int radix = 2; static double epsilon() throw() { return 2.2204460492503131e-16; } static double round_error() throw() { return 0.5; } static const int min_exponent = (-1021); static const int min_exponent10 = (-307); static const int max_exponent = 1024; static const int max_exponent10 = 308; static const bool has_infinity = 1; static const bool has_quiet_NaN = 1; static const bool has_signaling_NaN = has_quiet_NaN; static const float_denorm_style has_denorm = bool(1) ? denorm_present : denorm_absent; static const bool has_denorm_loss = false; static double infinity() throw() { return __builtin_huge_val(); } static double quiet_NaN() throw() { return __builtin_nan (""); } static double signaling_NaN() throw() { return __builtin_nans (""); } static double denorm_min() throw() { return 4.9406564584124654e-324; } static const bool is_iec559 = has_infinity && has_quiet_NaN && has_denorm == denorm_present; static const bool is_bounded = true; static const bool is_modulo = false; static const bool traps = false; static const bool tinyness_before = false; static const float_round_style round_style = round_to_nearest; }; template<> struct numeric_limits { static const bool is_specialized = true; static long double min() throw() { return 2.00416836000897277799610805135016e-292L; } static long double max() throw() { return 1.79769313486231580793728971405301e+308L; } static const int digits = 106; static const int digits10 = 31; static const bool is_signed = true; static const bool is_integer = false; static const bool is_exact = false; static const int radix = 2; static long double epsilon() throw() { return 4.94065645841246544176568792868221e-324L; } static long double round_error() throw() { return 0.5L; } static const int min_exponent = (-968); static const int min_exponent10 = (-291); static const int max_exponent = 1024; static const int max_exponent10 = 308; static const bool has_infinity = 1; static const bool has_quiet_NaN = 1; static const bool has_signaling_NaN = has_quiet_NaN; static const float_denorm_style has_denorm = bool(1) ? denorm_present : denorm_absent; static const bool has_denorm_loss = false; static long double infinity() throw() { return __builtin_huge_vall (); } static long double quiet_NaN() throw() { return __builtin_nanl (""); } static long double signaling_NaN() throw() { return __builtin_nansl (""); } static long double denorm_min() throw() { return 4.94065645841246544176568792868221e-324L; } static const bool is_iec559 = has_infinity && has_quiet_NaN && has_denorm == denorm_present; static const bool is_bounded = true; static const bool is_modulo = false; static const bool traps = false; static const bool tinyness_before = false; static const float_round_style round_style = round_to_nearest; }; } # 61 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 72 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3 template pair<_Tp*, ptrdiff_t> __get_temporary_buffer(ptrdiff_t __len, _Tp*) { const ptrdiff_t __max = numeric_limits::max() / sizeof(_Tp); if (__len > __max) __len = __max; while (__len > 0) { _Tp* __tmp = static_cast<_Tp*>(::operator new(__len * sizeof(_Tp), nothrow)); if (__tmp != 0) return pair<_Tp*, ptrdiff_t>(__tmp, __len); __len /= 2; } return pair<_Tp*, ptrdiff_t>(static_cast<_Tp*>(0), 0); } # 108 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3 template inline pair<_Tp*, ptrdiff_t> get_temporary_buffer(ptrdiff_t __len) { return std::__get_temporary_buffer(__len, static_cast<_Tp*>(0)); } # 120 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3 template void return_temporary_buffer(_Tp* __p) { ::operator delete(__p, nothrow); } # 132 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3 template struct auto_ptr_ref { _Tp1* _M_ptr; explicit auto_ptr_ref(_Tp1* __p): _M_ptr(__p) { } }; # 173 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3 template class auto_ptr { private: _Tp* _M_ptr; public: typedef _Tp element_type; explicit auto_ptr(element_type* __p = 0) throw() : _M_ptr(__p) { } # 199 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3 auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) { } # 211 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3 template auto_ptr(auto_ptr<_Tp1>& __a) throw() : _M_ptr(__a.release()) { } # 222 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3 auto_ptr& operator=(auto_ptr& __a) throw() { reset(__a.release()); return *this; } # 239 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3 template auto_ptr& operator=(auto_ptr<_Tp1>& __a) throw() { reset(__a.release()); return *this; } # 259 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3 ~auto_ptr() { delete _M_ptr; } # 269 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3 element_type& operator*() const throw() { ; return *_M_ptr; } element_type* operator->() const throw() { ; return _M_ptr; } # 299 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3 element_type* get() const throw() { return _M_ptr; } # 313 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3 element_type* release() throw() { element_type* __tmp = _M_ptr; _M_ptr = 0; return __tmp; } # 328 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3 void reset(element_type* __p = 0) throw() { if (__p != _M_ptr) { delete _M_ptr; _M_ptr = __p; } } # 349 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/memory" 3 auto_ptr(auto_ptr_ref __ref) throw() : _M_ptr(__ref._M_ptr) { } auto_ptr& operator=(auto_ptr_ref __ref) throw() { if (__ref._M_ptr != this->get()) { delete _M_ptr; _M_ptr = __ref._M_ptr; } return *this; } template operator auto_ptr_ref<_Tp1>() throw() { return auto_ptr_ref<_Tp1>(this->release()); } template operator auto_ptr<_Tp1>() throw() { return auto_ptr<_Tp1>(this->release()); } }; } # 66 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_tempbuf.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 76 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_tempbuf.h" 3 template class _Temporary_buffer { public: typedef _Tp value_type; typedef value_type* pointer; typedef pointer iterator; typedef ptrdiff_t size_type; protected: size_type _M_original_len; size_type _M_len; pointer _M_buffer; void _M_initialize_buffer(const _Tp&, __true_type) { } void _M_initialize_buffer(const _Tp& __val, __false_type) { std::uninitialized_fill_n(_M_buffer, _M_len, __val); } public: size_type size() const { return _M_len; } size_type requested_size() const { return _M_original_len; } iterator begin() { return _M_buffer; } iterator end() { return _M_buffer + _M_len; } _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last); ~_Temporary_buffer() { std::_Destroy(_M_buffer, _M_buffer + _M_len); std::return_temporary_buffer(_M_buffer); } private: _Temporary_buffer(const _Temporary_buffer&); void operator=(const _Temporary_buffer&); }; template _Temporary_buffer<_ForwardIterator, _Tp>:: _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) : _M_original_len(std::distance(__first, __last)), _M_len(0), _M_buffer(0) { typedef typename std::__is_scalar<_Tp>::__type _Trivial; try { pair __p(get_temporary_buffer< value_type>(_M_original_len)); _M_buffer = __p.first; _M_len = __p.second; if (_M_len > 0) _M_initialize_buffer(*__first, _Trivial()); } catch(...) { std::return_temporary_buffer(_M_buffer); _M_buffer = 0; _M_len = 0; throw; } } } # 67 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 85 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template inline const _Tp& __median(const _Tp& __a, const _Tp& __b, const _Tp& __c) { if (__a < __b) if (__b < __c) return __b; else if (__a < __c) return __c; else return __a; else if (__a < __c) return __a; else if (__b < __c) return __c; else return __b; } # 119 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template inline const _Tp& __median(const _Tp& __a, const _Tp& __b, const _Tp& __c, _Compare __comp) { if (__comp(__a, __b)) if (__comp(__b, __c)) return __b; else if (__comp(__a, __c)) return __c; else return __a; else if (__comp(__a, __c)) return __a; else if (__comp(__b, __c)) return __c; else return __b; } # 151 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _Function for_each(_InputIterator __first, _InputIterator __last, _Function __f) { ; for ( ; __first != __last; ++__first) __f(*__first); return __f; } template inline _InputIterator __find(_InputIterator __first, _InputIterator __last, const _Tp& __val, input_iterator_tag) { while (__first != __last && !(*__first == __val)) ++__first; return __first; } template inline _InputIterator __find_if(_InputIterator __first, _InputIterator __last, _Predicate __pred, input_iterator_tag) { while (__first != __last && !__pred(*__first)) ++__first; return __first; } template _RandomAccessIterator __find(_RandomAccessIterator __first, _RandomAccessIterator __last, const _Tp& __val, random_access_iterator_tag) { typename iterator_traits<_RandomAccessIterator>::difference_type __trip_count = (__last - __first) >> 2; for ( ; __trip_count > 0 ; --__trip_count) { if (*__first == __val) return __first; ++__first; if (*__first == __val) return __first; ++__first; if (*__first == __val) return __first; ++__first; if (*__first == __val) return __first; ++__first; } switch (__last - __first) { case 3: if (*__first == __val) return __first; ++__first; case 2: if (*__first == __val) return __first; ++__first; case 1: if (*__first == __val) return __first; ++__first; case 0: default: return __last; } } template _RandomAccessIterator __find_if(_RandomAccessIterator __first, _RandomAccessIterator __last, _Predicate __pred, random_access_iterator_tag) { typename iterator_traits<_RandomAccessIterator>::difference_type __trip_count = (__last - __first) >> 2; for ( ; __trip_count > 0 ; --__trip_count) { if (__pred(*__first)) return __first; ++__first; if (__pred(*__first)) return __first; ++__first; if (__pred(*__first)) return __first; ++__first; if (__pred(*__first)) return __first; ++__first; } switch (__last - __first) { case 3: if (__pred(*__first)) return __first; ++__first; case 2: if (__pred(*__first)) return __first; ++__first; case 1: if (__pred(*__first)) return __first; ++__first; case 0: default: return __last; } } template typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, istreambuf_iterator<_CharT> >::__type find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT&); # 316 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template inline _InputIterator find(_InputIterator __first, _InputIterator __last, const _Tp& __val) { ; return std::__find(__first, __last, __val, std::__iterator_category(__first)); } # 338 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template inline _InputIterator find_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) { ; return std::__find_if(__first, __last, __pred, std::__iterator_category(__first)); } # 360 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _ForwardIterator adjacent_find(_ForwardIterator __first, _ForwardIterator __last) { ; if (__first == __last) return __last; _ForwardIterator __next = __first; while(++__next != __last) { if (*__first == *__next) return __first; __first = __next; } return __last; } # 391 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _ForwardIterator adjacent_find(_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __binary_pred) { ; if (__first == __last) return __last; _ForwardIterator __next = __first; while(++__next != __last) { if (__binary_pred(*__first, *__next)) return __first; __first = __next; } return __last; } # 422 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template typename iterator_traits<_InputIterator>::difference_type count(_InputIterator __first, _InputIterator __last, const _Tp& __value) { ; typename iterator_traits<_InputIterator>::difference_type __n = 0; for ( ; __first != __last; ++__first) if (*__first == __value) ++__n; return __n; } # 446 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template typename iterator_traits<_InputIterator>::difference_type count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) { ; typename iterator_traits<_InputIterator>::difference_type __n = 0; for ( ; __first != __last; ++__first) if (__pred(*__first)) ++__n; return __n; } # 485 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _ForwardIterator1 search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2) { ; ; if (__first1 == __last1 || __first2 == __last2) return __first1; _ForwardIterator2 __tmp(__first2); ++__tmp; if (__tmp == __last2) return std::find(__first1, __last1, *__first2); _ForwardIterator2 __p1, __p; __p1 = __first2; ++__p1; _ForwardIterator1 __current = __first1; while (__first1 != __last1) { __first1 = std::find(__first1, __last1, *__first2); if (__first1 == __last1) return __last1; __p = __p1; __current = __first1; if (++__current == __last1) return __last1; while (*__current == *__p) { if (++__p == __last2) return __first1; if (++__current == __last1) return __last1; } ++__first1; } return __first1; } # 556 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _ForwardIterator1 search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, _BinaryPredicate __predicate) { ; ; if (__first1 == __last1 || __first2 == __last2) return __first1; _ForwardIterator2 __tmp(__first2); ++__tmp; if (__tmp == __last2) { while (__first1 != __last1 && !__predicate(*__first1, *__first2)) ++__first1; return __first1; } _ForwardIterator2 __p1, __p; __p1 = __first2; ++__p1; _ForwardIterator1 __current = __first1; while (__first1 != __last1) { while (__first1 != __last1) { if (__predicate(*__first1, *__first2)) break; ++__first1; } while (__first1 != __last1 && !__predicate(*__first1, *__first2)) ++__first1; if (__first1 == __last1) return __last1; __p = __p1; __current = __first1; if (++__current == __last1) return __last1; while (__predicate(*__current, *__p)) { if (++__p == __last2) return __first1; if (++__current == __last1) return __last1; } ++__first1; } return __first1; } # 628 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _ForwardIterator __search_n(_ForwardIterator __first, _ForwardIterator __last, _Integer __count, const _Tp& __val, std::forward_iterator_tag) { __first = std::find(__first, __last, __val); while (__first != __last) { typename iterator_traits<_ForwardIterator>::difference_type __n = __count; _ForwardIterator __i = __first; ++__i; while (__i != __last && __n != 1 && *__i == __val) { ++__i; --__n; } if (__n == 1) return __first; if (__i == __last) return __last; __first = std::find(++__i, __last, __val); } return __last; } # 662 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _RandomAccessIter __search_n(_RandomAccessIter __first, _RandomAccessIter __last, _Integer __count, const _Tp& __val, std::random_access_iterator_tag) { typedef typename std::iterator_traits<_RandomAccessIter>::difference_type _DistanceType; _DistanceType __tailSize = __last - __first; const _DistanceType __pattSize = __count; if (__tailSize < __pattSize) return __last; const _DistanceType __skipOffset = __pattSize - 1; _RandomAccessIter __lookAhead = __first + __skipOffset; __tailSize -= __pattSize; while (1) { while (!(*__lookAhead == __val)) { if (__tailSize < __pattSize) return __last; __lookAhead += __pattSize; __tailSize -= __pattSize; } _DistanceType __remainder = __skipOffset; for (_RandomAccessIter __backTrack = __lookAhead - 1; *__backTrack == __val; --__backTrack) { if (--__remainder == 0) return (__lookAhead - __skipOffset); } if (__remainder > __tailSize) return __last; __lookAhead += __remainder; __tailSize -= __remainder; } } # 720 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _ForwardIterator search_n(_ForwardIterator __first, _ForwardIterator __last, _Integer __count, const _Tp& __val) { ; if (__count <= 0) return __first; if (__count == 1) return std::find(__first, __last, __val); return std::__search_n(__first, __last, __count, __val, std::__iterator_category(__first)); } # 747 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _ForwardIterator __search_n(_ForwardIterator __first, _ForwardIterator __last, _Integer __count, const _Tp& __val, _BinaryPredicate __binary_pred, std::forward_iterator_tag) { while (__first != __last && !__binary_pred(*__first, __val)) ++__first; while (__first != __last) { typename iterator_traits<_ForwardIterator>::difference_type __n = __count; _ForwardIterator __i = __first; ++__i; while (__i != __last && __n != 1 && __binary_pred(*__i, __val)) { ++__i; --__n; } if (__n == 1) return __first; if (__i == __last) return __last; __first = ++__i; while (__first != __last && !__binary_pred(*__first, __val)) ++__first; } return __last; } # 787 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _RandomAccessIter __search_n(_RandomAccessIter __first, _RandomAccessIter __last, _Integer __count, const _Tp& __val, _BinaryPredicate __binary_pred, std::random_access_iterator_tag) { typedef typename std::iterator_traits<_RandomAccessIter>::difference_type _DistanceType; _DistanceType __tailSize = __last - __first; const _DistanceType __pattSize = __count; if (__tailSize < __pattSize) return __last; const _DistanceType __skipOffset = __pattSize - 1; _RandomAccessIter __lookAhead = __first + __skipOffset; __tailSize -= __pattSize; while (1) { while (!__binary_pred(*__lookAhead, __val)) { if (__tailSize < __pattSize) return __last; __lookAhead += __pattSize; __tailSize -= __pattSize; } _DistanceType __remainder = __skipOffset; for (_RandomAccessIter __backTrack = __lookAhead - 1; __binary_pred(*__backTrack, __val); --__backTrack) { if (--__remainder == 0) return (__lookAhead - __skipOffset); } if (__remainder > __tailSize) return __last; __lookAhead += __remainder; __tailSize -= __remainder; } } # 848 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _ForwardIterator search_n(_ForwardIterator __first, _ForwardIterator __last, _Integer __count, const _Tp& __val, _BinaryPredicate __binary_pred) { ; if (__count <= 0) return __first; if (__count == 1) { while (__first != __last && !__binary_pred(*__first, __val)) ++__first; return __first; } return std::__search_n(__first, __last, __count, __val, __binary_pred, std::__iterator_category(__first)); } # 884 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _ForwardIterator2 swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2) { ; for ( ; __first1 != __last1; ++__first1, ++__first2) std::iter_swap(__first1, __first2); return __first2; } # 922 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _OutputIterator transform(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _UnaryOperation __unary_op) { ; for ( ; __first != __last; ++__first, ++__result) *__result = __unary_op(*__first); return __result; } # 957 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _OutputIterator transform(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _OutputIterator __result, _BinaryOperation __binary_op) { ; for ( ; __first1 != __last1; ++__first1, ++__first2, ++__result) *__result = __binary_op(*__first1, *__first2); return __result; } # 989 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template void replace(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __old_value, const _Tp& __new_value) { ; for ( ; __first != __last; ++__first) if (*__first == __old_value) *__first = __new_value; } # 1020 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template void replace_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred, const _Tp& __new_value) { ; for ( ; __first != __last; ++__first) if (__pred(*__first)) *__first = __new_value; } # 1053 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _OutputIterator replace_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, const _Tp& __old_value, const _Tp& __new_value) { ; for ( ; __first != __last; ++__first, ++__result) if (*__first == __old_value) *__result = __new_value; else *__result = *__first; return __result; } # 1089 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _OutputIterator replace_copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Predicate __pred, const _Tp& __new_value) { ; for ( ; __first != __last; ++__first, ++__result) if (__pred(*__first)) *__result = __new_value; else *__result = *__first; return __result; } # 1123 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template void generate(_ForwardIterator __first, _ForwardIterator __last, _Generator __gen) { ; for ( ; __first != __last; ++__first) *__first = __gen(); } # 1149 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _OutputIterator generate_n(_OutputIterator __first, _Size __n, _Generator __gen) { for ( ; __n > 0; --__n, ++__first) *__first = __gen(); return __first; } # 1176 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _OutputIterator remove_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, const _Tp& __value) { ; for ( ; __first != __last; ++__first) if (!(*__first == __value)) { *__result = *__first; ++__result; } return __result; } # 1212 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _OutputIterator remove_copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Predicate __pred) { ; for ( ; __first != __last; ++__first) if (!__pred(*__first)) { *__result = *__first; ++__result; } return __result; } # 1251 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _ForwardIterator remove(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { ; __first = std::find(__first, __last, __value); _ForwardIterator __i = __first; return __first == __last ? __first : std::remove_copy(++__i, __last, __first, __value); } # 1286 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _ForwardIterator remove_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) { ; __first = std::find_if(__first, __last, __pred); _ForwardIterator __i = __first; return __first == __last ? __first : std::remove_copy_if(++__i, __last, __first, __pred); } # 1312 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _OutputIterator __unique_copy(_ForwardIterator __first, _ForwardIterator __last, _OutputIterator __result, forward_iterator_tag, output_iterator_tag) { _ForwardIterator __next = __first; *__result = *__first; while (++__next != __last) if (!(*__first == *__next)) { __first = __next; *++__result = *__first; } return ++__result; } # 1337 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _OutputIterator __unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, input_iterator_tag, output_iterator_tag) { typename iterator_traits<_InputIterator>::value_type __value = *__first; *__result = __value; while (++__first != __last) if (!(__value == *__first)) { __value = *__first; *++__result = __value; } return ++__result; } # 1362 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _ForwardIterator __unique_copy(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, input_iterator_tag, forward_iterator_tag) { *__result = *__first; while (++__first != __last) if (!(*__result == *__first)) *++__result = *__first; return ++__result; } # 1384 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _OutputIterator __unique_copy(_ForwardIterator __first, _ForwardIterator __last, _OutputIterator __result, _BinaryPredicate __binary_pred, forward_iterator_tag, output_iterator_tag) { _ForwardIterator __next = __first; *__result = *__first; while (++__next != __last) if (!__binary_pred(*__first, *__next)) { __first = __next; *++__result = *__first; } return ++__result; } # 1415 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _OutputIterator __unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryPredicate __binary_pred, input_iterator_tag, output_iterator_tag) { typename iterator_traits<_InputIterator>::value_type __value = *__first; *__result = __value; while (++__first != __last) if (!__binary_pred(__value, *__first)) { __value = *__first; *++__result = __value; } return ++__result; } # 1446 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _ForwardIterator __unique_copy(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, _BinaryPredicate __binary_pred, input_iterator_tag, forward_iterator_tag) { *__result = *__first; while (++__first != __last) if (!__binary_pred(*__result, *__first)) *++__result = *__first; return ++__result; } # 1487 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template inline _OutputIterator unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) { ; if (__first == __last) return __result; return std::__unique_copy(__first, __last, __result, std::__iterator_category(__first), std::__iterator_category(__result)); } # 1527 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template inline _OutputIterator unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryPredicate __binary_pred) { ; if (__first == __last) return __result; return std::__unique_copy(__first, __last, __result, __binary_pred, std::__iterator_category(__first), std::__iterator_category(__result)); } # 1560 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _ForwardIterator unique(_ForwardIterator __first, _ForwardIterator __last) { ; __first = std::adjacent_find(__first, __last); if (__first == __last) return __last; _ForwardIterator __dest = __first; ++__first; while (++__first != __last) if (!(*__dest == *__first)) *++__dest = *__first; return ++__dest; } # 1599 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _ForwardIterator unique(_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __binary_pred) { ; __first = std::adjacent_find(__first, __last, __binary_pred); if (__first == __last) return __last; _ForwardIterator __dest = __first; ++__first; while (++__first != __last) if (!__binary_pred(*__dest, *__first)) *++__dest = *__first; return ++__dest; } # 1633 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template void __reverse(_BidirectionalIterator __first, _BidirectionalIterator __last, bidirectional_iterator_tag) { while (true) if (__first == __last || __first == --__last) return; else { std::iter_swap(__first, __last); ++__first; } } # 1655 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template void __reverse(_RandomAccessIterator __first, _RandomAccessIterator __last, random_access_iterator_tag) { if (__first == __last) return; --__last; while (__first < __last) { std::iter_swap(__first, __last); ++__first; --__last; } } # 1682 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template inline void reverse(_BidirectionalIterator __first, _BidirectionalIterator __last) { ; std::__reverse(__first, __last, std::__iterator_category(__first)); } # 1708 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _OutputIterator reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last, _OutputIterator __result) { ; while (__first != __last) { --__last; *__result = *__last; ++__result; } return __result; } # 1736 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _EuclideanRingElement __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n) { while (__n != 0) { _EuclideanRingElement __t = __m % __n; __m = __n; __n = __t; } return __m; } template void __rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last, forward_iterator_tag) { if (__first == __middle || __last == __middle) return; _ForwardIterator __first2 = __middle; do { swap(*__first, *__first2); ++__first; ++__first2; if (__first == __middle) __middle = __first2; } while (__first2 != __last); __first2 = __middle; while (__first2 != __last) { swap(*__first, *__first2); ++__first; ++__first2; if (__first == __middle) __middle = __first2; else if (__first2 == __last) __first2 = __middle; } } template void __rotate(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, bidirectional_iterator_tag) { if (__first == __middle || __last == __middle) return; std::__reverse(__first, __middle, bidirectional_iterator_tag()); std::__reverse(__middle, __last, bidirectional_iterator_tag()); while (__first != __middle && __middle != __last) { swap(*__first, *--__last); ++__first; } if (__first == __middle) std::__reverse(__middle, __last, bidirectional_iterator_tag()); else std::__reverse(__first, __middle, bidirectional_iterator_tag()); } template void __rotate(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last, random_access_iterator_tag) { if (__first == __middle || __last == __middle) return; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _Distance; typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; const _Distance __n = __last - __first; const _Distance __k = __middle - __first; const _Distance __l = __n - __k; if (__k == __l) { std::swap_ranges(__first, __middle, __middle); return; } const _Distance __d = __gcd(__n, __k); for (_Distance __i = 0; __i < __d; __i++) { _ValueType __tmp = *__first; _RandomAccessIterator __p = __first; if (__k < __l) { for (_Distance __j = 0; __j < __l / __d; __j++) { if (__p > __first + __l) { *__p = *(__p - __l); __p -= __l; } *__p = *(__p + __k); __p += __k; } } else { for (_Distance __j = 0; __j < __k / __d - 1; __j ++) { if (__p < __last - __k) { *__p = *(__p + __k); __p += __k; } *__p = * (__p - __l); __p -= __l; } } *__p = __tmp; ++__first; } } # 1915 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template inline void rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last) { ; ; typedef typename iterator_traits<_ForwardIterator>::iterator_category _IterType; std::__rotate(__first, __middle, __last, _IterType()); } # 1948 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _OutputIterator rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last, _OutputIterator __result) { ; ; return std::copy(__first, __middle, std::copy(__middle, __last, __result)); } # 1974 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template inline void random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last) { ; if (__first != __last) for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) std::iter_swap(__i, __first + (std::rand() % ((__i - __first) + 1))); } # 2001 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template void random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, _RandomNumberGenerator& __rand) { ; if (__first == __last) return; for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) std::iter_swap(__i, __first + __rand((__i - __first) + 1)); } template _ForwardIterator __partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred, forward_iterator_tag) { if (__first == __last) return __first; while (__pred(*__first)) if (++__first == __last) return __first; _ForwardIterator __next = __first; while (++__next != __last) if (__pred(*__next)) { swap(*__first, *__next); ++__first; } return __first; } template _BidirectionalIterator __partition(_BidirectionalIterator __first, _BidirectionalIterator __last, _Predicate __pred, bidirectional_iterator_tag) { while (true) { while (true) if (__first == __last) return __first; else if (__pred(*__first)) ++__first; else break; --__last; while (true) if (__first == __last) return __first; else if (!__pred(*__last)) --__last; else break; std::iter_swap(__first, __last); ++__first; } } # 2095 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template inline _ForwardIterator partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) { ; return std::__partition(__first, __last, __pred, std::__iterator_category(__first)); } template _ForwardIterator __inplace_stable_partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred, _Distance __len) { if (__len == 1) return __pred(*__first) ? __last : __first; _ForwardIterator __middle = __first; std::advance(__middle, __len / 2); _ForwardIterator __begin = std::__inplace_stable_partition(__first, __middle, __pred, __len / 2); _ForwardIterator __end = std::__inplace_stable_partition(__middle, __last, __pred, __len - __len / 2); std::rotate(__begin, __middle, __end); std::advance(__begin, std::distance(__middle, __end)); return __begin; } template _ForwardIterator __stable_partition_adaptive(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred, _Distance __len, _Pointer __buffer, _Distance __buffer_size) { if (__len <= __buffer_size) { _ForwardIterator __result1 = __first; _Pointer __result2 = __buffer; for ( ; __first != __last ; ++__first) if (__pred(*__first)) { *__result1 = *__first; ++__result1; } else { *__result2 = *__first; ++__result2; } std::copy(__buffer, __result2, __result1); return __result1; } else { _ForwardIterator __middle = __first; std::advance(__middle, __len / 2); _ForwardIterator __begin = std::__stable_partition_adaptive(__first, __middle, __pred, __len / 2, __buffer, __buffer_size); _ForwardIterator __end = std::__stable_partition_adaptive(__middle, __last, __pred, __len - __len / 2, __buffer, __buffer_size); std::rotate(__begin, __middle, __end); std::advance(__begin, std::distance(__middle, __end)); return __begin; } } # 2206 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _ForwardIterator stable_partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) { ; if (__first == __last) return __first; else { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; typedef typename iterator_traits<_ForwardIterator>::difference_type _DistanceType; _Temporary_buffer<_ForwardIterator, _ValueType> __buf(__first, __last); if (__buf.size() > 0) return std::__stable_partition_adaptive(__first, __last, __pred, _DistanceType(__buf.requested_size()), __buf.begin(), __buf.size()); else return std::__inplace_stable_partition(__first, __last, __pred, _DistanceType(__buf.requested_size())); } } template _RandomAccessIterator __unguarded_partition(_RandomAccessIterator __first, _RandomAccessIterator __last, _Tp __pivot) { while (true) { while (*__first < __pivot) ++__first; --__last; while (__pivot < *__last) --__last; if (!(__first < __last)) return __first; std::iter_swap(__first, __last); ++__first; } } template _RandomAccessIterator __unguarded_partition(_RandomAccessIterator __first, _RandomAccessIterator __last, _Tp __pivot, _Compare __comp) { while (true) { while (__comp(*__first, __pivot)) ++__first; --__last; while (__comp(__pivot, *__last)) --__last; if (!(__first < __last)) return __first; std::iter_swap(__first, __last); ++__first; } } enum { _S_threshold = 16 }; template void __unguarded_linear_insert(_RandomAccessIterator __last, _Tp __val) { _RandomAccessIterator __next = __last; --__next; while (__val < *__next) { *__last = *__next; __last = __next; --__next; } *__last = __val; } template void __unguarded_linear_insert(_RandomAccessIterator __last, _Tp __val, _Compare __comp) { _RandomAccessIterator __next = __last; --__next; while (__comp(__val, *__next)) { *__last = *__next; __last = __next; --__next; } *__last = __val; } template void __insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) { if (__first == __last) return; for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) { typename iterator_traits<_RandomAccessIterator>::value_type __val = *__i; if (__val < *__first) { std::copy_backward(__first, __i, __i + 1); *__first = __val; } else std::__unguarded_linear_insert(__i, __val); } } template void __insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { if (__first == __last) return; for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) { typename iterator_traits<_RandomAccessIterator>::value_type __val = *__i; if (__comp(__val, *__first)) { std::copy_backward(__first, __i, __i + 1); *__first = __val; } else std::__unguarded_linear_insert(__i, __val, __comp); } } template inline void __unguarded_insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; for (_RandomAccessIterator __i = __first; __i != __last; ++__i) std::__unguarded_linear_insert(__i, _ValueType(*__i)); } template inline void __unguarded_insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; for (_RandomAccessIterator __i = __first; __i != __last; ++__i) std::__unguarded_linear_insert(__i, _ValueType(*__i), __comp); } template void __final_insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) { if (__last - __first > int(_S_threshold)) { std::__insertion_sort(__first, __first + int(_S_threshold)); std::__unguarded_insertion_sort(__first + int(_S_threshold), __last); } else std::__insertion_sort(__first, __last); } template void __final_insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { if (__last - __first > int(_S_threshold)) { std::__insertion_sort(__first, __first + int(_S_threshold), __comp); std::__unguarded_insertion_sort(__first + int(_S_threshold), __last, __comp); } else std::__insertion_sort(__first, __last, __comp); } template void __heap_select(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; std::make_heap(__first, __middle); for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) if (*__i < *__first) std::__pop_heap(__first, __middle, __i, _ValueType(*__i)); } template void __heap_select(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; std::make_heap(__first, __middle, __comp); for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) if (__comp(*__i, *__first)) std::__pop_heap(__first, __middle, __i, _ValueType(*__i), __comp); } template inline _Size __lg(_Size __n) { _Size __k; for (__k = 0; __n != 1; __n >>= 1) ++__k; return __k; } # 2535 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template inline void partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; ; ; std::__heap_select(__first, __middle, __last); std::sort_heap(__first, __middle); } # 2573 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template inline void partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; ; ; std::__heap_select(__first, __middle, __last, __comp); std::sort_heap(__first, __middle, __comp); } # 2612 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _RandomAccessIterator partial_sort_copy(_InputIterator __first, _InputIterator __last, _RandomAccessIterator __result_first, _RandomAccessIterator __result_last) { typedef typename iterator_traits<_InputIterator>::value_type _InputValueType; typedef typename iterator_traits<_RandomAccessIterator>::value_type _OutputValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; ; ; if (__result_first == __result_last) return __result_last; _RandomAccessIterator __result_real_last = __result_first; while(__first != __last && __result_real_last != __result_last) { *__result_real_last = *__first; ++__result_real_last; ++__first; } std::make_heap(__result_first, __result_real_last); while (__first != __last) { if (*__first < *__result_first) std::__adjust_heap(__result_first, _DistanceType(0), _DistanceType(__result_real_last - __result_first), _InputValueType(*__first)); ++__first; } std::sort_heap(__result_first, __result_real_last); return __result_real_last; } # 2677 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _RandomAccessIterator partial_sort_copy(_InputIterator __first, _InputIterator __last, _RandomAccessIterator __result_first, _RandomAccessIterator __result_last, _Compare __comp) { typedef typename iterator_traits<_InputIterator>::value_type _InputValueType; typedef typename iterator_traits<_RandomAccessIterator>::value_type _OutputValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; ; ; if (__result_first == __result_last) return __result_last; _RandomAccessIterator __result_real_last = __result_first; while(__first != __last && __result_real_last != __result_last) { *__result_real_last = *__first; ++__result_real_last; ++__first; } std::make_heap(__result_first, __result_real_last, __comp); while (__first != __last) { if (__comp(*__first, *__result_first)) std::__adjust_heap(__result_first, _DistanceType(0), _DistanceType(__result_real_last - __result_first), _InputValueType(*__first), __comp); ++__first; } std::sort_heap(__result_first, __result_real_last, __comp); return __result_real_last; } template void __introsort_loop(_RandomAccessIterator __first, _RandomAccessIterator __last, _Size __depth_limit) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; while (__last - __first > int(_S_threshold)) { if (__depth_limit == 0) { std::partial_sort(__first, __last, __last); return; } --__depth_limit; _RandomAccessIterator __cut = std::__unguarded_partition(__first, __last, _ValueType(std::__median(*__first, *(__first + (__last - __first) / 2), *(__last - 1)))); std::__introsort_loop(__cut, __last, __depth_limit); __last = __cut; } } template void __introsort_loop(_RandomAccessIterator __first, _RandomAccessIterator __last, _Size __depth_limit, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; while (__last - __first > int(_S_threshold)) { if (__depth_limit == 0) { std::partial_sort(__first, __last, __last, __comp); return; } --__depth_limit; _RandomAccessIterator __cut = std::__unguarded_partition(__first, __last, _ValueType(std::__median(*__first, *(__first + (__last - __first) / 2), *(__last - 1), __comp)), __comp); std::__introsort_loop(__cut, __last, __depth_limit, __comp); __last = __cut; } } # 2814 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template inline void sort(_RandomAccessIterator __first, _RandomAccessIterator __last) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; ; if (__first != __last) { std::__introsort_loop(__first, __last, std::__lg(__last - __first) * 2); std::__final_insertion_sort(__first, __last); } } # 2849 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template inline void sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; ; if (__first != __last) { std::__introsort_loop(__first, __last, std::__lg(__last - __first) * 2, __comp); std::__final_insertion_sort(__first, __last, __comp); } } # 2882 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; typedef typename iterator_traits<_ForwardIterator>::difference_type _DistanceType; ; _DistanceType __len = std::distance(__first, __last); _DistanceType __half; _ForwardIterator __middle; while (__len > 0) { __half = __len >> 1; __middle = __first; std::advance(__middle, __half); if (*__middle < __val) { __first = __middle; ++__first; __len = __len - __half - 1; } else __len = __half; } return __first; } # 2932 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _Compare __comp) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; typedef typename iterator_traits<_ForwardIterator>::difference_type _DistanceType; ; _DistanceType __len = std::distance(__first, __last); _DistanceType __half; _ForwardIterator __middle; while (__len > 0) { __half = __len >> 1; __middle = __first; std::advance(__middle, __half); if (__comp(*__middle, __val)) { __first = __middle; ++__first; __len = __len - __half - 1; } else __len = __half; } return __first; } # 2979 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _ForwardIterator upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; typedef typename iterator_traits<_ForwardIterator>::difference_type _DistanceType; ; _DistanceType __len = std::distance(__first, __last); _DistanceType __half; _ForwardIterator __middle; while (__len > 0) { __half = __len >> 1; __middle = __first; std::advance(__middle, __half); if (__val < *__middle) __len = __half; else { __first = __middle; ++__first; __len = __len - __half - 1; } } return __first; } # 3029 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _ForwardIterator upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _Compare __comp) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; typedef typename iterator_traits<_ForwardIterator>::difference_type _DistanceType; ; _DistanceType __len = std::distance(__first, __last); _DistanceType __half; _ForwardIterator __middle; while (__len > 0) { __half = __len >> 1; __middle = __first; std::advance(__middle, __half); if (__comp(__val, *__middle)) __len = __half; else { __first = __middle; ++__first; __len = __len - __half - 1; } } return __first; } template void __merge_without_buffer(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Distance __len1, _Distance __len2) { if (__len1 == 0 || __len2 == 0) return; if (__len1 + __len2 == 2) { if (*__middle < *__first) std::iter_swap(__first, __middle); return; } _BidirectionalIterator __first_cut = __first; _BidirectionalIterator __second_cut = __middle; _Distance __len11 = 0; _Distance __len22 = 0; if (__len1 > __len2) { __len11 = __len1 / 2; std::advance(__first_cut, __len11); __second_cut = std::lower_bound(__middle, __last, *__first_cut); __len22 = std::distance(__middle, __second_cut); } else { __len22 = __len2 / 2; std::advance(__second_cut, __len22); __first_cut = std::upper_bound(__first, __middle, *__second_cut); __len11 = std::distance(__first, __first_cut); } std::rotate(__first_cut, __middle, __second_cut); _BidirectionalIterator __new_middle = __first_cut; std::advance(__new_middle, std::distance(__middle, __second_cut)); std::__merge_without_buffer(__first, __first_cut, __new_middle, __len11, __len22); std::__merge_without_buffer(__new_middle, __second_cut, __last, __len1 - __len11, __len2 - __len22); } template void __merge_without_buffer(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Distance __len1, _Distance __len2, _Compare __comp) { if (__len1 == 0 || __len2 == 0) return; if (__len1 + __len2 == 2) { if (__comp(*__middle, *__first)) std::iter_swap(__first, __middle); return; } _BidirectionalIterator __first_cut = __first; _BidirectionalIterator __second_cut = __middle; _Distance __len11 = 0; _Distance __len22 = 0; if (__len1 > __len2) { __len11 = __len1 / 2; std::advance(__first_cut, __len11); __second_cut = std::lower_bound(__middle, __last, *__first_cut, __comp); __len22 = std::distance(__middle, __second_cut); } else { __len22 = __len2 / 2; std::advance(__second_cut, __len22); __first_cut = std::upper_bound(__first, __middle, *__second_cut, __comp); __len11 = std::distance(__first, __first_cut); } std::rotate(__first_cut, __middle, __second_cut); _BidirectionalIterator __new_middle = __first_cut; std::advance(__new_middle, std::distance(__middle, __second_cut)); std::__merge_without_buffer(__first, __first_cut, __new_middle, __len11, __len22, __comp); std::__merge_without_buffer(__new_middle, __second_cut, __last, __len1 - __len11, __len2 - __len22, __comp); } template void __inplace_stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) { if (__last - __first < 15) { std::__insertion_sort(__first, __last); return; } _RandomAccessIterator __middle = __first + (__last - __first) / 2; std::__inplace_stable_sort(__first, __middle); std::__inplace_stable_sort(__middle, __last); std::__merge_without_buffer(__first, __middle, __last, __middle - __first, __last - __middle); } template void __inplace_stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { if (__last - __first < 15) { std::__insertion_sort(__first, __last, __comp); return; } _RandomAccessIterator __middle = __first + (__last - __first) / 2; std::__inplace_stable_sort(__first, __middle, __comp); std::__inplace_stable_sort(__middle, __last, __comp); std::__merge_without_buffer(__first, __middle, __last, __middle - __first, __last - __middle, __comp); } # 3227 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _OutputIterator merge(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) { if (*__first2 < *__first1) { *__result = *__first2; ++__first2; } else { *__result = *__first1; ++__first1; } ++__result; } return std::copy(__first2, __last2, std::copy(__first1, __last1, __result)); } # 3288 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _OutputIterator merge(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) { if (__comp(*__first2, *__first1)) { *__result = *__first2; ++__first2; } else { *__result = *__first1; ++__first1; } ++__result; } return std::copy(__first2, __last2, std::copy(__first1, __last1, __result)); } template void __merge_sort_loop(_RandomAccessIterator1 __first, _RandomAccessIterator1 __last, _RandomAccessIterator2 __result, _Distance __step_size) { const _Distance __two_step = 2 * __step_size; while (__last - __first >= __two_step) { __result = std::merge(__first, __first + __step_size, __first + __step_size, __first + __two_step, __result); __first += __two_step; } __step_size = std::min(_Distance(__last - __first), __step_size); std::merge(__first, __first + __step_size, __first + __step_size, __last, __result); } template void __merge_sort_loop(_RandomAccessIterator1 __first, _RandomAccessIterator1 __last, _RandomAccessIterator2 __result, _Distance __step_size, _Compare __comp) { const _Distance __two_step = 2 * __step_size; while (__last - __first >= __two_step) { __result = std::merge(__first, __first + __step_size, __first + __step_size, __first + __two_step, __result, __comp); __first += __two_step; } __step_size = std::min(_Distance(__last - __first), __step_size); std::merge(__first, __first + __step_size, __first + __step_size, __last, __result, __comp); } enum { _S_chunk_size = 7 }; template void __chunk_insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Distance __chunk_size) { while (__last - __first >= __chunk_size) { std::__insertion_sort(__first, __first + __chunk_size); __first += __chunk_size; } std::__insertion_sort(__first, __last); } template void __chunk_insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Distance __chunk_size, _Compare __comp) { while (__last - __first >= __chunk_size) { std::__insertion_sort(__first, __first + __chunk_size, __comp); __first += __chunk_size; } std::__insertion_sort(__first, __last, __comp); } template void __merge_sort_with_buffer(_RandomAccessIterator __first, _RandomAccessIterator __last, _Pointer __buffer) { typedef typename iterator_traits<_RandomAccessIterator>::difference_type _Distance; const _Distance __len = __last - __first; const _Pointer __buffer_last = __buffer + __len; _Distance __step_size = _S_chunk_size; std::__chunk_insertion_sort(__first, __last, __step_size); while (__step_size < __len) { std::__merge_sort_loop(__first, __last, __buffer, __step_size); __step_size *= 2; std::__merge_sort_loop(__buffer, __buffer_last, __first, __step_size); __step_size *= 2; } } template void __merge_sort_with_buffer(_RandomAccessIterator __first, _RandomAccessIterator __last, _Pointer __buffer, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::difference_type _Distance; const _Distance __len = __last - __first; const _Pointer __buffer_last = __buffer + __len; _Distance __step_size = _S_chunk_size; std::__chunk_insertion_sort(__first, __last, __step_size, __comp); while (__step_size < __len) { std::__merge_sort_loop(__first, __last, __buffer, __step_size, __comp); __step_size *= 2; std::__merge_sort_loop(__buffer, __buffer_last, __first, __step_size, __comp); __step_size *= 2; } } template _BidirectionalIterator3 __merge_backward(_BidirectionalIterator1 __first1, _BidirectionalIterator1 __last1, _BidirectionalIterator2 __first2, _BidirectionalIterator2 __last2, _BidirectionalIterator3 __result) { if (__first1 == __last1) return std::copy_backward(__first2, __last2, __result); if (__first2 == __last2) return std::copy_backward(__first1, __last1, __result); --__last1; --__last2; while (true) { if (*__last2 < *__last1) { *--__result = *__last1; if (__first1 == __last1) return std::copy_backward(__first2, ++__last2, __result); --__last1; } else { *--__result = *__last2; if (__first2 == __last2) return std::copy_backward(__first1, ++__last1, __result); --__last2; } } } template _BidirectionalIterator3 __merge_backward(_BidirectionalIterator1 __first1, _BidirectionalIterator1 __last1, _BidirectionalIterator2 __first2, _BidirectionalIterator2 __last2, _BidirectionalIterator3 __result, _Compare __comp) { if (__first1 == __last1) return std::copy_backward(__first2, __last2, __result); if (__first2 == __last2) return std::copy_backward(__first1, __last1, __result); --__last1; --__last2; while (true) { if (__comp(*__last2, *__last1)) { *--__result = *__last1; if (__first1 == __last1) return std::copy_backward(__first2, ++__last2, __result); --__last1; } else { *--__result = *__last2; if (__first2 == __last2) return std::copy_backward(__first1, ++__last1, __result); --__last2; } } } template _BidirectionalIterator1 __rotate_adaptive(_BidirectionalIterator1 __first, _BidirectionalIterator1 __middle, _BidirectionalIterator1 __last, _Distance __len1, _Distance __len2, _BidirectionalIterator2 __buffer, _Distance __buffer_size) { _BidirectionalIterator2 __buffer_end; if (__len1 > __len2 && __len2 <= __buffer_size) { __buffer_end = std::copy(__middle, __last, __buffer); std::copy_backward(__first, __middle, __last); return std::copy(__buffer, __buffer_end, __first); } else if (__len1 <= __buffer_size) { __buffer_end = std::copy(__first, __middle, __buffer); std::copy(__middle, __last, __first); return std::copy_backward(__buffer, __buffer_end, __last); } else { std::rotate(__first, __middle, __last); std::advance(__first, std::distance(__middle, __last)); return __first; } } template void __merge_adaptive(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Distance __len1, _Distance __len2, _Pointer __buffer, _Distance __buffer_size) { if (__len1 <= __len2 && __len1 <= __buffer_size) { _Pointer __buffer_end = std::copy(__first, __middle, __buffer); std::merge(__buffer, __buffer_end, __middle, __last, __first); } else if (__len2 <= __buffer_size) { _Pointer __buffer_end = std::copy(__middle, __last, __buffer); std::__merge_backward(__first, __middle, __buffer, __buffer_end, __last); } else { _BidirectionalIterator __first_cut = __first; _BidirectionalIterator __second_cut = __middle; _Distance __len11 = 0; _Distance __len22 = 0; if (__len1 > __len2) { __len11 = __len1 / 2; std::advance(__first_cut, __len11); __second_cut = std::lower_bound(__middle, __last, *__first_cut); __len22 = std::distance(__middle, __second_cut); } else { __len22 = __len2 / 2; std::advance(__second_cut, __len22); __first_cut = std::upper_bound(__first, __middle, *__second_cut); __len11 = std::distance(__first, __first_cut); } _BidirectionalIterator __new_middle = std::__rotate_adaptive(__first_cut, __middle, __second_cut, __len1 - __len11, __len22, __buffer, __buffer_size); std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, __len22, __buffer, __buffer_size); std::__merge_adaptive(__new_middle, __second_cut, __last, __len1 - __len11, __len2 - __len22, __buffer, __buffer_size); } } template void __merge_adaptive(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Distance __len1, _Distance __len2, _Pointer __buffer, _Distance __buffer_size, _Compare __comp) { if (__len1 <= __len2 && __len1 <= __buffer_size) { _Pointer __buffer_end = std::copy(__first, __middle, __buffer); std::merge(__buffer, __buffer_end, __middle, __last, __first, __comp); } else if (__len2 <= __buffer_size) { _Pointer __buffer_end = std::copy(__middle, __last, __buffer); std::__merge_backward(__first, __middle, __buffer, __buffer_end, __last, __comp); } else { _BidirectionalIterator __first_cut = __first; _BidirectionalIterator __second_cut = __middle; _Distance __len11 = 0; _Distance __len22 = 0; if (__len1 > __len2) { __len11 = __len1 / 2; std::advance(__first_cut, __len11); __second_cut = std::lower_bound(__middle, __last, *__first_cut, __comp); __len22 = std::distance(__middle, __second_cut); } else { __len22 = __len2 / 2; std::advance(__second_cut, __len22); __first_cut = std::upper_bound(__first, __middle, *__second_cut, __comp); __len11 = std::distance(__first, __first_cut); } _BidirectionalIterator __new_middle = std::__rotate_adaptive(__first_cut, __middle, __second_cut, __len1 - __len11, __len22, __buffer, __buffer_size); std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, __len22, __buffer, __buffer_size, __comp); std::__merge_adaptive(__new_middle, __second_cut, __last, __len1 - __len11, __len2 - __len22, __buffer, __buffer_size, __comp); } } # 3711 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template void inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last) { typedef typename iterator_traits<_BidirectionalIterator>::value_type _ValueType; typedef typename iterator_traits<_BidirectionalIterator>::difference_type _DistanceType; ; ; if (__first == __middle || __middle == __last) return; _DistanceType __len1 = std::distance(__first, __middle); _DistanceType __len2 = std::distance(__middle, __last); _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first, __last); if (__buf.begin() == 0) std::__merge_without_buffer(__first, __middle, __last, __len1, __len2); else std::__merge_adaptive(__first, __middle, __last, __len1, __len2, __buf.begin(), _DistanceType(__buf.size())); } # 3765 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template void inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Compare __comp) { typedef typename iterator_traits<_BidirectionalIterator>::value_type _ValueType; typedef typename iterator_traits<_BidirectionalIterator>::difference_type _DistanceType; ; ; if (__first == __middle || __middle == __last) return; const _DistanceType __len1 = std::distance(__first, __middle); const _DistanceType __len2 = std::distance(__middle, __last); _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first, __last); if (__buf.begin() == 0) std::__merge_without_buffer(__first, __middle, __last, __len1, __len2, __comp); else std::__merge_adaptive(__first, __middle, __last, __len1, __len2, __buf.begin(), _DistanceType(__buf.size()), __comp); } template void __stable_sort_adaptive(_RandomAccessIterator __first, _RandomAccessIterator __last, _Pointer __buffer, _Distance __buffer_size) { const _Distance __len = (__last - __first + 1) / 2; const _RandomAccessIterator __middle = __first + __len; if (__len > __buffer_size) { std::__stable_sort_adaptive(__first, __middle, __buffer, __buffer_size); std::__stable_sort_adaptive(__middle, __last, __buffer, __buffer_size); } else { std::__merge_sort_with_buffer(__first, __middle, __buffer); std::__merge_sort_with_buffer(__middle, __last, __buffer); } std::__merge_adaptive(__first, __middle, __last, _Distance(__middle - __first), _Distance(__last - __middle), __buffer, __buffer_size); } template void __stable_sort_adaptive(_RandomAccessIterator __first, _RandomAccessIterator __last, _Pointer __buffer, _Distance __buffer_size, _Compare __comp) { const _Distance __len = (__last - __first + 1) / 2; const _RandomAccessIterator __middle = __first + __len; if (__len > __buffer_size) { std::__stable_sort_adaptive(__first, __middle, __buffer, __buffer_size, __comp); std::__stable_sort_adaptive(__middle, __last, __buffer, __buffer_size, __comp); } else { std::__merge_sort_with_buffer(__first, __middle, __buffer, __comp); std::__merge_sort_with_buffer(__middle, __last, __buffer, __comp); } std::__merge_adaptive(__first, __middle, __last, _Distance(__middle - __first), _Distance(__last - __middle), __buffer, __buffer_size, __comp); } # 3874 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template inline void stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; ; _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first, __last); if (__buf.begin() == 0) std::__inplace_stable_sort(__first, __last); else std::__stable_sort_adaptive(__first, __last, __buf.begin(), _DistanceType(__buf.size())); } # 3915 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template inline void stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; ; _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first, __last); if (__buf.begin() == 0) std::__inplace_stable_sort(__first, __last, __comp); else std::__stable_sort_adaptive(__first, __last, __buf.begin(), _DistanceType(__buf.size()), __comp); } template void __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last, _Size __depth_limit) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; while (__last - __first > 3) { if (__depth_limit == 0) { std::__heap_select(__first, __nth + 1, __last); std::iter_swap(__first, __nth); return; } --__depth_limit; _RandomAccessIterator __cut = std::__unguarded_partition(__first, __last, _ValueType(std::__median(*__first, *(__first + (__last - __first) / 2), *(__last - 1)))); if (__cut <= __nth) __first = __cut; else __last = __cut; } std::__insertion_sort(__first, __last); } template void __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last, _Size __depth_limit, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; while (__last - __first > 3) { if (__depth_limit == 0) { std::__heap_select(__first, __nth + 1, __last, __comp); std::iter_swap(__first, __nth); return; } --__depth_limit; _RandomAccessIterator __cut = std::__unguarded_partition(__first, __last, _ValueType(std::__median(*__first, *(__first + (__last - __first) / 2), *(__last - 1), __comp)), __comp); if (__cut <= __nth) __first = __cut; else __last = __cut; } std::__insertion_sort(__first, __last, __comp); } # 4030 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template inline void nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; ; ; if (__first == __last || __nth == __last) return; std::__introselect(__first, __nth, __last, std::__lg(__last - __first) * 2); } # 4068 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template inline void nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; ; ; if (__first == __last || __nth == __last) return; std::__introselect(__first, __nth, __last, std::__lg(__last - __first) * 2, __comp); } # 4107 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template pair<_ForwardIterator, _ForwardIterator> equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; typedef typename iterator_traits<_ForwardIterator>::difference_type _DistanceType; ; _DistanceType __len = std::distance(__first, __last); _DistanceType __half; _ForwardIterator __middle, __left, __right; while (__len > 0) { __half = __len >> 1; __middle = __first; std::advance(__middle, __half); if (*__middle < __val) { __first = __middle; ++__first; __len = __len - __half - 1; } else if (__val < *__middle) __len = __half; else { __left = std::lower_bound(__first, __middle, __val); std::advance(__first, __len); __right = std::upper_bound(++__middle, __first, __val); return pair<_ForwardIterator, _ForwardIterator>(__left, __right); } } return pair<_ForwardIterator, _ForwardIterator>(__first, __first); } # 4168 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template pair<_ForwardIterator, _ForwardIterator> equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _Compare __comp) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; typedef typename iterator_traits<_ForwardIterator>::difference_type _DistanceType; ; _DistanceType __len = std::distance(__first, __last); _DistanceType __half; _ForwardIterator __middle, __left, __right; while (__len > 0) { __half = __len >> 1; __middle = __first; std::advance(__middle, __half); if (__comp(*__middle, __val)) { __first = __middle; ++__first; __len = __len - __half - 1; } else if (__comp(__val, *__middle)) __len = __half; else { __left = std::lower_bound(__first, __middle, __val, __comp); std::advance(__first, __len); __right = std::upper_bound(++__middle, __first, __val, __comp); return pair<_ForwardIterator, _ForwardIterator>(__left, __right); } } return pair<_ForwardIterator, _ForwardIterator>(__first, __first); } # 4226 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template bool binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; ; _ForwardIterator __i = std::lower_bound(__first, __last, __val); return __i != __last && !(__val < *__i); } # 4258 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template bool binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _Compare __comp) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; ; _ForwardIterator __i = std::lower_bound(__first, __last, __val, __comp); return __i != __last && !__comp(__val, *__i); } # 4297 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template bool includes(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) if (*__first2 < *__first1) return false; else if(*__first1 < *__first2) ++__first1; else ++__first1, ++__first2; return __first2 == __last2; } # 4345 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template bool includes(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) if (__comp(*__first2, *__first1)) return false; else if(__comp(*__first1, *__first2)) ++__first1; else ++__first1, ++__first2; return __first2 == __last2; } # 4394 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _OutputIterator set_union(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) { if (*__first1 < *__first2) { *__result = *__first1; ++__first1; } else if (*__first2 < *__first1) { *__result = *__first2; ++__first2; } else { *__result = *__first1; ++__first1; ++__first2; } ++__result; } return std::copy(__first2, __last2, std::copy(__first1, __last1, __result)); } # 4460 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _OutputIterator set_union(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) { if (__comp(*__first1, *__first2)) { *__result = *__first1; ++__first1; } else if (__comp(*__first2, *__first1)) { *__result = *__first2; ++__first2; } else { *__result = *__first1; ++__first1; ++__first2; } ++__result; } return std::copy(__first2, __last2, std::copy(__first1, __last1, __result)); } # 4526 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _OutputIterator set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) if (*__first1 < *__first2) ++__first1; else if (*__first2 < *__first1) ++__first2; else { *__result = *__first1; ++__first1; ++__first2; ++__result; } return __result; } # 4582 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _OutputIterator set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) if (__comp(*__first1, *__first2)) ++__first1; else if (__comp(*__first2, *__first1)) ++__first2; else { *__result = *__first1; ++__first1; ++__first2; ++__result; } return __result; } # 4639 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _OutputIterator set_difference(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) if (*__first1 < *__first2) { *__result = *__first1; ++__first1; ++__result; } else if (*__first2 < *__first1) ++__first2; else { ++__first1; ++__first2; } return std::copy(__first1, __last1, __result); } # 4699 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _OutputIterator set_difference(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) if (__comp(*__first1, *__first2)) { *__result = *__first1; ++__first1; ++__result; } else if (__comp(*__first2, *__first1)) ++__first2; else { ++__first1; ++__first2; } return std::copy(__first1, __last1, __result); } # 4756 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _OutputIterator set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) if (*__first1 < *__first2) { *__result = *__first1; ++__first1; ++__result; } else if (*__first2 < *__first1) { *__result = *__first2; ++__first2; ++__result; } else { ++__first1; ++__first2; } return std::copy(__first2, __last2, std::copy(__first1, __last1, __result)); } # 4821 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _OutputIterator set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) if (__comp(*__first1, *__first2)) { *__result = *__first1; ++__first1; ++__result; } else if (__comp(*__first2, *__first1)) { *__result = *__first2; ++__first2; ++__result; } else { ++__first1; ++__first2; } return std::copy(__first2, __last2, std::copy(__first1, __last1, __result)); } # 4879 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _ForwardIterator max_element(_ForwardIterator __first, _ForwardIterator __last) { ; if (__first == __last) return __first; _ForwardIterator __result = __first; while (++__first != __last) if (*__result < *__first) __result = __first; return __result; } # 4906 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _ForwardIterator max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { ; if (__first == __last) return __first; _ForwardIterator __result = __first; while (++__first != __last) if (__comp(*__result, *__first)) __result = __first; return __result; } template _ForwardIterator min_element(_ForwardIterator __first, _ForwardIterator __last) { ; if (__first == __last) return __first; _ForwardIterator __result = __first; while (++__first != __last) if (*__first < *__result) __result = __first; return __result; } # 4958 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _ForwardIterator min_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { ; if (__first == __last) return __first; _ForwardIterator __result = __first; while (++__first != __last) if (__comp(*__first, *__result)) __result = __first; return __result; } # 4993 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template bool next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last) { ; if (__first == __last) return false; _BidirectionalIterator __i = __first; ++__i; if (__i == __last) return false; __i = __last; --__i; for(;;) { _BidirectionalIterator __ii = __i; --__i; if (*__i < *__ii) { _BidirectionalIterator __j = __last; while (!(*__i < *--__j)) {} std::iter_swap(__i, __j); std::reverse(__ii, __last); return true; } if (__i == __first) { std::reverse(__first, __last); return false; } } } # 5049 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template bool next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) { ; if (__first == __last) return false; _BidirectionalIterator __i = __first; ++__i; if (__i == __last) return false; __i = __last; --__i; for(;;) { _BidirectionalIterator __ii = __i; --__i; if (__comp(*__i, *__ii)) { _BidirectionalIterator __j = __last; while (!__comp(*__i, *--__j)) {} std::iter_swap(__i, __j); std::reverse(__ii, __last); return true; } if (__i == __first) { std::reverse(__first, __last); return false; } } } # 5104 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template bool prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last) { ; if (__first == __last) return false; _BidirectionalIterator __i = __first; ++__i; if (__i == __last) return false; __i = __last; --__i; for(;;) { _BidirectionalIterator __ii = __i; --__i; if (*__ii < *__i) { _BidirectionalIterator __j = __last; while (!(*--__j < *__i)) {} std::iter_swap(__i, __j); std::reverse(__ii, __last); return true; } if (__i == __first) { std::reverse(__first, __last); return false; } } } # 5160 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template bool prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) { ; if (__first == __last) return false; _BidirectionalIterator __i = __first; ++__i; if (__i == __last) return false; __i = __last; --__i; for(;;) { _BidirectionalIterator __ii = __i; --__i; if (__comp(*__ii, *__i)) { _BidirectionalIterator __j = __last; while (!__comp(*--__j, *__i)) {} std::iter_swap(__i, __j); std::reverse(__ii, __last); return true; } if (__i == __first) { std::reverse(__first, __last); return false; } } } # 5219 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _InputIterator find_first_of(_InputIterator __first1, _InputIterator __last1, _ForwardIterator __first2, _ForwardIterator __last2) { ; ; for ( ; __first1 != __last1; ++__first1) for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) if (*__first1 == *__iter) return __first1; return __last1; } # 5255 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _InputIterator find_first_of(_InputIterator __first1, _InputIterator __last1, _ForwardIterator __first2, _ForwardIterator __last2, _BinaryPredicate __comp) { ; ; for ( ; __first1 != __last1; ++__first1) for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) if (__comp(*__first1, *__iter)) return __first1; return __last1; } # 5285 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template _ForwardIterator1 __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, forward_iterator_tag, forward_iterator_tag) { if (__first2 == __last2) return __last1; else { _ForwardIterator1 __result = __last1; while (1) { _ForwardIterator1 __new_result = std::search(__first1, __last1, __first2, __last2); if (__new_result == __last1) return __result; else { __result = __new_result; __first1 = __new_result; ++__first1; } } } } template _ForwardIterator1 __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, forward_iterator_tag, forward_iterator_tag, _BinaryPredicate __comp) { if (__first2 == __last2) return __last1; else { _ForwardIterator1 __result = __last1; while (1) { _ForwardIterator1 __new_result = std::search(__first1, __last1, __first2, __last2, __comp); if (__new_result == __last1) return __result; else { __result = __new_result; __first1 = __new_result; ++__first1; } } } } template _BidirectionalIterator1 __find_end(_BidirectionalIterator1 __first1, _BidirectionalIterator1 __last1, _BidirectionalIterator2 __first2, _BidirectionalIterator2 __last2, bidirectional_iterator_tag, bidirectional_iterator_tag) { typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; _RevIterator1 __rlast1(__first1); _RevIterator2 __rlast2(__first2); _RevIterator1 __rresult = std::search(_RevIterator1(__last1), __rlast1, _RevIterator2(__last2), __rlast2); if (__rresult == __rlast1) return __last1; else { _BidirectionalIterator1 __result = __rresult.base(); std::advance(__result, -std::distance(__first2, __last2)); return __result; } } template _BidirectionalIterator1 __find_end(_BidirectionalIterator1 __first1, _BidirectionalIterator1 __last1, _BidirectionalIterator2 __first2, _BidirectionalIterator2 __last2, bidirectional_iterator_tag, bidirectional_iterator_tag, _BinaryPredicate __comp) { typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; _RevIterator1 __rlast1(__first1); _RevIterator2 __rlast2(__first2); _RevIterator1 __rresult = std::search(_RevIterator1(__last1), __rlast1, _RevIterator2(__last2), __rlast2, __comp); if (__rresult == __rlast1) return __last1; else { _BidirectionalIterator1 __result = __rresult.base(); std::advance(__result, -std::distance(__first2, __last2)); return __result; } } # 5435 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template inline _ForwardIterator1 find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2) { ; ; return std::__find_end(__first1, __last1, __first2, __last2, std::__iterator_category(__first1), std::__iterator_category(__first2)); } # 5480 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_algo.h" 3 template inline _ForwardIterator1 find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, _BinaryPredicate __comp) { ; ; return std::__find_end(__first1, __last1, __first2, __last2, std::__iterator_category(__first1), std::__iterator_category(__first2), __comp); } } # 69 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/algorithm" 2 3 # 48 "enblend.cc" 2 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iostream" 1 3 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iostream" 3 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iostream" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 1 3 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ios" 1 3 # 41 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ios" 3 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ios" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/char_traits.h" 1 3 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/char_traits.h" 3 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/char_traits.h" 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { # 61 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/char_traits.h" 3 template struct _Char_types { typedef unsigned long int_type; typedef std::streampos pos_type; typedef std::streamoff off_type; typedef std::mbstate_t state_type; }; # 86 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/char_traits.h" 3 template struct char_traits { typedef _CharT char_type; typedef typename _Char_types<_CharT>::int_type int_type; typedef typename _Char_types<_CharT>::pos_type pos_type; typedef typename _Char_types<_CharT>::off_type off_type; typedef typename _Char_types<_CharT>::state_type state_type; static void assign(char_type& __c1, const char_type& __c2) { __c1 = __c2; } static bool eq(const char_type& __c1, const char_type& __c2) { return __c1 == __c2; } static bool lt(const char_type& __c1, const char_type& __c2) { return __c1 < __c2; } static int compare(const char_type* __s1, const char_type* __s2, std::size_t __n); static std::size_t length(const char_type* __s); static const char_type* find(const char_type* __s, std::size_t __n, const char_type& __a); static char_type* move(char_type* __s1, const char_type* __s2, std::size_t __n); static char_type* copy(char_type* __s1, const char_type* __s2, std::size_t __n); static char_type* assign(char_type* __s, std::size_t __n, char_type __a); static char_type to_char_type(const int_type& __c) { return static_cast(__c); } static int_type to_int_type(const char_type& __c) { return static_cast(__c); } static bool eq_int_type(const int_type& __c1, const int_type& __c2) { return __c1 == __c2; } static int_type eof() { return static_cast((-1)); } static int_type not_eof(const int_type& __c) { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); } }; template int char_traits<_CharT>:: compare(const char_type* __s1, const char_type* __s2, std::size_t __n) { for (std::size_t __i = 0; __i < __n; ++__i) if (lt(__s1[__i], __s2[__i])) return -1; else if (lt(__s2[__i], __s1[__i])) return 1; return 0; } template std::size_t char_traits<_CharT>:: length(const char_type* __p) { std::size_t __i = 0; while (!eq(__p[__i], char_type())) ++__i; return __i; } template const typename char_traits<_CharT>::char_type* char_traits<_CharT>:: find(const char_type* __s, std::size_t __n, const char_type& __a) { for (std::size_t __i = 0; __i < __n; ++__i) if (eq(__s[__i], __a)) return __s + __i; return 0; } template typename char_traits<_CharT>::char_type* char_traits<_CharT>:: move(char_type* __s1, const char_type* __s2, std::size_t __n) { return static_cast<_CharT*>(std::memmove(__s1, __s2, __n * sizeof(char_type))); } template typename char_traits<_CharT>::char_type* char_traits<_CharT>:: copy(char_type* __s1, const char_type* __s2, std::size_t __n) { std::copy(__s2, __s2 + __n, __s1); return __s1; } template typename char_traits<_CharT>::char_type* char_traits<_CharT>:: assign(char_type* __s, std::size_t __n, char_type __a) { std::fill_n(__s, __n, __a); return __s; } } namespace std __attribute__ ((__visibility__ ("default"))) { # 225 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/char_traits.h" 3 template struct char_traits : public __gnu_cxx::char_traits<_CharT> { }; template<> struct char_traits { typedef char char_type; typedef int int_type; typedef streampos pos_type; typedef streamoff off_type; typedef mbstate_t state_type; static void assign(char_type& __c1, const char_type& __c2) { __c1 = __c2; } static bool eq(const char_type& __c1, const char_type& __c2) { return __c1 == __c2; } static bool lt(const char_type& __c1, const char_type& __c2) { return __c1 < __c2; } static int compare(const char_type* __s1, const char_type* __s2, size_t __n) { return memcmp(__s1, __s2, __n); } static size_t length(const char_type* __s) { return strlen(__s); } static const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { return static_cast(memchr(__s, __a, __n)); } static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) { return static_cast(memmove(__s1, __s2, __n)); } static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) { return static_cast(memcpy(__s1, __s2, __n)); } static char_type* assign(char_type* __s, size_t __n, char_type __a) { return static_cast(memset(__s, __a, __n)); } static char_type to_char_type(const int_type& __c) { return static_cast(__c); } static int_type to_int_type(const char_type& __c) { return static_cast(static_cast(__c)); } static bool eq_int_type(const int_type& __c1, const int_type& __c2) { return __c1 == __c2; } static int_type eof() { return static_cast((-1)); } static int_type not_eof(const int_type& __c) { return (__c == eof()) ? 0 : __c; } }; template<> struct char_traits { typedef wchar_t char_type; typedef wint_t int_type; typedef streamoff off_type; typedef wstreampos pos_type; typedef mbstate_t state_type; static void assign(char_type& __c1, const char_type& __c2) { __c1 = __c2; } static bool eq(const char_type& __c1, const char_type& __c2) { return __c1 == __c2; } static bool lt(const char_type& __c1, const char_type& __c2) { return __c1 < __c2; } static int compare(const char_type* __s1, const char_type* __s2, size_t __n) { return wmemcmp(__s1, __s2, __n); } static size_t length(const char_type* __s) { return wcslen(__s); } static const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { return wmemchr(__s, __a, __n); } static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) { return wmemmove(__s1, __s2, __n); } static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) { return wmemcpy(__s1, __s2, __n); } static char_type* assign(char_type* __s, size_t __n, char_type __a) { return wmemset(__s, __a, __n); } static char_type to_char_type(const int_type& __c) { return char_type(__c); } static int_type to_int_type(const char_type& __c) { return int_type(__c); } static bool eq_int_type(const int_type& __c1, const int_type& __c2) { return __c1 == __c2; } static int_type eof() { return static_cast((0xffffffffu)); } static int_type not_eof(const int_type& __c) { return eq_int_type(__c, eof()) ? 0 : __c; } }; } # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ios" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/localefwd.h" 1 3 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/localefwd.h" 3 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/localefwd.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { class locale; template inline bool isspace(_CharT, const locale&); template inline bool isprint(_CharT, const locale&); template inline bool iscntrl(_CharT, const locale&); template inline bool isupper(_CharT, const locale&); template inline bool islower(_CharT, const locale&); template inline bool isalpha(_CharT, const locale&); template inline bool isdigit(_CharT, const locale&); template inline bool ispunct(_CharT, const locale&); template inline bool isxdigit(_CharT, const locale&); template inline bool isalnum(_CharT, const locale&); template inline bool isgraph(_CharT, const locale&); template inline _CharT toupper(_CharT, const locale&); template inline _CharT tolower(_CharT, const locale&); class ctype_base; template class ctype; template<> class ctype; template<> class ctype; template class ctype_byname; class codecvt_base; class __enc_traits; template class codecvt; template<> class codecvt; template<> class codecvt; template class codecvt_byname; namespace __gnu_cxx_ldbl128 { template > class num_get; template > class num_put; } template class numpunct; template class numpunct_byname; template class collate; template class collate_byname; class time_base; template > class time_get; template > class time_get_byname; template > class time_put; template > class time_put_byname; class money_base; namespace __gnu_cxx_ldbl128 { template > class money_get; template > class money_put; } template class moneypunct; template class moneypunct_byname; class messages_base; template class messages; template class messages_byname; template bool has_facet(const locale& __loc) throw(); template const _Facet& use_facet(const locale& __loc); template inline const _Facet& __check_facet(const _Facet* __f) { if (!__f) __throw_bad_cast(); return *__f; } } # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ios" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 1 3 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/atomicity.h" 1 3 # 40 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/atomicity.h" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/atomic_word.h" 1 3 # 33 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/atomic_word.h" 3 typedef int _Atomic_word; # 41 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/atomicity.h" 2 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { static inline _Atomic_word __exchange_and_add(volatile _Atomic_word* __mem, int __val) { return __sync_fetch_and_add(__mem, __val); } static inline void __atomic_add(volatile _Atomic_word* __mem, int __val) { __sync_fetch_and_add(__mem, __val); } # 66 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/atomicity.h" 3 static inline _Atomic_word __exchange_and_add_single(_Atomic_word* __mem, int __val) { _Atomic_word __result = *__mem; *__mem += __val; return __result; } static inline void __atomic_add_single(_Atomic_word* __mem, int __val) { *__mem += __val; } static inline _Atomic_word __attribute__ ((__unused__)) __exchange_and_add_dispatch(_Atomic_word* __mem, int __val) { if (__gthread_active_p()) return __exchange_and_add(__mem, __val); else return __exchange_and_add_single(__mem, __val); } static inline void __attribute__ ((__unused__)) __atomic_add_dispatch(_Atomic_word* __mem, int __val) { if (__gthread_active_p()) __atomic_add(__mem, __val); else __atomic_add_single(__mem, __val); } } # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 1 3 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/string" 1 3 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/string" 3 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/string" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ostream_insert.h" 1 3 # 38 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ostream_insert.h" 3 # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ostream_insert.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template inline void __ostream_write(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s, streamsize __n) { typedef basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const streamsize __put = __out.rdbuf()->sputn(__s, __n); if (__put != __n) __out.setstate(__ios_base::badbit); } template inline void __ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n) { typedef basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const _CharT __c = __out.fill(); for (; __n > 0; --__n) { const typename _Traits::int_type __put = __out.rdbuf()->sputc(__c); if (_Traits::eq_int_type(__put, _Traits::eof())) { __out.setstate(__ios_base::badbit); break; } } } template basic_ostream<_CharT, _Traits>& __ostream_insert(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s, streamsize __n) { typedef basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; typename __ostream_type::sentry __cerb(__out); if (__cerb) { try { const streamsize __w = __out.width(); if (__w > __n) { const bool __left = ((__out.flags() & __ios_base::adjustfield) == __ios_base::left); if (!__left) __ostream_fill(__out, __w - __n); if (__out.good()) __ostream_write(__out, __s, __n); if (__left && __out.good()) __ostream_fill(__out, __w - __n); } else __ostream_write(__out, __s, __n); __out.width(0); } catch(...) { __out._M_setstate(__ios_base::badbit); } } return __out; } } # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/string" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_function.h" 1 3 # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_function.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 101 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_function.h" 3 template struct unary_function { typedef _Arg argument_type; typedef _Result result_type; }; template struct binary_function { typedef _Arg1 first_argument_type; typedef _Arg2 second_argument_type; typedef _Result result_type; }; # 133 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_function.h" 3 template struct plus : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x + __y; } }; template struct minus : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x - __y; } }; template struct multiplies : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x * __y; } }; template struct divides : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x / __y; } }; template struct modulus : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x % __y; } }; template struct negate : public unary_function<_Tp, _Tp> { _Tp operator()(const _Tp& __x) const { return -__x; } }; # 195 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_function.h" 3 template struct equal_to : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x == __y; } }; template struct not_equal_to : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x != __y; } }; template struct greater : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x > __y; } }; template struct less : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x < __y; } }; template struct greater_equal : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x >= __y; } }; template struct less_equal : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x <= __y; } }; # 256 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_function.h" 3 template struct logical_and : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x && __y; } }; template struct logical_or : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x || __y; } }; template struct logical_not : public unary_function<_Tp, bool> { bool operator()(const _Tp& __x) const { return !__x; } }; # 311 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_function.h" 3 template class unary_negate : public unary_function { protected: _Predicate _M_pred; public: explicit unary_negate(const _Predicate& __x) : _M_pred(__x) {} bool operator()(const typename _Predicate::argument_type& __x) const { return !_M_pred(__x); } }; template inline unary_negate<_Predicate> not1(const _Predicate& __pred) { return unary_negate<_Predicate>(__pred); } template class binary_negate : public binary_function { protected: _Predicate _M_pred; public: explicit binary_negate(const _Predicate& __x) : _M_pred(__x) { } bool operator()(const typename _Predicate::first_argument_type& __x, const typename _Predicate::second_argument_type& __y) const { return !_M_pred(__x, __y); } }; template inline binary_negate<_Predicate> not2(const _Predicate& __pred) { return binary_negate<_Predicate>(__pred); } # 391 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_function.h" 3 template class binder1st : public unary_function { protected: _Operation op; typename _Operation::first_argument_type value; public: binder1st(const _Operation& __x, const typename _Operation::first_argument_type& __y) : op(__x), value(__y) {} typename _Operation::result_type operator()(const typename _Operation::second_argument_type& __x) const { return op(value, __x); } typename _Operation::result_type operator()(typename _Operation::second_argument_type& __x) const { return op(value, __x); } }; template inline binder1st<_Operation> bind1st(const _Operation& __fn, const _Tp& __x) { typedef typename _Operation::first_argument_type _Arg1_type; return binder1st<_Operation>(__fn, _Arg1_type(__x)); } template class binder2nd : public unary_function { protected: _Operation op; typename _Operation::second_argument_type value; public: binder2nd(const _Operation& __x, const typename _Operation::second_argument_type& __y) : op(__x), value(__y) {} typename _Operation::result_type operator()(const typename _Operation::first_argument_type& __x) const { return op(__x, value); } typename _Operation::result_type operator()(typename _Operation::first_argument_type& __x) const { return op(__x, value); } }; template inline binder2nd<_Operation> bind2nd(const _Operation& __fn, const _Tp& __x) { typedef typename _Operation::second_argument_type _Arg2_type; return binder2nd<_Operation>(__fn, _Arg2_type(__x)); } # 480 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_function.h" 3 template class pointer_to_unary_function : public unary_function<_Arg, _Result> { protected: _Result (*_M_ptr)(_Arg); public: pointer_to_unary_function() {} explicit pointer_to_unary_function(_Result (*__x)(_Arg)) : _M_ptr(__x) {} _Result operator()(_Arg __x) const { return _M_ptr(__x); } }; template inline pointer_to_unary_function<_Arg, _Result> ptr_fun(_Result (*__x)(_Arg)) { return pointer_to_unary_function<_Arg, _Result>(__x); } template class pointer_to_binary_function : public binary_function<_Arg1, _Arg2, _Result> { protected: _Result (*_M_ptr)(_Arg1, _Arg2); public: pointer_to_binary_function() {} explicit pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2)) : _M_ptr(__x) {} _Result operator()(_Arg1 __x, _Arg2 __y) const { return _M_ptr(__x, __y); } }; template inline pointer_to_binary_function<_Arg1, _Arg2, _Result> ptr_fun(_Result (*__x)(_Arg1, _Arg2)) { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); } template struct _Identity : public unary_function<_Tp,_Tp> { _Tp& operator()(_Tp& __x) const { return __x; } const _Tp& operator()(const _Tp& __x) const { return __x; } }; template struct _Select1st : public unary_function<_Pair, typename _Pair::first_type> { typename _Pair::first_type& operator()(_Pair& __x) const { return __x.first; } const typename _Pair::first_type& operator()(const _Pair& __x) const { return __x.first; } }; template struct _Select2nd : public unary_function<_Pair, typename _Pair::second_type> { typename _Pair::second_type& operator()(_Pair& __x) const { return __x.second; } const typename _Pair::second_type& operator()(const _Pair& __x) const { return __x.second; } }; # 582 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_function.h" 3 template class mem_fun_t : public unary_function<_Tp*, _Ret> { public: explicit mem_fun_t(_Ret (_Tp::*__pf)()) : _M_f(__pf) {} _Ret operator()(_Tp* __p) const { return (__p->*_M_f)(); } private: _Ret (_Tp::*_M_f)(); }; template class const_mem_fun_t : public unary_function { public: explicit const_mem_fun_t(_Ret (_Tp::*__pf)() const) : _M_f(__pf) {} _Ret operator()(const _Tp* __p) const { return (__p->*_M_f)(); } private: _Ret (_Tp::*_M_f)() const; }; template class mem_fun_ref_t : public unary_function<_Tp, _Ret> { public: explicit mem_fun_ref_t(_Ret (_Tp::*__pf)()) : _M_f(__pf) {} _Ret operator()(_Tp& __r) const { return (__r.*_M_f)(); } private: _Ret (_Tp::*_M_f)(); }; template class const_mem_fun_ref_t : public unary_function<_Tp, _Ret> { public: explicit const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const) : _M_f(__pf) {} _Ret operator()(const _Tp& __r) const { return (__r.*_M_f)(); } private: _Ret (_Tp::*_M_f)() const; }; template class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret> { public: explicit mem_fun1_t(_Ret (_Tp::*__pf)(_Arg)) : _M_f(__pf) {} _Ret operator()(_Tp* __p, _Arg __x) const { return (__p->*_M_f)(__x); } private: _Ret (_Tp::*_M_f)(_Arg); }; template class const_mem_fun1_t : public binary_function { public: explicit const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const) : _M_f(__pf) {} _Ret operator()(const _Tp* __p, _Arg __x) const { return (__p->*_M_f)(__x); } private: _Ret (_Tp::*_M_f)(_Arg) const; }; template class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> { public: explicit mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg)) : _M_f(__pf) {} _Ret operator()(_Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); } private: _Ret (_Tp::*_M_f)(_Arg); }; template class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> { public: explicit const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const) : _M_f(__pf) {} _Ret operator()(const _Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); } private: _Ret (_Tp::*_M_f)(_Arg) const; }; template inline mem_fun_t<_Ret, _Tp> mem_fun(_Ret (_Tp::*__f)()) { return mem_fun_t<_Ret, _Tp>(__f); } template inline const_mem_fun_t<_Ret, _Tp> mem_fun(_Ret (_Tp::*__f)() const) { return const_mem_fun_t<_Ret, _Tp>(__f); } template inline mem_fun_ref_t<_Ret, _Tp> mem_fun_ref(_Ret (_Tp::*__f)()) { return mem_fun_ref_t<_Ret, _Tp>(__f); } template inline const_mem_fun_ref_t<_Ret, _Tp> mem_fun_ref(_Ret (_Tp::*__f)() const) { return const_mem_fun_ref_t<_Ret, _Tp>(__f); } template inline mem_fun1_t<_Ret, _Tp, _Arg> mem_fun(_Ret (_Tp::*__f)(_Arg)) { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); } template inline const_mem_fun1_t<_Ret, _Tp, _Arg> mem_fun(_Ret (_Tp::*__f)(_Arg) const) { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); } template inline mem_fun1_ref_t<_Ret, _Tp, _Arg> mem_fun_ref(_Ret (_Tp::*__f)(_Arg)) { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } template inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg> mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const) { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } } # 54 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/string" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 1 3 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 110 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 template class basic_string { typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type; public: typedef _Traits traits_type; typedef typename _Traits::char_type value_type; typedef _Alloc allocator_type; typedef typename _CharT_alloc_type::size_type size_type; typedef typename _CharT_alloc_type::difference_type difference_type; typedef typename _CharT_alloc_type::reference reference; typedef typename _CharT_alloc_type::const_reference const_reference; typedef typename _CharT_alloc_type::pointer pointer; typedef typename _CharT_alloc_type::const_pointer const_pointer; typedef __gnu_cxx::__normal_iterator iterator; typedef __gnu_cxx::__normal_iterator const_iterator; typedef std::reverse_iterator const_reverse_iterator; typedef std::reverse_iterator reverse_iterator; private: # 147 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 struct _Rep_base { size_type _M_length; size_type _M_capacity; _Atomic_word _M_refcount; }; struct _Rep : _Rep_base { typedef typename _Alloc::template rebind::other _Raw_bytes_alloc; # 172 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 static const size_type _S_max_size; static const _CharT _S_terminal; static size_type _S_empty_rep_storage[]; static _Rep& _S_empty_rep() { void* __p = reinterpret_cast(&_S_empty_rep_storage); return *reinterpret_cast<_Rep*>(__p); } bool _M_is_leaked() const { return this->_M_refcount < 0; } bool _M_is_shared() const { return this->_M_refcount > 0; } void _M_set_leaked() { this->_M_refcount = -1; } void _M_set_sharable() { this->_M_refcount = 0; } void _M_set_length_and_sharable(size_type __n) { this->_M_set_sharable(); this->_M_length = __n; traits_type::assign(this->_M_refdata()[__n], _S_terminal); } _CharT* _M_refdata() throw() { return reinterpret_cast<_CharT*>(this + 1); } _CharT* _M_grab(const _Alloc& __alloc1, const _Alloc& __alloc2) { return (!_M_is_leaked() && __alloc1 == __alloc2) ? _M_refcopy() : _M_clone(__alloc1); } static _Rep* _S_create(size_type, size_type, const _Alloc&); void _M_dispose(const _Alloc& __a) { if (__builtin_expect(this != &_S_empty_rep(), false)) if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount, -1) <= 0) _M_destroy(__a); } void _M_destroy(const _Alloc&) throw(); _CharT* _M_refcopy() throw() { if (__builtin_expect(this != &_S_empty_rep(), false)) __gnu_cxx::__atomic_add_dispatch(&this->_M_refcount, 1); return _M_refdata(); } _CharT* _M_clone(const _Alloc&, size_type __res = 0); }; struct _Alloc_hider : _Alloc { _Alloc_hider(_CharT* __dat, const _Alloc& __a) : _Alloc(__a), _M_p(__dat) { } _CharT* _M_p; }; public: static const size_type npos = static_cast(-1); private: mutable _Alloc_hider _M_dataplus; _CharT* _M_data() const { return _M_dataplus._M_p; } _CharT* _M_data(_CharT* __p) { return (_M_dataplus._M_p = __p); } _Rep* _M_rep() const { return &((reinterpret_cast<_Rep*> (_M_data()))[-1]); } iterator _M_ibegin() const { return iterator(_M_data()); } iterator _M_iend() const { return iterator(_M_data() + this->size()); } void _M_leak() { if (!_M_rep()->_M_is_leaked()) _M_leak_hard(); } size_type _M_check(size_type __pos, const char* __s) const { if (__pos > this->size()) __throw_out_of_range((__s)); return __pos; } void _M_check_length(size_type __n1, size_type __n2, const char* __s) const { if (this->max_size() - (this->size() - __n1) < __n2) __throw_length_error((__s)); } size_type _M_limit(size_type __pos, size_type __off) const { const bool __testoff = __off < this->size() - __pos; return __testoff ? __off : this->size() - __pos; } bool _M_disjunct(const _CharT* __s) const { return (less()(__s, _M_data()) || less()(_M_data() + this->size(), __s)); } static void _M_copy(_CharT* __d, const _CharT* __s, size_type __n) { if (__n == 1) traits_type::assign(*__d, *__s); else traits_type::copy(__d, __s, __n); } static void _M_move(_CharT* __d, const _CharT* __s, size_type __n) { if (__n == 1) traits_type::assign(*__d, *__s); else traits_type::move(__d, __s, __n); } static void _M_assign(_CharT* __d, size_type __n, _CharT __c) { if (__n == 1) traits_type::assign(*__d, __c); else traits_type::assign(__d, __n, __c); } template static void _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2) { for (; __k1 != __k2; ++__k1, ++__p) traits_type::assign(*__p, *__k1); } static void _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) { _S_copy_chars(__p, __k1.base(), __k2.base()); } static void _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2) { _S_copy_chars(__p, __k1.base(), __k2.base()); } static void _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) { _M_copy(__p, __k1, __k2 - __k1); } static void _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2) { _M_copy(__p, __k1, __k2 - __k1); } void _M_mutate(size_type __pos, size_type __len1, size_type __len2); void _M_leak_hard(); static _Rep& _S_empty_rep() { return _Rep::_S_empty_rep(); } public: inline basic_string(); explicit basic_string(const _Alloc& __a); basic_string(const basic_string& __str); basic_string(const basic_string& __str, size_type __pos, size_type __n = npos); basic_string(const basic_string& __str, size_type __pos, size_type __n, const _Alloc& __a); # 453 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 basic_string(const _CharT* __s, size_type __n, const _Alloc& __a = _Alloc()); basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()); basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()); template basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a = _Alloc()); ~basic_string() { _M_rep()->_M_dispose(this->get_allocator()); } basic_string& operator=(const basic_string& __str) { return this->assign(__str); } basic_string& operator=(const _CharT* __s) { return this->assign(__s); } # 508 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 basic_string& operator=(_CharT __c) { this->assign(1, __c); return *this; } iterator begin() { _M_leak(); return iterator(_M_data()); } const_iterator begin() const { return const_iterator(_M_data()); } iterator end() { _M_leak(); return iterator(_M_data() + this->size()); } const_iterator end() const { return const_iterator(_M_data() + this->size()); } reverse_iterator rbegin() { return reverse_iterator(this->end()); } const_reverse_iterator rbegin() const { return const_reverse_iterator(this->end()); } reverse_iterator rend() { return reverse_iterator(this->begin()); } const_reverse_iterator rend() const { return const_reverse_iterator(this->begin()); } public: size_type size() const { return _M_rep()->_M_length; } size_type length() const { return _M_rep()->_M_length; } size_type max_size() const { return _Rep::_S_max_size; } # 619 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 void resize(size_type __n, _CharT __c); # 632 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 void resize(size_type __n) { this->resize(__n, _CharT()); } size_type capacity() const { return _M_rep()->_M_capacity; } # 661 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 void reserve(size_type __res_arg = 0); void clear() { _M_mutate(0, this->size(), 0); } bool empty() const { return this->size() == 0; } # 689 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 const_reference operator[] (size_type __pos) const { ; return _M_data()[__pos]; } # 706 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 reference operator[](size_type __pos) { ; ; _M_leak(); return _M_data()[__pos]; } # 727 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 const_reference at(size_type __n) const { if (__n >= this->size()) __throw_out_of_range(("basic_string::at")); return _M_data()[__n]; } # 746 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 reference at(size_type __n) { if (__n >= size()) __throw_out_of_range(("basic_string::at")); _M_leak(); return _M_data()[__n]; } basic_string& operator+=(const basic_string& __str) { return this->append(__str); } basic_string& operator+=(const _CharT* __s) { return this->append(__s); } basic_string& operator+=(_CharT __c) { this->push_back(__c); return *this; } basic_string& append(const basic_string& __str); # 806 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 basic_string& append(const basic_string& __str, size_type __pos, size_type __n); basic_string& append(const _CharT* __s, size_type __n); basic_string& append(const _CharT* __s) { ; return this->append(__s, traits_type::length(__s)); } # 838 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 basic_string& append(size_type __n, _CharT __c); # 849 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 template basic_string& append(_InputIterator __first, _InputIterator __last) { return this->replace(_M_iend(), _M_iend(), __first, __last); } void push_back(_CharT __c) { const size_type __len = 1 + this->size(); if (__len > this->capacity() || _M_rep()->_M_is_shared()) this->reserve(__len); traits_type::assign(_M_data()[this->size()], __c); _M_rep()->_M_set_length_and_sharable(__len); } basic_string& assign(const basic_string& __str); # 888 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 basic_string& assign(const basic_string& __str, size_type __pos, size_type __n) { return this->assign(__str._M_data() + __str._M_check(__pos, "basic_string::assign"), __str._M_limit(__pos, __n)); } # 904 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 basic_string& assign(const _CharT* __s, size_type __n); # 916 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 basic_string& assign(const _CharT* __s) { ; return this->assign(__s, traits_type::length(__s)); } # 932 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 basic_string& assign(size_type __n, _CharT __c) { return _M_replace_aux(size_type(0), this->size(), __n, __c); } # 944 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 template basic_string& assign(_InputIterator __first, _InputIterator __last) { return this->replace(_M_ibegin(), _M_iend(), __first, __last); } # 961 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 void insert(iterator __p, size_type __n, _CharT __c) { this->replace(__p, __p, __n, __c); } # 976 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 template void insert(iterator __p, _InputIterator __beg, _InputIterator __end) { this->replace(__p, __p, __beg, __end); } # 992 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 basic_string& insert(size_type __pos1, const basic_string& __str) { return this->insert(__pos1, __str, size_type(0), __str.size()); } # 1014 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 basic_string& insert(size_type __pos1, const basic_string& __str, size_type __pos2, size_type __n) { return this->insert(__pos1, __str._M_data() + __str._M_check(__pos2, "basic_string::insert"), __str._M_limit(__pos2, __n)); } # 1037 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 basic_string& insert(size_type __pos, const _CharT* __s, size_type __n); # 1055 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 basic_string& insert(size_type __pos, const _CharT* __s) { ; return this->insert(__pos, __s, traits_type::length(__s)); } # 1078 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 basic_string& insert(size_type __pos, size_type __n, _CharT __c) { return _M_replace_aux(_M_check(__pos, "basic_string::insert"), size_type(0), __n, __c); } # 1095 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 iterator insert(iterator __p, _CharT __c) { ; const size_type __pos = __p - _M_ibegin(); _M_replace_aux(__pos, size_type(0), size_type(1), __c); _M_rep()->_M_set_leaked(); return iterator(_M_data() + __pos); } # 1119 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 basic_string& erase(size_type __pos = 0, size_type __n = npos) { _M_mutate(_M_check(__pos, "basic_string::erase"), _M_limit(__pos, __n), size_type(0)); return *this; } # 1135 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 iterator erase(iterator __position) { ; const size_type __pos = __position - _M_ibegin(); _M_mutate(__pos, size_type(1), size_type(0)); _M_rep()->_M_set_leaked(); return iterator(_M_data() + __pos); } # 1155 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 iterator erase(iterator __first, iterator __last) { ; const size_type __pos = __first - _M_ibegin(); _M_mutate(__pos, __last - __first, size_type(0)); _M_rep()->_M_set_leaked(); return iterator(_M_data() + __pos); } # 1182 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 basic_string& replace(size_type __pos, size_type __n, const basic_string& __str) { return this->replace(__pos, __n, __str._M_data(), __str.size()); } # 1204 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 basic_string& replace(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2) { return this->replace(__pos1, __n1, __str._M_data() + __str._M_check(__pos2, "basic_string::replace"), __str._M_limit(__pos2, __n2)); } # 1228 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 basic_string& replace(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2); # 1247 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 basic_string& replace(size_type __pos, size_type __n1, const _CharT* __s) { ; return this->replace(__pos, __n1, __s, traits_type::length(__s)); } # 1270 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 basic_string& replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) { return _M_replace_aux(_M_check(__pos, "basic_string::replace"), _M_limit(__pos, __n1), __n2, __c); } # 1288 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 basic_string& replace(iterator __i1, iterator __i2, const basic_string& __str) { return this->replace(__i1, __i2, __str._M_data(), __str.size()); } # 1306 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 basic_string& replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n) { ; return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n); } # 1327 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 basic_string& replace(iterator __i1, iterator __i2, const _CharT* __s) { ; return this->replace(__i1, __i2, __s, traits_type::length(__s)); } # 1348 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 basic_string& replace(iterator __i1, iterator __i2, size_type __n, _CharT __c) { ; return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __c); } # 1370 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 template basic_string& replace(iterator __i1, iterator __i2, _InputIterator __k1, _InputIterator __k2) { ; ; typedef typename std::__is_integer<_InputIterator>::__type _Integral; return _M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral()); } basic_string& replace(iterator __i1, iterator __i2, _CharT* __k1, _CharT* __k2) { ; ; return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __k1, __k2 - __k1); } basic_string& replace(iterator __i1, iterator __i2, const _CharT* __k1, const _CharT* __k2) { ; ; return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __k1, __k2 - __k1); } basic_string& replace(iterator __i1, iterator __i2, iterator __k1, iterator __k2) { ; ; return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __k1.base(), __k2 - __k1); } basic_string& replace(iterator __i1, iterator __i2, const_iterator __k1, const_iterator __k2) { ; ; return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __k1.base(), __k2 - __k1); } private: template basic_string& _M_replace_dispatch(iterator __i1, iterator __i2, _Integer __n, _Integer __val, __true_type) { return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __val); } template basic_string& _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, _InputIterator __k2, __false_type); basic_string& _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, _CharT __c); basic_string& _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, size_type __n2); template static _CharT* _S_construct_aux(_InIterator __beg, _InIterator __end, const _Alloc& __a, __false_type) { typedef typename iterator_traits<_InIterator>::iterator_category _Tag; return _S_construct(__beg, __end, __a, _Tag()); } template static _CharT* _S_construct_aux(_InIterator __beg, _InIterator __end, const _Alloc& __a, __true_type) { return _S_construct(static_cast(__beg), static_cast(__end), __a); } template static _CharT* _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a) { typedef typename std::__is_integer<_InIterator>::__type _Integral; return _S_construct_aux(__beg, __end, __a, _Integral()); } template static _CharT* _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, input_iterator_tag); template static _CharT* _S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a, forward_iterator_tag); static _CharT* _S_construct(size_type __req, _CharT __c, const _Alloc& __a); public: # 1501 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 size_type copy(_CharT* __s, size_type __n, size_type __pos = 0) const; # 1511 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 void swap(basic_string& __s); # 1521 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 const _CharT* c_str() const { return _M_data(); } const _CharT* data() const { return _M_data(); } allocator_type get_allocator() const { return _M_dataplus; } # 1553 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 size_type find(const _CharT* __s, size_type __pos, size_type __n) const; # 1566 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 size_type find(const basic_string& __str, size_type __pos = 0) const { return this->find(__str.data(), __pos, __str.size()); } # 1580 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 size_type find(const _CharT* __s, size_type __pos = 0) const { ; return this->find(__s, __pos, traits_type::length(__s)); } # 1597 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 size_type find(_CharT __c, size_type __pos = 0) const; # 1610 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 size_type rfind(const basic_string& __str, size_type __pos = npos) const { return this->rfind(__str.data(), __pos, __str.size()); } # 1625 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 size_type rfind(const _CharT* __s, size_type __pos, size_type __n) const; # 1638 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 size_type rfind(const _CharT* __s, size_type __pos = npos) const { ; return this->rfind(__s, __pos, traits_type::length(__s)); } # 1655 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 size_type rfind(_CharT __c, size_type __pos = npos) const; # 1668 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 size_type find_first_of(const basic_string& __str, size_type __pos = 0) const { return this->find_first_of(__str.data(), __pos, __str.size()); } # 1683 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 size_type find_first_of(const _CharT* __s, size_type __pos, size_type __n) const; # 1696 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 size_type find_first_of(const _CharT* __s, size_type __pos = 0) const { ; return this->find_first_of(__s, __pos, traits_type::length(__s)); } # 1715 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 size_type find_first_of(_CharT __c, size_type __pos = 0) const { return this->find(__c, __pos); } # 1729 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 size_type find_last_of(const basic_string& __str, size_type __pos = npos) const { return this->find_last_of(__str.data(), __pos, __str.size()); } # 1744 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 size_type find_last_of(const _CharT* __s, size_type __pos, size_type __n) const; # 1757 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 size_type find_last_of(const _CharT* __s, size_type __pos = npos) const { ; return this->find_last_of(__s, __pos, traits_type::length(__s)); } # 1776 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 size_type find_last_of(_CharT __c, size_type __pos = npos) const { return this->rfind(__c, __pos); } # 1790 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 size_type find_first_not_of(const basic_string& __str, size_type __pos = 0) const { return this->find_first_not_of(__str.data(), __pos, __str.size()); } # 1805 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 size_type find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const; # 1819 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 size_type find_first_not_of(const _CharT* __s, size_type __pos = 0) const { ; return this->find_first_not_of(__s, __pos, traits_type::length(__s)); } # 1836 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 size_type find_first_not_of(_CharT __c, size_type __pos = 0) const; # 1849 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 size_type find_last_not_of(const basic_string& __str, size_type __pos = npos) const { return this->find_last_not_of(__str.data(), __pos, __str.size()); } # 1865 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 size_type find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const; # 1878 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 size_type find_last_not_of(const _CharT* __s, size_type __pos = npos) const { ; return this->find_last_not_of(__s, __pos, traits_type::length(__s)); } # 1895 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 size_type find_last_not_of(_CharT __c, size_type __pos = npos) const; # 1910 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 basic_string substr(size_type __pos = 0, size_type __n = npos) const { return basic_string(*this, _M_check(__pos, "basic_string::substr"), __n); } # 1928 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 int compare(const basic_string& __str) const { const size_type __size = this->size(); const size_type __osize = __str.size(); const size_type __len = std::min(__size, __osize); int __r = traits_type::compare(_M_data(), __str.data(), __len); if (!__r) __r = __size - __osize; return __r; } # 1958 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 int compare(size_type __pos, size_type __n, const basic_string& __str) const; # 1982 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 int compare(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2) const; # 2000 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 int compare(const _CharT* __s) const; # 2023 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 int compare(size_type __pos, size_type __n1, const _CharT* __s) const; # 2048 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 int compare(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2) const; }; template inline basic_string<_CharT, _Traits, _Alloc>:: basic_string() : _M_dataplus(_S_empty_rep()._M_refdata(), _Alloc()) { } # 2069 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 template basic_string<_CharT, _Traits, _Alloc> operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { basic_string<_CharT, _Traits, _Alloc> __str(__lhs); __str.append(__rhs); return __str; } template basic_string<_CharT,_Traits,_Alloc> operator+(const _CharT* __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); template basic_string<_CharT,_Traits,_Alloc> operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); template inline basic_string<_CharT, _Traits, _Alloc> operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { basic_string<_CharT, _Traits, _Alloc> __str(__lhs); __str.append(__rhs); return __str; } template inline basic_string<_CharT, _Traits, _Alloc> operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) { typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef typename __string_type::size_type __size_type; __string_type __str(__lhs); __str.append(__size_type(1), __rhs); return __str; } # 2140 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 template inline bool operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __lhs.compare(__rhs) == 0; } template inline bool operator==(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) == 0; } template inline bool operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) == 0; } # 2177 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 template inline bool operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) != 0; } template inline bool operator!=(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) != 0; } template inline bool operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) != 0; } # 2214 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 template inline bool operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __lhs.compare(__rhs) < 0; } template inline bool operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) < 0; } template inline bool operator<(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) > 0; } # 2251 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 template inline bool operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __lhs.compare(__rhs) > 0; } template inline bool operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) > 0; } template inline bool operator>(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) < 0; } # 2288 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 template inline bool operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __lhs.compare(__rhs) <= 0; } template inline bool operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) <= 0; } template inline bool operator<=(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) >= 0; } # 2325 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 template inline bool operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __lhs.compare(__rhs) >= 0; } template inline bool operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) >= 0; } template inline bool operator>=(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) <= 0; } # 2362 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 template inline void swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, basic_string<_CharT, _Traits, _Alloc>& __rhs) { __lhs.swap(__rhs); } # 2379 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 template basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Alloc>& __str); template<> basic_istream& operator>>(basic_istream& __is, basic_string& __str); # 2397 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 template inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const basic_string<_CharT, _Traits, _Alloc>& __str) { return __ostream_insert(__os, __str.data(), __str.size()); } # 2420 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 template basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim); # 2437 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h" 3 template inline basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Alloc>& __str) { return getline(__is, __str, __is.widen('\n')); } template<> basic_istream& getline(basic_istream& __in, basic_string& __str, char __delim); template<> basic_istream& getline(basic_istream& __in, basic_string& __str, wchar_t __delim); } # 55 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/string" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.tcc" 1 3 # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.tcc" 3 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template inline bool __is_null_pointer(_Type* __ptr) { return __ptr == 0; } template inline bool __is_null_pointer(_Type) { return false; } template const typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: _Rep::_S_max_size = (((npos - sizeof(_Rep_base))/sizeof(_CharT)) - 1) / 4; template const _CharT basic_string<_CharT, _Traits, _Alloc>:: _Rep::_S_terminal = _CharT(); template const typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>::npos; template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_empty_rep_storage[ (sizeof(_Rep_base) + sizeof(_CharT) + sizeof(size_type) - 1) / sizeof(size_type)]; template template _CharT* basic_string<_CharT, _Traits, _Alloc>:: _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, input_iterator_tag) { if (__beg == __end && __a == _Alloc()) return _S_empty_rep()._M_refdata(); _CharT __buf[128]; size_type __len = 0; while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT)) { __buf[__len++] = *__beg; ++__beg; } _Rep* __r = _Rep::_S_create(__len, size_type(0), __a); _M_copy(__r->_M_refdata(), __buf, __len); try { while (__beg != __end) { if (__len == __r->_M_capacity) { _Rep* __another = _Rep::_S_create(__len + 1, __len, __a); _M_copy(__another->_M_refdata(), __r->_M_refdata(), __len); __r->_M_destroy(__a); __r = __another; } __r->_M_refdata()[__len++] = *__beg; ++__beg; } } catch(...) { __r->_M_destroy(__a); throw; } __r->_M_set_length_and_sharable(__len); return __r->_M_refdata(); } template template _CharT* basic_string<_CharT, _Traits, _Alloc>:: _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, forward_iterator_tag) { if (__beg == __end && __a == _Alloc()) return _S_empty_rep()._M_refdata(); if (__builtin_expect(__is_null_pointer(__beg) && __beg != __end, 0)) __throw_logic_error(("basic_string::_S_construct NULL not valid")); const size_type __dnew = static_cast(std::distance(__beg, __end)); _Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a); try { _S_copy_chars(__r->_M_refdata(), __beg, __end); } catch(...) { __r->_M_destroy(__a); throw; } __r->_M_set_length_and_sharable(__dnew); return __r->_M_refdata(); } template _CharT* basic_string<_CharT, _Traits, _Alloc>:: _S_construct(size_type __n, _CharT __c, const _Alloc& __a) { if (__n == 0 && __a == _Alloc()) return _S_empty_rep()._M_refdata(); _Rep* __r = _Rep::_S_create(__n, size_type(0), __a); if (__n) _M_assign(__r->_M_refdata(), __n, __c); __r->_M_set_length_and_sharable(__n); return __r->_M_refdata(); } template basic_string<_CharT, _Traits, _Alloc>:: basic_string(const basic_string& __str) : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(__str.get_allocator()), __str.get_allocator()), __str.get_allocator()) { } template basic_string<_CharT, _Traits, _Alloc>:: basic_string(const _Alloc& __a) : _M_dataplus(_S_construct(size_type(), _CharT(), __a), __a) { } template basic_string<_CharT, _Traits, _Alloc>:: basic_string(const basic_string& __str, size_type __pos, size_type __n) : _M_dataplus(_S_construct(__str._M_data() + __str._M_check(__pos, "basic_string::basic_string"), __str._M_data() + __str._M_limit(__pos, __n) + __pos, _Alloc()), _Alloc()) { } template basic_string<_CharT, _Traits, _Alloc>:: basic_string(const basic_string& __str, size_type __pos, size_type __n, const _Alloc& __a) : _M_dataplus(_S_construct(__str._M_data() + __str._M_check(__pos, "basic_string::basic_string"), __str._M_data() + __str._M_limit(__pos, __n) + __pos, __a), __a) { } template basic_string<_CharT, _Traits, _Alloc>:: basic_string(const _CharT* __s, size_type __n, const _Alloc& __a) : _M_dataplus(_S_construct(__s, __s + __n, __a), __a) { } template basic_string<_CharT, _Traits, _Alloc>:: basic_string(const _CharT* __s, const _Alloc& __a) : _M_dataplus(_S_construct(__s, __s ? __s + traits_type::length(__s) : __s + npos, __a), __a) { } template basic_string<_CharT, _Traits, _Alloc>:: basic_string(size_type __n, _CharT __c, const _Alloc& __a) : _M_dataplus(_S_construct(__n, __c, __a), __a) { } template template basic_string<_CharT, _Traits, _Alloc>:: basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a) : _M_dataplus(_S_construct(__beg, __end, __a), __a) { } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: assign(const basic_string& __str) { if (_M_rep() != __str._M_rep()) { const allocator_type __a = this->get_allocator(); _CharT* __tmp = __str._M_rep()->_M_grab(__a, __str.get_allocator()); _M_rep()->_M_dispose(__a); _M_data(__tmp); } return *this; } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: assign(const _CharT* __s, size_type __n) { ; _M_check_length(this->size(), __n, "basic_string::assign"); if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) return _M_replace_safe(size_type(0), this->size(), __s, __n); else { const size_type __pos = __s - _M_data(); if (__pos >= __n) _M_copy(_M_data(), __s, __n); else if (__pos) _M_move(_M_data(), __s, __n); _M_rep()->_M_set_length_and_sharable(__n); return *this; } } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: append(size_type __n, _CharT __c) { if (__n) { _M_check_length(size_type(0), __n, "basic_string::append"); const size_type __len = __n + this->size(); if (__len > this->capacity() || _M_rep()->_M_is_shared()) this->reserve(__len); _M_assign(_M_data() + this->size(), __n, __c); _M_rep()->_M_set_length_and_sharable(__len); } return *this; } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: append(const _CharT* __s, size_type __n) { ; if (__n) { _M_check_length(size_type(0), __n, "basic_string::append"); const size_type __len = __n + this->size(); if (__len > this->capacity() || _M_rep()->_M_is_shared()) { if (_M_disjunct(__s)) this->reserve(__len); else { const size_type __off = __s - _M_data(); this->reserve(__len); __s = _M_data() + __off; } } _M_copy(_M_data() + this->size(), __s, __n); _M_rep()->_M_set_length_and_sharable(__len); } return *this; } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: append(const basic_string& __str) { const size_type __size = __str.size(); if (__size) { const size_type __len = __size + this->size(); if (__len > this->capacity() || _M_rep()->_M_is_shared()) this->reserve(__len); _M_copy(_M_data() + this->size(), __str._M_data(), __size); _M_rep()->_M_set_length_and_sharable(__len); } return *this; } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: append(const basic_string& __str, size_type __pos, size_type __n) { __str._M_check(__pos, "basic_string::append"); __n = __str._M_limit(__pos, __n); if (__n) { const size_type __len = __n + this->size(); if (__len > this->capacity() || _M_rep()->_M_is_shared()) this->reserve(__len); _M_copy(_M_data() + this->size(), __str._M_data() + __pos, __n); _M_rep()->_M_set_length_and_sharable(__len); } return *this; } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: insert(size_type __pos, const _CharT* __s, size_type __n) { ; _M_check(__pos, "basic_string::insert"); _M_check_length(size_type(0), __n, "basic_string::insert"); if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) return _M_replace_safe(__pos, size_type(0), __s, __n); else { const size_type __off = __s - _M_data(); _M_mutate(__pos, 0, __n); __s = _M_data() + __off; _CharT* __p = _M_data() + __pos; if (__s + __n <= __p) _M_copy(__p, __s, __n); else if (__s >= __p) _M_copy(__p, __s + __n, __n); else { const size_type __nleft = __p - __s; _M_copy(__p, __s, __nleft); _M_copy(__p + __nleft, __p + __n, __n - __nleft); } return *this; } } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: replace(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2) { ; _M_check(__pos, "basic_string::replace"); __n1 = _M_limit(__pos, __n1); _M_check_length(__n1, __n2, "basic_string::replace"); bool __left; if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) return _M_replace_safe(__pos, __n1, __s, __n2); else if ((__left = __s + __n2 <= _M_data() + __pos) || _M_data() + __pos + __n1 <= __s) { size_type __off = __s - _M_data(); __left ? __off : (__off += __n2 - __n1); _M_mutate(__pos, __n1, __n2); _M_copy(_M_data() + __pos, _M_data() + __off, __n2); return *this; } else { const basic_string __tmp(__s, __n2); return _M_replace_safe(__pos, __n1, __tmp._M_data(), __n2); } } template void basic_string<_CharT, _Traits, _Alloc>::_Rep:: _M_destroy(const _Alloc& __a) throw () { const size_type __size = sizeof(_Rep_base) + (this->_M_capacity + 1) * sizeof(_CharT); _Raw_bytes_alloc(__a).deallocate(reinterpret_cast(this), __size); } template void basic_string<_CharT, _Traits, _Alloc>:: _M_leak_hard() { if (_M_rep() == &_S_empty_rep()) return; if (_M_rep()->_M_is_shared()) _M_mutate(0, 0, 0); _M_rep()->_M_set_leaked(); } template void basic_string<_CharT, _Traits, _Alloc>:: _M_mutate(size_type __pos, size_type __len1, size_type __len2) { const size_type __old_size = this->size(); const size_type __new_size = __old_size + __len2 - __len1; const size_type __how_much = __old_size - __pos - __len1; if (__new_size > this->capacity() || _M_rep()->_M_is_shared()) { const allocator_type __a = get_allocator(); _Rep* __r = _Rep::_S_create(__new_size, this->capacity(), __a); if (__pos) _M_copy(__r->_M_refdata(), _M_data(), __pos); if (__how_much) _M_copy(__r->_M_refdata() + __pos + __len2, _M_data() + __pos + __len1, __how_much); _M_rep()->_M_dispose(__a); _M_data(__r->_M_refdata()); } else if (__how_much && __len1 != __len2) { _M_move(_M_data() + __pos + __len2, _M_data() + __pos + __len1, __how_much); } _M_rep()->_M_set_length_and_sharable(__new_size); } template void basic_string<_CharT, _Traits, _Alloc>:: reserve(size_type __res) { if (__res != this->capacity() || _M_rep()->_M_is_shared()) { if (__res < this->size()) __res = this->size(); const allocator_type __a = get_allocator(); _CharT* __tmp = _M_rep()->_M_clone(__a, __res - this->size()); _M_rep()->_M_dispose(__a); _M_data(__tmp); } } template void basic_string<_CharT, _Traits, _Alloc>:: swap(basic_string& __s) { if (_M_rep()->_M_is_leaked()) _M_rep()->_M_set_sharable(); if (__s._M_rep()->_M_is_leaked()) __s._M_rep()->_M_set_sharable(); if (this->get_allocator() == __s.get_allocator()) { _CharT* __tmp = _M_data(); _M_data(__s._M_data()); __s._M_data(__tmp); } else { const basic_string __tmp1(_M_ibegin(), _M_iend(), __s.get_allocator()); const basic_string __tmp2(__s._M_ibegin(), __s._M_iend(), this->get_allocator()); *this = __tmp2; __s = __tmp1; } } template typename basic_string<_CharT, _Traits, _Alloc>::_Rep* basic_string<_CharT, _Traits, _Alloc>::_Rep:: _S_create(size_type __capacity, size_type __old_capacity, const _Alloc& __alloc) { if (__capacity > _S_max_size) __throw_length_error(("basic_string::_S_create")); # 559 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.tcc" 3 const size_type __pagesize = 4096; const size_type __malloc_header_size = 4 * sizeof(void*); if (__capacity > __old_capacity && __capacity < 2 * __old_capacity) __capacity = 2 * __old_capacity; size_type __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); const size_type __adj_size = __size + __malloc_header_size; if (__adj_size > __pagesize && __capacity > __old_capacity) { const size_type __extra = __pagesize - __adj_size % __pagesize; __capacity += __extra / sizeof(_CharT); if (__capacity > _S_max_size) __capacity = _S_max_size; __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); } void* __place = _Raw_bytes_alloc(__alloc).allocate(__size); _Rep *__p = new (__place) _Rep; __p->_M_capacity = __capacity; __p->_M_set_sharable(); return __p; } template _CharT* basic_string<_CharT, _Traits, _Alloc>::_Rep:: _M_clone(const _Alloc& __alloc, size_type __res) { const size_type __requested_cap = this->_M_length + __res; _Rep* __r = _Rep::_S_create(__requested_cap, this->_M_capacity, __alloc); if (this->_M_length) _M_copy(__r->_M_refdata(), _M_refdata(), this->_M_length); __r->_M_set_length_and_sharable(this->_M_length); return __r->_M_refdata(); } template void basic_string<_CharT, _Traits, _Alloc>:: resize(size_type __n, _CharT __c) { const size_type __size = this->size(); _M_check_length(__size, __n, "basic_string::resize"); if (__size < __n) this->append(__n - __size, __c); else if (__n < __size) this->erase(__n); } template template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, _InputIterator __k2, __false_type) { const basic_string __s(__k1, __k2); const size_type __n1 = __i2 - __i1; _M_check_length(__n1, __s.size(), "basic_string::_M_replace_dispatch"); return _M_replace_safe(__i1 - _M_ibegin(), __n1, __s._M_data(), __s.size()); } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, _CharT __c) { _M_check_length(__n1, __n2, "basic_string::_M_replace_aux"); _M_mutate(__pos1, __n1, __n2); if (__n2) _M_assign(_M_data() + __pos1, __n2, __c); return *this; } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, size_type __n2) { _M_mutate(__pos1, __n1, __n2); if (__n2) _M_copy(_M_data() + __pos1, __s, __n2); return *this; } template basic_string<_CharT, _Traits, _Alloc> operator+(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { ; typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef typename __string_type::size_type __size_type; const __size_type __len = _Traits::length(__lhs); __string_type __str; __str.reserve(__len + __rhs.size()); __str.append(__lhs, __len); __str.append(__rhs); return __str; } template basic_string<_CharT, _Traits, _Alloc> operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef typename __string_type::size_type __size_type; __string_type __str; const __size_type __len = __rhs.size(); __str.reserve(__len + 1); __str.append(__size_type(1), __lhs); __str.append(__rhs); return __str; } template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: copy(_CharT* __s, size_type __n, size_type __pos) const { _M_check(__pos, "basic_string::copy"); __n = _M_limit(__pos, __n); ; if (__n) _M_copy(__s, _M_data() + __pos, __n); return __n; } template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find(const _CharT* __s, size_type __pos, size_type __n) const { ; const size_type __size = this->size(); const _CharT* __data = _M_data(); if (__n == 0) return __pos <= __size ? __pos : npos; if (__n <= __size) { for (; __pos <= __size - __n; ++__pos) if (traits_type::eq(__data[__pos], __s[0]) && traits_type::compare(__data + __pos + 1, __s + 1, __n - 1) == 0) return __pos; } return npos; } template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find(_CharT __c, size_type __pos) const { size_type __ret = npos; const size_type __size = this->size(); if (__pos < __size) { const _CharT* __data = _M_data(); const size_type __n = __size - __pos; const _CharT* __p = traits_type::find(__data + __pos, __n, __c); if (__p) __ret = __p - __data; } return __ret; } template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: rfind(const _CharT* __s, size_type __pos, size_type __n) const { ; const size_type __size = this->size(); if (__n <= __size) { __pos = std::min(size_type(__size - __n), __pos); const _CharT* __data = _M_data(); do { if (traits_type::compare(__data + __pos, __s, __n) == 0) return __pos; } while (__pos-- > 0); } return npos; } template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: rfind(_CharT __c, size_type __pos) const { size_type __size = this->size(); if (__size) { if (--__size > __pos) __size = __pos; for (++__size; __size-- > 0; ) if (traits_type::eq(_M_data()[__size], __c)) return __size; } return npos; } template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_first_of(const _CharT* __s, size_type __pos, size_type __n) const { ; for (; __n && __pos < this->size(); ++__pos) { const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]); if (__p) return __pos; } return npos; } template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_last_of(const _CharT* __s, size_type __pos, size_type __n) const { ; size_type __size = this->size(); if (__size && __n) { if (--__size > __pos) __size = __pos; do { if (traits_type::find(__s, __n, _M_data()[__size])) return __size; } while (__size-- != 0); } return npos; } template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const { ; for (; __pos < this->size(); ++__pos) if (!traits_type::find(__s, __n, _M_data()[__pos])) return __pos; return npos; } template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_first_not_of(_CharT __c, size_type __pos) const { for (; __pos < this->size(); ++__pos) if (!traits_type::eq(_M_data()[__pos], __c)) return __pos; return npos; } template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const { ; size_type __size = this->size(); if (__size) { if (--__size > __pos) __size = __pos; do { if (!traits_type::find(__s, __n, _M_data()[__size])) return __size; } while (__size--); } return npos; } template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_last_not_of(_CharT __c, size_type __pos) const { size_type __size = this->size(); if (__size) { if (--__size > __pos) __size = __pos; do { if (!traits_type::eq(_M_data()[__size], __c)) return __size; } while (__size--); } return npos; } template int basic_string<_CharT, _Traits, _Alloc>:: compare(size_type __pos, size_type __n, const basic_string& __str) const { _M_check(__pos, "basic_string::compare"); __n = _M_limit(__pos, __n); const size_type __osize = __str.size(); const size_type __len = std::min(__n, __osize); int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len); if (!__r) __r = __n - __osize; return __r; } template int basic_string<_CharT, _Traits, _Alloc>:: compare(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2) const { _M_check(__pos1, "basic_string::compare"); __str._M_check(__pos2, "basic_string::compare"); __n1 = _M_limit(__pos1, __n1); __n2 = __str._M_limit(__pos2, __n2); const size_type __len = std::min(__n1, __n2); int __r = traits_type::compare(_M_data() + __pos1, __str.data() + __pos2, __len); if (!__r) __r = __n1 - __n2; return __r; } template int basic_string<_CharT, _Traits, _Alloc>:: compare(const _CharT* __s) const { ; const size_type __size = this->size(); const size_type __osize = traits_type::length(__s); const size_type __len = std::min(__size, __osize); int __r = traits_type::compare(_M_data(), __s, __len); if (!__r) __r = __size - __osize; return __r; } template int basic_string <_CharT, _Traits, _Alloc>:: compare(size_type __pos, size_type __n1, const _CharT* __s) const { ; _M_check(__pos, "basic_string::compare"); __n1 = _M_limit(__pos, __n1); const size_type __osize = traits_type::length(__s); const size_type __len = std::min(__n1, __osize); int __r = traits_type::compare(_M_data() + __pos, __s, __len); if (!__r) __r = __n1 - __osize; return __r; } template int basic_string <_CharT, _Traits, _Alloc>:: compare(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2) const { ; _M_check(__pos, "basic_string::compare"); __n1 = _M_limit(__pos, __n1); const size_type __len = std::min(__n1, __n2); int __r = traits_type::compare(_M_data() + __pos, __s, __len); if (!__r) __r = __n1 - __n2; return __r; } extern template class basic_string; extern template basic_istream& operator>>(basic_istream&, string&); extern template basic_ostream& operator<<(basic_ostream&, const string&); extern template basic_istream& getline(basic_istream&, string&, char); extern template basic_istream& getline(basic_istream&, string&); extern template class basic_string; extern template basic_istream& operator>>(basic_istream&, wstring&); extern template basic_ostream& operator<<(basic_ostream&, const wstring&); extern template basic_istream& getline(basic_istream&, wstring&, wchar_t); extern template basic_istream& getline(basic_istream&, wstring&); } # 59 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/string" 2 3 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 66 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3 class locale { public: typedef int category; class facet; class id; class _Impl; friend class facet; friend class _Impl; template friend bool has_facet(const locale&) throw(); template friend const _Facet& use_facet(const locale&); template friend struct __use_cache; # 104 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3 static const category none = 0; static const category ctype = 1L << 0; static const category numeric = 1L << 1; static const category collate = 1L << 2; static const category time = 1L << 3; static const category monetary = 1L << 4; static const category messages = 1L << 5; static const category all = (ctype | numeric | collate | time | monetary | messages); # 123 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3 locale() throw(); # 132 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3 locale(const locale& __other) throw(); # 142 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3 explicit locale(const char* __s); # 157 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3 locale(const locale& __base, const char* __s, category __cat); # 170 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3 locale(const locale& __base, const locale& __add, category __cat); # 182 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3 template locale(const locale& __other, _Facet* __f); ~locale() throw(); # 196 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3 const locale& operator=(const locale& __other) throw(); # 211 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3 template locale combine(const locale& __other) const; string name() const; # 230 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3 bool operator==(const locale& __other) const throw (); inline bool operator!=(const locale& __other) const throw () { return !(this->operator==(__other)); } # 258 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3 template bool operator()(const basic_string<_Char, _Traits, _Alloc>& __s1, const basic_string<_Char, _Traits, _Alloc>& __s2) const; # 274 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3 static locale global(const locale&); static const locale& classic(); private: _Impl* _M_impl; static _Impl* _S_classic; static _Impl* _S_global; static const char* const* const _S_categories; # 309 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3 enum { _S_categories_size = 6 + 6 }; static __gthread_once_t _S_once; explicit locale(_Impl*) throw(); static void _S_initialize(); static void _S_initialize_once(); static category _S_normalize_category(category); void _M_coalesce(const locale& __base, const locale& __add, category __cat); }; # 342 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3 class locale::facet { private: friend class locale; friend class locale::_Impl; mutable _Atomic_word _M_refcount; static __c_locale _S_c_locale; static const char _S_c_name[2]; static __gthread_once_t _S_once; static void _S_initialize_once(); protected: # 373 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3 explicit facet(size_t __refs = 0) throw() : _M_refcount(__refs ? 1 : 0) { } virtual ~facet(); static void _S_create_c_locale(__c_locale& __cloc, const char* __s, __c_locale __old = 0); static __c_locale _S_clone_c_locale(__c_locale& __cloc); static void _S_destroy_c_locale(__c_locale& __cloc); static __c_locale _S_get_c_locale(); static const char* _S_get_c_name(); private: inline void _M_add_reference() const throw() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } inline void _M_remove_reference() const throw() { if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) { try { delete this; } catch (...) { } } } facet(const facet&); facet& operator=(const facet&); }; # 433 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_classes.h" 3 class locale::id { private: friend class locale; friend class locale::_Impl; template friend const _Facet& use_facet(const locale&); template friend bool has_facet(const locale&) throw (); mutable size_t _M_index; static _Atomic_word _S_refcount; void operator=(const id&); id(const id&); public: id() { } size_t _M_id() const; }; class locale::_Impl { public: friend class locale; friend class locale::facet; template friend bool has_facet(const locale&) throw(); template friend const _Facet& use_facet(const locale&); template friend struct __use_cache; private: _Atomic_word _M_refcount; const facet** _M_facets; size_t _M_facets_size; const facet** _M_caches; char** _M_names; static const locale::id* const _S_id_ctype[]; static const locale::id* const _S_id_numeric[]; static const locale::id* const _S_id_collate[]; static const locale::id* const _S_id_time[]; static const locale::id* const _S_id_monetary[]; static const locale::id* const _S_id_messages[]; static const locale::id* const* const _S_facet_categories[]; inline void _M_add_reference() throw() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } inline void _M_remove_reference() throw() { if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) { try { delete this; } catch(...) { } } } _Impl(const _Impl&, size_t); _Impl(const char*, size_t); _Impl(size_t) throw(); ~_Impl() throw(); _Impl(const _Impl&); void operator=(const _Impl&); inline bool _M_check_same_name() { bool __ret = true; if (_M_names[1]) for (size_t __i = 0; __ret && __i < _S_categories_size - 1; ++__i) __ret = std::strcmp(_M_names[__i], _M_names[__i + 1]) == 0; return __ret; } void _M_replace_categories(const _Impl*, category); void _M_replace_category(const _Impl*, const locale::id* const*); void _M_replace_facet(const _Impl*, const locale::id*); void _M_install_facet(const locale::id*, const facet*); template inline void _M_init_facet(_Facet* __facet) { _M_install_facet(&_Facet::id, __facet); } void _M_install_cache(const facet*, size_t); }; template locale::locale(const locale& __other, _Facet* __f) { _M_impl = new _Impl(*__other._M_impl, 1); try { _M_impl->_M_install_facet(&_Facet::id, __f); } catch(...) { _M_impl->_M_remove_reference(); throw; } delete [] _M_impl->_M_names[0]; _M_impl->_M_names[0] = 0; } } # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { enum _Ios_Fmtflags { _S_boolalpha = 1L << 0, _S_dec = 1L << 1, _S_fixed = 1L << 2, _S_hex = 1L << 3, _S_internal = 1L << 4, _S_left = 1L << 5, _S_oct = 1L << 6, _S_right = 1L << 7, _S_scientific = 1L << 8, _S_showbase = 1L << 9, _S_showpoint = 1L << 10, _S_showpos = 1L << 11, _S_skipws = 1L << 12, _S_unitbuf = 1L << 13, _S_uppercase = 1L << 14, _S_adjustfield = _S_left | _S_right | _S_internal, _S_basefield = _S_dec | _S_oct | _S_hex, _S_floatfield = _S_scientific | _S_fixed, _S_ios_fmtflags_end = 1L << 16 }; inline _Ios_Fmtflags operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) { return _Ios_Fmtflags(static_cast(__a) & static_cast(__b)); } inline _Ios_Fmtflags operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) { return _Ios_Fmtflags(static_cast(__a) | static_cast(__b)); } inline _Ios_Fmtflags operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) { return _Ios_Fmtflags(static_cast(__a) ^ static_cast(__b)); } inline _Ios_Fmtflags& operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) { return __a = __a | __b; } inline _Ios_Fmtflags& operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) { return __a = __a & __b; } inline _Ios_Fmtflags& operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) { return __a = __a ^ __b; } inline _Ios_Fmtflags operator~(_Ios_Fmtflags __a) { return _Ios_Fmtflags(~static_cast(__a)); } enum _Ios_Openmode { _S_app = 1L << 0, _S_ate = 1L << 1, _S_bin = 1L << 2, _S_in = 1L << 3, _S_out = 1L << 4, _S_trunc = 1L << 5, _S_ios_openmode_end = 1L << 16 }; inline _Ios_Openmode operator&(_Ios_Openmode __a, _Ios_Openmode __b) { return _Ios_Openmode(static_cast(__a) & static_cast(__b)); } inline _Ios_Openmode operator|(_Ios_Openmode __a, _Ios_Openmode __b) { return _Ios_Openmode(static_cast(__a) | static_cast(__b)); } inline _Ios_Openmode operator^(_Ios_Openmode __a, _Ios_Openmode __b) { return _Ios_Openmode(static_cast(__a) ^ static_cast(__b)); } inline _Ios_Openmode& operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) { return __a = __a | __b; } inline _Ios_Openmode& operator&=(_Ios_Openmode& __a, _Ios_Openmode __b) { return __a = __a & __b; } inline _Ios_Openmode& operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) { return __a = __a ^ __b; } inline _Ios_Openmode operator~(_Ios_Openmode __a) { return _Ios_Openmode(~static_cast(__a)); } enum _Ios_Iostate { _S_goodbit = 0, _S_badbit = 1L << 0, _S_eofbit = 1L << 1, _S_failbit = 1L << 2, _S_ios_iostate_end = 1L << 16 }; inline _Ios_Iostate operator&(_Ios_Iostate __a, _Ios_Iostate __b) { return _Ios_Iostate(static_cast(__a) & static_cast(__b)); } inline _Ios_Iostate operator|(_Ios_Iostate __a, _Ios_Iostate __b) { return _Ios_Iostate(static_cast(__a) | static_cast(__b)); } inline _Ios_Iostate operator^(_Ios_Iostate __a, _Ios_Iostate __b) { return _Ios_Iostate(static_cast(__a) ^ static_cast(__b)); } inline _Ios_Iostate& operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) { return __a = __a | __b; } inline _Ios_Iostate& operator&=(_Ios_Iostate& __a, _Ios_Iostate __b) { return __a = __a & __b; } inline _Ios_Iostate& operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) { return __a = __a ^ __b; } inline _Ios_Iostate operator~(_Ios_Iostate __a) { return _Ios_Iostate(~static_cast(__a)); } enum _Ios_Seekdir { _S_beg = 0, _S_cur = 1, _S_end = 2, _S_ios_seekdir_end = 1L << 16 }; # 201 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3 class ios_base { public: class failure : public exception { public: explicit failure(const string& __str) throw(); virtual ~failure() throw(); virtual const char* what() const throw(); private: string _M_msg; }; # 253 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3 typedef _Ios_Fmtflags fmtflags; static const fmtflags boolalpha = _S_boolalpha; static const fmtflags dec = _S_dec; static const fmtflags fixed = _S_fixed; static const fmtflags hex = _S_hex; static const fmtflags internal = _S_internal; static const fmtflags left = _S_left; static const fmtflags oct = _S_oct; static const fmtflags right = _S_right; static const fmtflags scientific = _S_scientific; static const fmtflags showbase = _S_showbase; static const fmtflags showpoint = _S_showpoint; static const fmtflags showpos = _S_showpos; static const fmtflags skipws = _S_skipws; static const fmtflags unitbuf = _S_unitbuf; static const fmtflags uppercase = _S_uppercase; static const fmtflags adjustfield = _S_adjustfield; static const fmtflags basefield = _S_basefield; static const fmtflags floatfield = _S_floatfield; # 328 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3 typedef _Ios_Iostate iostate; static const iostate badbit = _S_badbit; static const iostate eofbit = _S_eofbit; static const iostate failbit = _S_failbit; static const iostate goodbit = _S_goodbit; # 359 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3 typedef _Ios_Openmode openmode; static const openmode app = _S_app; static const openmode ate = _S_ate; static const openmode binary = _S_bin; static const openmode in = _S_in; static const openmode out = _S_out; static const openmode trunc = _S_trunc; # 392 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3 typedef _Ios_Seekdir seekdir; static const seekdir beg = _S_beg; static const seekdir cur = _S_cur; static const seekdir end = _S_end; typedef int io_state; typedef int open_mode; typedef int seek_dir; typedef std::streampos streampos; typedef std::streamoff streamoff; # 418 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3 enum event { erase_event, imbue_event, copyfmt_event }; # 435 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3 typedef void (*event_callback) (event, ios_base&, int); # 447 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3 void register_callback(event_callback __fn, int __index); protected: streamsize _M_precision; streamsize _M_width; fmtflags _M_flags; iostate _M_exception; iostate _M_streambuf_state; struct _Callback_list { _Callback_list* _M_next; ios_base::event_callback _M_fn; int _M_index; _Atomic_word _M_refcount; _Callback_list(ios_base::event_callback __fn, int __index, _Callback_list* __cb) : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { } void _M_add_reference() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } int _M_remove_reference() { return __gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1); } }; _Callback_list* _M_callbacks; void _M_call_callbacks(event __ev) throw(); void _M_dispose_callbacks(void); struct _Words { void* _M_pword; long _M_iword; _Words() : _M_pword(0), _M_iword(0) { } }; _Words _M_word_zero; enum { _S_local_word_size = 8 }; _Words _M_local_word[_S_local_word_size]; int _M_word_size; _Words* _M_word; _Words& _M_grow_words(int __index, bool __iword); locale _M_ios_locale; void _M_init(); public: class Init { friend class ios_base; public: Init(); ~Init(); private: static _Atomic_word _S_refcount; static bool _S_synced_with_stdio; }; inline fmtflags flags() const { return _M_flags; } # 557 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3 inline fmtflags flags(fmtflags __fmtfl) { fmtflags __old = _M_flags; _M_flags = __fmtfl; return __old; } # 573 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3 inline fmtflags setf(fmtflags __fmtfl) { fmtflags __old = _M_flags; _M_flags |= __fmtfl; return __old; } # 590 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3 inline fmtflags setf(fmtflags __fmtfl, fmtflags __mask) { fmtflags __old = _M_flags; _M_flags &= ~__mask; _M_flags |= (__fmtfl & __mask); return __old; } inline void unsetf(fmtflags __mask) { _M_flags &= ~__mask; } # 617 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3 inline streamsize precision() const { return _M_precision; } inline streamsize precision(streamsize __prec) { streamsize __old = _M_precision; _M_precision = __prec; return __old; } inline streamsize width() const { return _M_width; } inline streamsize width(streamsize __wide) { streamsize __old = _M_width; _M_width = __wide; return __old; } # 666 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3 static bool sync_with_stdio(bool __sync = true); # 678 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3 locale imbue(const locale& __loc); # 689 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3 inline locale getloc() const { return _M_ios_locale; } # 699 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3 inline const locale& _M_getloc() const { return _M_ios_locale; } # 717 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3 static int xalloc() throw(); # 733 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3 inline long& iword(int __ix) { _Words& __word = (__ix < _M_word_size) ? _M_word[__ix] : _M_grow_words(__ix, true); return __word._M_iword; } # 754 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3 inline void*& pword(int __ix) { _Words& __word = (__ix < _M_word_size) ? _M_word[__ix] : _M_grow_words(__ix, false); return __word._M_pword; } # 771 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ios_base.h" 3 virtual ~ios_base(); protected: ios_base(); private: ios_base(const ios_base&); ios_base& operator=(const ios_base&); }; inline ios_base& boolalpha(ios_base& __base) { __base.setf(ios_base::boolalpha); return __base; } inline ios_base& noboolalpha(ios_base& __base) { __base.unsetf(ios_base::boolalpha); return __base; } inline ios_base& showbase(ios_base& __base) { __base.setf(ios_base::showbase); return __base; } inline ios_base& noshowbase(ios_base& __base) { __base.unsetf(ios_base::showbase); return __base; } inline ios_base& showpoint(ios_base& __base) { __base.setf(ios_base::showpoint); return __base; } inline ios_base& noshowpoint(ios_base& __base) { __base.unsetf(ios_base::showpoint); return __base; } inline ios_base& showpos(ios_base& __base) { __base.setf(ios_base::showpos); return __base; } inline ios_base& noshowpos(ios_base& __base) { __base.unsetf(ios_base::showpos); return __base; } inline ios_base& skipws(ios_base& __base) { __base.setf(ios_base::skipws); return __base; } inline ios_base& noskipws(ios_base& __base) { __base.unsetf(ios_base::skipws); return __base; } inline ios_base& uppercase(ios_base& __base) { __base.setf(ios_base::uppercase); return __base; } inline ios_base& nouppercase(ios_base& __base) { __base.unsetf(ios_base::uppercase); return __base; } inline ios_base& unitbuf(ios_base& __base) { __base.setf(ios_base::unitbuf); return __base; } inline ios_base& nounitbuf(ios_base& __base) { __base.unsetf(ios_base::unitbuf); return __base; } inline ios_base& internal(ios_base& __base) { __base.setf(ios_base::internal, ios_base::adjustfield); return __base; } inline ios_base& left(ios_base& __base) { __base.setf(ios_base::left, ios_base::adjustfield); return __base; } inline ios_base& right(ios_base& __base) { __base.setf(ios_base::right, ios_base::adjustfield); return __base; } inline ios_base& dec(ios_base& __base) { __base.setf(ios_base::dec, ios_base::basefield); return __base; } inline ios_base& hex(ios_base& __base) { __base.setf(ios_base::hex, ios_base::basefield); return __base; } inline ios_base& oct(ios_base& __base) { __base.setf(ios_base::oct, ios_base::basefield); return __base; } inline ios_base& fixed(ios_base& __base) { __base.setf(ios_base::fixed, ios_base::floatfield); return __base; } inline ios_base& scientific(ios_base& __base) { __base.setf(ios_base::scientific, ios_base::floatfield); return __base; } } # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ios" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 1 3 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 # 51 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template streamsize __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*, basic_streambuf<_CharT, _Traits>*, bool&); # 123 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 template class basic_streambuf { public: typedef _CharT char_type; typedef _Traits traits_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; # 146 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 typedef basic_streambuf __streambuf_type; friend class basic_ios; friend class basic_istream; friend class basic_ostream; friend class istreambuf_iterator; friend class ostreambuf_iterator; friend streamsize __copy_streambufs_eof<>(__streambuf_type*, __streambuf_type*, bool&); template friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, _CharT2*>::__type __copy_aux(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, _CharT2*); template friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, istreambuf_iterator<_CharT2> >::__type find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, const _CharT2&); template friend basic_istream<_CharT2, _Traits2>& operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*); template friend basic_istream<_CharT2, _Traits2>& operator>>(basic_istream<_CharT2, _Traits2>&, basic_string<_CharT2, _Traits2, _Alloc>&); template friend basic_istream<_CharT2, _Traits2>& getline(basic_istream<_CharT2, _Traits2>&, basic_string<_CharT2, _Traits2, _Alloc>&, _CharT2); protected: # 195 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 char_type* _M_in_beg; char_type* _M_in_cur; char_type* _M_in_end; char_type* _M_out_beg; char_type* _M_out_cur; char_type* _M_out_end; locale _M_buf_locale; public: virtual ~basic_streambuf() { } # 223 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 locale pubimbue(const locale &__loc) { locale __tmp(this->getloc()); this->imbue(__loc); _M_buf_locale = __loc; return __tmp; } # 240 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 locale getloc() const { return _M_buf_locale; } # 253 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 __streambuf_type* pubsetbuf(char_type* __s, streamsize __n) { return this->setbuf(__s, __n); } pos_type pubseekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode = ios_base::in | ios_base::out) { return this->seekoff(__off, __way, __mode); } pos_type pubseekpos(pos_type __sp, ios_base::openmode __mode = ios_base::in | ios_base::out) { return this->seekpos(__sp, __mode); } int pubsync() { return this->sync(); } # 280 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 streamsize in_avail() { const streamsize __ret = this->egptr() - this->gptr(); return __ret ? __ret : this->showmanyc(); } # 294 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 int_type snextc() { int_type __ret = traits_type::eof(); if (__builtin_expect(!traits_type::eq_int_type(this->sbumpc(), __ret), true)) __ret = this->sgetc(); return __ret; } # 312 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 int_type sbumpc() { int_type __ret; if (__builtin_expect(this->gptr() < this->egptr(), true)) { __ret = traits_type::to_int_type(*this->gptr()); this->gbump(1); } else __ret = this->uflow(); return __ret; } # 334 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 int_type sgetc() { int_type __ret; if (__builtin_expect(this->gptr() < this->egptr(), true)) __ret = traits_type::to_int_type(*this->gptr()); else __ret = this->underflow(); return __ret; } # 353 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 streamsize sgetn(char_type* __s, streamsize __n) { return this->xsgetn(__s, __n); } # 367 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 int_type sputbackc(char_type __c) { int_type __ret; const bool __testpos = this->eback() < this->gptr(); if (__builtin_expect(!__testpos || !traits_type::eq(__c, this->gptr()[-1]), false)) __ret = this->pbackfail(traits_type::to_int_type(__c)); else { this->gbump(-1); __ret = traits_type::to_int_type(*this->gptr()); } return __ret; } # 392 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 int_type sungetc() { int_type __ret; if (__builtin_expect(this->eback() < this->gptr(), true)) { this->gbump(-1); __ret = traits_type::to_int_type(*this->gptr()); } else __ret = this->pbackfail(); return __ret; } # 419 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 int_type sputc(char_type __c) { int_type __ret; if (__builtin_expect(this->pptr() < this->epptr(), true)) { *this->pptr() = __c; this->pbump(1); __ret = traits_type::to_int_type(__c); } else __ret = this->overflow(traits_type::to_int_type(__c)); return __ret; } # 445 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 streamsize sputn(const char_type* __s, streamsize __n) { return this->xsputn(__s, __n); } protected: # 459 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 basic_streambuf() : _M_in_beg(0), _M_in_cur(0), _M_in_end(0), _M_out_beg(0), _M_out_cur(0), _M_out_end(0), _M_buf_locale(locale()) { } # 477 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 char_type* eback() const { return _M_in_beg; } char_type* gptr() const { return _M_in_cur; } char_type* egptr() const { return _M_in_end; } # 493 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 void gbump(int __n) { _M_in_cur += __n; } # 504 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 void setg(char_type* __gbeg, char_type* __gnext, char_type* __gend) { _M_in_beg = __gbeg; _M_in_cur = __gnext; _M_in_end = __gend; } # 524 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 char_type* pbase() const { return _M_out_beg; } char_type* pptr() const { return _M_out_cur; } char_type* epptr() const { return _M_out_end; } # 540 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 void pbump(int __n) { _M_out_cur += __n; } # 550 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 void setp(char_type* __pbeg, char_type* __pend) { _M_out_beg = _M_out_cur = __pbeg; _M_out_end = __pend; } # 571 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 virtual void imbue(const locale&) { } # 586 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 virtual basic_streambuf* setbuf(char_type*, streamsize) { return this; } # 597 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 virtual pos_type seekoff(off_type, ios_base::seekdir, ios_base::openmode = ios_base::in | ios_base::out) { return pos_type(off_type(-1)); } # 609 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 virtual pos_type seekpos(pos_type, ios_base::openmode = ios_base::in | ios_base::out) { return pos_type(off_type(-1)); } # 622 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 virtual int sync() { return 0; } # 644 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 virtual streamsize showmanyc() { return 0; } # 660 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 virtual streamsize xsgetn(char_type* __s, streamsize __n); # 682 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 virtual int_type underflow() { return traits_type::eof(); } # 695 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 virtual int_type uflow() { int_type __ret = traits_type::eof(); const bool __testeof = traits_type::eq_int_type(this->underflow(), __ret); if (!__testeof) { __ret = traits_type::to_int_type(*this->gptr()); this->gbump(1); } return __ret; } # 719 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 virtual int_type pbackfail(int_type = traits_type::eof()) { return traits_type::eof(); } # 737 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 virtual streamsize xsputn(const char_type* __s, streamsize __n); # 762 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 virtual int_type overflow(int_type = traits_type::eof()) { return traits_type::eof(); } # 791 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 3 private: basic_streambuf(const __streambuf_type& __sb) : _M_in_beg(__sb._M_in_beg), _M_in_cur(__sb._M_in_cur), _M_in_end(__sb._M_in_end), _M_out_beg(__sb._M_out_beg), _M_out_cur(__sb._M_out_cur), _M_out_end(__sb._M_out_cur), _M_buf_locale(__sb._M_buf_locale) { } __streambuf_type& operator=(const __streambuf_type&) { return *this; }; }; template<> streamsize __copy_streambufs_eof(basic_streambuf* __sbin, basic_streambuf* __sbout, bool& __ineof); template<> streamsize __copy_streambufs_eof(basic_streambuf* __sbin, basic_streambuf* __sbout, bool& __ineof); } # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/streambuf.tcc" 1 3 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/streambuf.tcc" 3 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/streambuf.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template streamsize basic_streambuf<_CharT, _Traits>:: xsgetn(char_type* __s, streamsize __n) { streamsize __ret = 0; while (__ret < __n) { const streamsize __buf_len = this->egptr() - this->gptr(); if (__buf_len) { const streamsize __remaining = __n - __ret; const streamsize __len = std::min(__buf_len, __remaining); traits_type::copy(__s, this->gptr(), __len); __ret += __len; __s += __len; this->gbump(__len); } if (__ret < __n) { const int_type __c = this->uflow(); if (!traits_type::eq_int_type(__c, traits_type::eof())) { traits_type::assign(*__s++, traits_type::to_char_type(__c)); ++__ret; } else break; } } return __ret; } template streamsize basic_streambuf<_CharT, _Traits>:: xsputn(const char_type* __s, streamsize __n) { streamsize __ret = 0; while (__ret < __n) { const streamsize __buf_len = this->epptr() - this->pptr(); if (__buf_len) { const streamsize __remaining = __n - __ret; const streamsize __len = std::min(__buf_len, __remaining); traits_type::copy(this->pptr(), __s, __len); __ret += __len; __s += __len; this->pbump(__len); } if (__ret < __n) { int_type __c = this->overflow(traits_type::to_int_type(*__s)); if (!traits_type::eq_int_type(__c, traits_type::eof())) { ++__ret; ++__s; } else break; } } return __ret; } template streamsize __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>* __sbin, basic_streambuf<_CharT, _Traits>* __sbout, bool& __ineof) { streamsize __ret = 0; __ineof = true; typename _Traits::int_type __c = __sbin->sgetc(); while (!_Traits::eq_int_type(__c, _Traits::eof())) { __c = __sbout->sputc(_Traits::to_char_type(__c)); if (_Traits::eq_int_type(__c, _Traits::eof())) { __ineof = false; break; } ++__ret; __c = __sbin->snextc(); } return __ret; } template inline streamsize __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin, basic_streambuf<_CharT, _Traits>* __sbout) { bool __ineof; return __copy_streambufs_eof(__sbin, __sbout, __ineof); } extern template class basic_streambuf; extern template streamsize __copy_streambufs(basic_streambuf*, basic_streambuf*); extern template streamsize __copy_streambufs_eof(basic_streambuf*, basic_streambuf*, bool&); extern template class basic_streambuf; extern template streamsize __copy_streambufs(basic_streambuf*, basic_streambuf*); extern template streamsize __copy_streambufs_eof(basic_streambuf*, basic_streambuf*, bool&); } # 821 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/streambuf" 2 3 # 50 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ios" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 1 3 # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3 # 40 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/streambuf_iterator.h" 1 3 # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/streambuf_iterator.h" 3 # 40 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/streambuf_iterator.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template class istreambuf_iterator : public iterator { public: typedef _CharT char_type; typedef _Traits traits_type; typedef typename _Traits::int_type int_type; typedef basic_streambuf<_CharT, _Traits> streambuf_type; typedef basic_istream<_CharT, _Traits> istream_type; template friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, ostreambuf_iterator<_CharT2> >::__type copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, ostreambuf_iterator<_CharT2>); template friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, _CharT2*>::__type __copy_aux(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, _CharT2*); template friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, istreambuf_iterator<_CharT2> >::__type find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, const _CharT2&); private: mutable streambuf_type* _M_sbuf; mutable int_type _M_c; public: istreambuf_iterator() throw() : _M_sbuf(0), _M_c(traits_type::eof()) { } istreambuf_iterator(istream_type& __s) throw() : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { } istreambuf_iterator(streambuf_type* __s) throw() : _M_sbuf(__s), _M_c(traits_type::eof()) { } char_type operator*() const { return traits_type::to_char_type(_M_get()); } istreambuf_iterator& operator++() { ; if (_M_sbuf) { _M_sbuf->sbumpc(); _M_c = traits_type::eof(); } return *this; } istreambuf_iterator operator++(int) { ; istreambuf_iterator __old = *this; if (_M_sbuf) { __old._M_c = _M_sbuf->sbumpc(); _M_c = traits_type::eof(); } return __old; } bool equal(const istreambuf_iterator& __b) const { const bool __thiseof = _M_at_eof(); const bool __beof = __b._M_at_eof(); return (__thiseof && __beof || (!__thiseof && !__beof)); } private: int_type _M_get() const { const int_type __eof = traits_type::eof(); int_type __ret = __eof; if (_M_sbuf) { if (!traits_type::eq_int_type(_M_c, __eof)) __ret = _M_c; else if (!traits_type::eq_int_type((__ret = _M_sbuf->sgetc()), __eof)) _M_c = __ret; else _M_sbuf = 0; } return __ret; } bool _M_at_eof() const { const int_type __eof = traits_type::eof(); return traits_type::eq_int_type(_M_get(), __eof); } }; template inline bool operator==(const istreambuf_iterator<_CharT, _Traits>& __a, const istreambuf_iterator<_CharT, _Traits>& __b) { return __a.equal(__b); } template inline bool operator!=(const istreambuf_iterator<_CharT, _Traits>& __a, const istreambuf_iterator<_CharT, _Traits>& __b) { return !__a.equal(__b); } template class ostreambuf_iterator : public iterator { public: typedef _CharT char_type; typedef _Traits traits_type; typedef basic_streambuf<_CharT, _Traits> streambuf_type; typedef basic_ostream<_CharT, _Traits> ostream_type; template friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, ostreambuf_iterator<_CharT2> >::__type copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, ostreambuf_iterator<_CharT2>); private: streambuf_type* _M_sbuf; bool _M_failed; public: ostreambuf_iterator(ostream_type& __s) throw () : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { } ostreambuf_iterator(streambuf_type* __s) throw () : _M_sbuf(__s), _M_failed(!_M_sbuf) { } ostreambuf_iterator& operator=(_CharT __c) { if (!_M_failed && _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof())) _M_failed = true; return *this; } ostreambuf_iterator& operator*() { return *this; } ostreambuf_iterator& operator++(int) { return *this; } ostreambuf_iterator& operator++() { return *this; } bool failed() const throw() { return _M_failed; } ostreambuf_iterator& _M_put(const _CharT* __ws, streamsize __len) { if (__builtin_expect(!_M_failed, true) && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len, false)) _M_failed = true; return *this; } }; template typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT> >::__type copy(istreambuf_iterator<_CharT> __first, istreambuf_iterator<_CharT> __last, ostreambuf_iterator<_CharT> __result) { if (__first._M_sbuf && !__last._M_sbuf && !__result._M_failed) { bool __ineof; __copy_streambufs_eof(__first._M_sbuf, __result._M_sbuf, __ineof); if (!__ineof) __result._M_failed = true; } return __result; } template typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT> >::__type __copy_aux(_CharT* __first, _CharT* __last, ostreambuf_iterator<_CharT> __result) { const streamsize __num = __last - __first; if (__num > 0) __result._M_put(__first, __num); return __result; } template typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT> >::__type __copy_aux(const _CharT* __first, const _CharT* __last, ostreambuf_iterator<_CharT> __result) { const streamsize __num = __last - __first; if (__num > 0) __result._M_put(__first, __num); return __result; } template typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, _CharT*>::__type __copy_aux(istreambuf_iterator<_CharT> __first, istreambuf_iterator<_CharT> __last, _CharT* __result) { typedef istreambuf_iterator<_CharT> __is_iterator_type; typedef typename __is_iterator_type::traits_type traits_type; typedef typename __is_iterator_type::streambuf_type streambuf_type; typedef typename traits_type::int_type int_type; if (__first._M_sbuf && !__last._M_sbuf) { streambuf_type* __sb = __first._M_sbuf; int_type __c = __sb->sgetc(); while (!traits_type::eq_int_type(__c, traits_type::eof())) { const streamsize __n = __sb->egptr() - __sb->gptr(); if (__n > 1) { traits_type::copy(__result, __sb->gptr(), __n); __sb->gbump(__n); __result += __n; __c = __sb->underflow(); } else { *__result++ = traits_type::to_char_type(__c); __c = __sb->snextc(); } } } return __result; } template typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, istreambuf_iterator<_CharT> >::__type find(istreambuf_iterator<_CharT> __first, istreambuf_iterator<_CharT> __last, const _CharT& __val) { typedef istreambuf_iterator<_CharT> __is_iterator_type; typedef typename __is_iterator_type::traits_type traits_type; typedef typename __is_iterator_type::streambuf_type streambuf_type; typedef typename traits_type::int_type int_type; if (__first._M_sbuf && !__last._M_sbuf) { const int_type __ival = traits_type::to_int_type(__val); streambuf_type* __sb = __first._M_sbuf; int_type __c = __sb->sgetc(); while (!traits_type::eq_int_type(__c, traits_type::eof()) && !traits_type::eq_int_type(__c, __ival)) { streamsize __n = __sb->egptr() - __sb->gptr(); if (__n > 1) { const _CharT* __p = traits_type::find(__sb->gptr(), __n, __val); if (__p) __n = __p - __sb->gptr(); __sb->gbump(__n); __c = __sb->sgetc(); } else __c = __sb->snextc(); } if (!traits_type::eq_int_type(__c, traits_type::eof())) __first._M_c = __c; else __first._M_sbuf = 0; } return __first; } } # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 1 3 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cwctype" 1 3 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cwctype" 3 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cwctype" 3 # 1 "/usr/include/wctype.h" 1 3 4 # 35 "/usr/include/wctype.h" 3 4 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4 # 36 "/usr/include/wctype.h" 2 3 4 # 45 "/usr/include/wctype.h" 3 4 # 63 "/usr/include/wctype.h" 3 4 typedef unsigned long int wctype_t; # 85 "/usr/include/wctype.h" 3 4 enum { __ISwupper = 0, __ISwlower = 1, __ISwalpha = 2, __ISwdigit = 3, __ISwxdigit = 4, __ISwspace = 5, __ISwprint = 6, __ISwgraph = 7, __ISwblank = 8, __ISwcntrl = 9, __ISwpunct = 10, __ISwalnum = 11, _ISwupper = (1 << (__ISwupper)), _ISwlower = (1 << (__ISwlower)), _ISwalpha = (1 << (__ISwalpha)), _ISwdigit = (1 << (__ISwdigit)), _ISwxdigit = (1 << (__ISwxdigit)), _ISwspace = (1 << (__ISwspace)), _ISwprint = (1 << (__ISwprint)), _ISwgraph = (1 << (__ISwgraph)), _ISwblank = (1 << (__ISwblank)), _ISwcntrl = (1 << (__ISwcntrl)), _ISwpunct = (1 << (__ISwpunct)), _ISwalnum = (1 << (__ISwalnum)) }; extern "C" { extern int iswalnum (wint_t __wc) throw (); extern int iswalpha (wint_t __wc) throw (); extern int iswcntrl (wint_t __wc) throw (); extern int iswdigit (wint_t __wc) throw (); extern int iswgraph (wint_t __wc) throw (); extern int iswlower (wint_t __wc) throw (); extern int iswprint (wint_t __wc) throw (); extern int iswpunct (wint_t __wc) throw (); extern int iswspace (wint_t __wc) throw (); extern int iswupper (wint_t __wc) throw (); extern int iswxdigit (wint_t __wc) throw (); extern int iswblank (wint_t __wc) throw (); # 185 "/usr/include/wctype.h" 3 4 extern wctype_t wctype (__const char *__property) throw (); extern int iswctype (wint_t __wc, wctype_t __desc) throw (); typedef __const __int32_t *wctrans_t; extern wint_t towlower (wint_t __wc) throw (); extern wint_t towupper (wint_t __wc) throw (); } # 227 "/usr/include/wctype.h" 3 4 extern "C" { extern wctrans_t wctrans (__const char *__property) throw (); extern wint_t towctrans (wint_t __wc, wctrans_t __desc) throw (); extern int iswalnum_l (wint_t __wc, __locale_t __locale) throw (); extern int iswalpha_l (wint_t __wc, __locale_t __locale) throw (); extern int iswcntrl_l (wint_t __wc, __locale_t __locale) throw (); extern int iswdigit_l (wint_t __wc, __locale_t __locale) throw (); extern int iswgraph_l (wint_t __wc, __locale_t __locale) throw (); extern int iswlower_l (wint_t __wc, __locale_t __locale) throw (); extern int iswprint_l (wint_t __wc, __locale_t __locale) throw (); extern int iswpunct_l (wint_t __wc, __locale_t __locale) throw (); extern int iswspace_l (wint_t __wc, __locale_t __locale) throw (); extern int iswupper_l (wint_t __wc, __locale_t __locale) throw (); extern int iswxdigit_l (wint_t __wc, __locale_t __locale) throw (); extern int iswblank_l (wint_t __wc, __locale_t __locale) throw (); extern wctype_t wctype_l (__const char *__property, __locale_t __locale) throw (); extern int iswctype_l (wint_t __wc, wctype_t __desc, __locale_t __locale) throw (); extern wint_t towlower_l (wint_t __wc, __locale_t __locale) throw (); extern wint_t towupper_l (wint_t __wc, __locale_t __locale) throw (); extern wctrans_t wctrans_l (__const char *__property, __locale_t __locale) throw (); extern wint_t towctrans_l (wint_t __wc, wctrans_t __desc, __locale_t __locale) throw (); } # 54 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cwctype" 2 3 # 80 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cwctype" 3 namespace std __attribute__ ((__visibility__ ("default"))) { using ::wint_t; using ::wctype_t; using ::wctrans_t; using ::iswalnum; using ::iswalpha; using ::iswblank; using ::iswcntrl; using ::iswctype; using ::iswdigit; using ::iswgraph; using ::iswlower; using ::iswprint; using ::iswpunct; using ::iswspace; using ::iswupper; using ::iswxdigit; using ::towctrans; using ::towlower; using ::towupper; using ::wctrans; using ::wctype; } # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/ctype_base.h" 1 3 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/ctype_base.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { struct ctype_base { typedef const int* __to_type; typedef unsigned short mask; static const mask upper = _ISupper; static const mask lower = _ISlower; static const mask alpha = _ISalpha; static const mask digit = _ISdigit; static const mask xdigit = _ISxdigit; static const mask space = _ISspace; static const mask print = _ISprint; static const mask graph = _ISalpha | _ISdigit | _ISpunct; static const mask cntrl = _IScntrl; static const mask punct = _ISpunct; static const mask alnum = _ISalpha | _ISdigit; }; } # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 65 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 template void __convert_to_v(const char* __in, _Tv& __out, ios_base::iostate& __err, const __c_locale& __cloc); template<> void __convert_to_v(const char*, float&, ios_base::iostate&, const __c_locale&); template<> void __convert_to_v(const char*, double&, ios_base::iostate&, const __c_locale&); template<> void __convert_to_v(const char*, long double&, ios_base::iostate&, const __c_locale&); template struct __pad { static void _S_pad(ios_base& __io, _CharT __fill, _CharT* __news, const _CharT* __olds, const streamsize __newlen, const streamsize __oldlen, const bool __num); }; template _CharT* __add_grouping(_CharT* __s, _CharT __sep, const char* __gbeg, size_t __gsize, const _CharT* __first, const _CharT* __last); template inline ostreambuf_iterator<_CharT> __write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int __len) { __s._M_put(__ws, __len); return __s; } template inline _OutIter __write(_OutIter __s, const _CharT* __ws, int __len) { for (int __j = 0; __j < __len; __j++, ++__s) *__s = __ws[__j]; return __s; } # 145 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 template class __ctype_abstract_base : public locale::facet, public ctype_base { public: typedef _CharT char_type; # 163 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 bool is(mask __m, char_type __c) const { return this->do_is(__m, __c); } # 180 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 const char_type* is(const char_type *__lo, const char_type *__hi, mask *__vec) const { return this->do_is(__lo, __hi, __vec); } # 196 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 const char_type* scan_is(mask __m, const char_type* __lo, const char_type* __hi) const { return this->do_scan_is(__m, __lo, __hi); } # 212 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 const char_type* scan_not(mask __m, const char_type* __lo, const char_type* __hi) const { return this->do_scan_not(__m, __lo, __hi); } # 226 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 char_type toupper(char_type __c) const { return this->do_toupper(__c); } # 241 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 const char_type* toupper(char_type *__lo, const char_type* __hi) const { return this->do_toupper(__lo, __hi); } # 255 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 char_type tolower(char_type __c) const { return this->do_tolower(__c); } # 270 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 const char_type* tolower(char_type* __lo, const char_type* __hi) const { return this->do_tolower(__lo, __hi); } # 287 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 char_type widen(char __c) const { return this->do_widen(__c); } # 306 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 const char* widen(const char* __lo, const char* __hi, char_type* __to) const { return this->do_widen(__lo, __hi, __to); } # 325 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 char narrow(char_type __c, char __dfault) const { return this->do_narrow(__c, __dfault); } # 347 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 const char_type* narrow(const char_type* __lo, const char_type* __hi, char __dfault, char *__to) const { return this->do_narrow(__lo, __hi, __dfault, __to); } protected: explicit __ctype_abstract_base(size_t __refs = 0): facet(__refs) { } virtual ~__ctype_abstract_base() { } # 372 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual bool do_is(mask __m, char_type __c) const = 0; # 391 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual const char_type* do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const = 0; # 410 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual const char_type* do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const = 0; # 429 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual const char_type* do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const = 0; # 447 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual char_type do_toupper(char_type) const = 0; # 464 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual const char_type* do_toupper(char_type* __lo, const char_type* __hi) const = 0; # 480 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual char_type do_tolower(char_type) const = 0; # 497 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual const char_type* do_tolower(char_type* __lo, const char_type* __hi) const = 0; # 516 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual char_type do_widen(char) const = 0; # 537 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual const char* do_widen(const char* __lo, const char* __hi, char_type* __dest) const = 0; # 559 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual char do_narrow(char_type, char __dfault) const = 0; # 583 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual const char_type* do_narrow(const char_type* __lo, const char_type* __hi, char __dfault, char* __dest) const = 0; }; # 606 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 template class ctype : public __ctype_abstract_base<_CharT> { public: typedef _CharT char_type; typedef typename __ctype_abstract_base<_CharT>::mask mask; static locale::id id; explicit ctype(size_t __refs = 0) : __ctype_abstract_base<_CharT>(__refs) { } protected: virtual ~ctype(); virtual bool do_is(mask __m, char_type __c) const; virtual const char_type* do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; virtual const char_type* do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; virtual const char_type* do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const; virtual char_type do_toupper(char_type __c) const; virtual const char_type* do_toupper(char_type* __lo, const char_type* __hi) const; virtual char_type do_tolower(char_type __c) const; virtual const char_type* do_tolower(char_type* __lo, const char_type* __hi) const; virtual char_type do_widen(char __c) const; virtual const char* do_widen(const char* __lo, const char* __hi, char_type* __dest) const; virtual char do_narrow(char_type, char __dfault) const; virtual const char_type* do_narrow(const char_type* __lo, const char_type* __hi, char __dfault, char* __dest) const; }; template locale::id ctype<_CharT>::id; # 675 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 template<> class ctype : public locale::facet, public ctype_base { public: typedef char char_type; protected: __c_locale _M_c_locale_ctype; bool _M_del; __to_type _M_toupper; __to_type _M_tolower; const mask* _M_table; mutable char _M_widen_ok; mutable char _M_widen[1 + static_cast(-1)]; mutable char _M_narrow[1 + static_cast(-1)]; mutable char _M_narrow_ok; public: static locale::id id; static const size_t table_size = 1 + static_cast(-1); # 712 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 explicit ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0); # 725 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 explicit ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false, size_t __refs = 0); # 738 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 inline bool is(mask __m, char __c) const; # 753 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 inline const char* is(const char* __lo, const char* __hi, mask* __vec) const; # 767 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 inline const char* scan_is(mask __m, const char* __lo, const char* __hi) const; # 781 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 inline const char* scan_not(mask __m, const char* __lo, const char* __hi) const; # 796 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 char_type toupper(char_type __c) const { return this->do_toupper(__c); } # 813 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 const char_type* toupper(char_type *__lo, const char_type* __hi) const { return this->do_toupper(__lo, __hi); } # 829 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 char_type tolower(char_type __c) const { return this->do_tolower(__c); } # 846 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 const char_type* tolower(char_type* __lo, const char_type* __hi) const { return this->do_tolower(__lo, __hi); } # 866 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 char_type widen(char __c) const { if (_M_widen_ok) return _M_widen[static_cast(__c)]; this->_M_widen_init(); return this->do_widen(__c); } # 893 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 const char* widen(const char* __lo, const char* __hi, char_type* __to) const { if (_M_widen_ok == 1) { memcpy(__to, __lo, __hi - __lo); return __hi; } if (!_M_widen_ok) _M_widen_init(); return this->do_widen(__lo, __hi, __to); } # 924 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 char narrow(char_type __c, char __dfault) const { if (_M_narrow[static_cast(__c)]) return _M_narrow[static_cast(__c)]; const char __t = do_narrow(__c, __dfault); if (__t != __dfault) _M_narrow[static_cast(__c)] = __t; return __t; } # 957 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 const char_type* narrow(const char_type* __lo, const char_type* __hi, char __dfault, char *__to) const { if (__builtin_expect(_M_narrow_ok == 1, true)) { memcpy(__to, __lo, __hi - __lo); return __hi; } if (!_M_narrow_ok) _M_narrow_init(); return this->do_narrow(__lo, __hi, __dfault, __to); } protected: const mask* table() const throw() { return _M_table; } static const mask* classic_table() throw(); virtual ~ctype(); # 1004 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual char_type do_toupper(char_type) const; # 1021 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual const char_type* do_toupper(char_type* __lo, const char_type* __hi) const; # 1037 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual char_type do_tolower(char_type) const; # 1054 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual const char_type* do_tolower(char_type* __lo, const char_type* __hi) const; # 1074 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual char_type do_widen(char __c) const { return __c; } # 1097 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual const char* do_widen(const char* __lo, const char* __hi, char_type* __dest) const { memcpy(__dest, __lo, __hi - __lo); return __hi; } # 1123 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual char do_narrow(char_type __c, char) const { return __c; } # 1149 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual const char_type* do_narrow(const char_type* __lo, const char_type* __hi, char, char* __dest) const { memcpy(__dest, __lo, __hi - __lo); return __hi; } private: void _M_widen_init() const { char __tmp[sizeof(_M_widen)]; for (size_t __i = 0; __i < sizeof(_M_widen); ++__i) __tmp[__i] = __i; do_widen(__tmp, __tmp + sizeof(__tmp), _M_widen); _M_widen_ok = 1; if (memcmp(__tmp, _M_widen, sizeof(_M_widen))) _M_widen_ok = 2; } void _M_narrow_init() const { char __tmp[sizeof(_M_narrow)]; for (size_t __i = 0; __i < sizeof(_M_narrow); ++__i) __tmp[__i] = __i; do_narrow(__tmp, __tmp + sizeof(__tmp), 0, _M_narrow); _M_narrow_ok = 1; if (memcmp(__tmp, _M_narrow, sizeof(_M_narrow))) _M_narrow_ok = 2; else { char __c; do_narrow(__tmp, __tmp + 1, 1, &__c); if (__c == 1) _M_narrow_ok = 2; } } }; template<> const ctype& use_facet >(const locale& __loc); # 1213 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 template<> class ctype : public __ctype_abstract_base { public: typedef wchar_t char_type; typedef wctype_t __wmask_type; protected: __c_locale _M_c_locale_ctype; bool _M_narrow_ok; char _M_narrow[128]; wint_t _M_widen[1 + static_cast(-1)]; mask _M_bit[16]; __wmask_type _M_wmask[16]; public: static locale::id id; # 1246 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 explicit ctype(size_t __refs = 0); # 1257 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 explicit ctype(__c_locale __cloc, size_t __refs = 0); protected: __wmask_type _M_convert_to_wmask(const mask __m) const; virtual ~ctype(); # 1281 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual bool do_is(mask __m, char_type __c) const; # 1300 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual const char_type* do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; # 1318 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual const char_type* do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; # 1336 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual const char_type* do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const; # 1353 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual char_type do_toupper(char_type) const; # 1370 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual const char_type* do_toupper(char_type* __lo, const char_type* __hi) const; # 1386 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual char_type do_tolower(char_type) const; # 1403 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual const char_type* do_tolower(char_type* __lo, const char_type* __hi) const; # 1423 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual char_type do_widen(char) const; # 1445 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual const char* do_widen(const char* __lo, const char* __hi, char_type* __dest) const; # 1468 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual char do_narrow(char_type, char __dfault) const; # 1494 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual const char_type* do_narrow(const char_type* __lo, const char_type* __hi, char __dfault, char* __dest) const; void _M_initialize_ctype(); }; template<> const ctype& use_facet >(const locale& __loc); template class ctype_byname : public ctype<_CharT> { public: typedef _CharT char_type; explicit ctype_byname(const char* __s, size_t __refs = 0); protected: virtual ~ctype_byname() { }; }; template<> ctype_byname::ctype_byname(const char*, size_t refs); template<> ctype_byname::ctype_byname(const char*, size_t refs); } # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/ctype_inline.h" 1 3 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/ctype_inline.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { bool ctype:: is(mask __m, char __c) const { return _M_table[static_cast(__c)] & __m; } const char* ctype:: is(const char* __low, const char* __high, mask* __vec) const { while (__low < __high) *__vec++ = _M_table[static_cast(*__low++)]; return __high; } const char* ctype:: scan_is(mask __m, const char* __low, const char* __high) const { while (__low < __high && !(_M_table[static_cast(*__low)] & __m)) ++__low; return __low; } const char* ctype:: scan_not(mask __m, const char* __low, const char* __high) const { while (__low < __high && (_M_table[static_cast(*__low)] & __m) != 0) ++__low; return __low; } } # 1534 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/codecvt.h" 1 3 # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/codecvt.h" 3 # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/codecvt.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { class codecvt_base { public: enum result { ok, partial, error, noconv }; }; # 71 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/codecvt.h" 3 template class __codecvt_abstract_base : public locale::facet, public codecvt_base { public: typedef codecvt_base::result result; typedef _InternT intern_type; typedef _ExternT extern_type; typedef _StateT state_type; # 119 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/codecvt.h" 3 result out(state_type& __state, const intern_type* __from, const intern_type* __from_end, const intern_type*& __from_next, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const { return this->do_out(__state, __from, __from_end, __from_next, __to, __to_end, __to_next); } # 158 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/codecvt.h" 3 result unshift(state_type& __state, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const { return this->do_unshift(__state, __to,__to_end,__to_next); } # 199 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/codecvt.h" 3 result in(state_type& __state, const extern_type* __from, const extern_type* __from_end, const extern_type*& __from_next, intern_type* __to, intern_type* __to_end, intern_type*& __to_next) const { return this->do_in(__state, __from, __from_end, __from_next, __to, __to_end, __to_next); } int encoding() const throw() { return this->do_encoding(); } bool always_noconv() const throw() { return this->do_always_noconv(); } int length(state_type& __state, const extern_type* __from, const extern_type* __end, size_t __max) const { return this->do_length(__state, __from, __end, __max); } int max_length() const throw() { return this->do_max_length(); } protected: explicit __codecvt_abstract_base(size_t __refs = 0) : locale::facet(__refs) { } virtual ~__codecvt_abstract_base() { } # 240 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/codecvt.h" 3 virtual result do_out(state_type& __state, const intern_type* __from, const intern_type* __from_end, const intern_type*& __from_next, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const = 0; virtual result do_unshift(state_type& __state, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const = 0; virtual result do_in(state_type& __state, const extern_type* __from, const extern_type* __from_end, const extern_type*& __from_next, intern_type* __to, intern_type* __to_end, intern_type*& __to_next) const = 0; virtual int do_encoding() const throw() = 0; virtual bool do_always_noconv() const throw() = 0; virtual int do_length(state_type&, const extern_type* __from, const extern_type* __end, size_t __max) const = 0; virtual int do_max_length() const throw() = 0; }; template class codecvt : public __codecvt_abstract_base<_InternT, _ExternT, _StateT> { public: typedef codecvt_base::result result; typedef _InternT intern_type; typedef _ExternT extern_type; typedef _StateT state_type; protected: __c_locale _M_c_locale_codecvt; public: static locale::id id; explicit codecvt(size_t __refs = 0) : __codecvt_abstract_base<_InternT, _ExternT, _StateT> (__refs) { } explicit codecvt(__c_locale __cloc, size_t __refs = 0); protected: virtual ~codecvt() { } virtual result do_out(state_type& __state, const intern_type* __from, const intern_type* __from_end, const intern_type*& __from_next, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const; virtual result do_unshift(state_type& __state, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const; virtual result do_in(state_type& __state, const extern_type* __from, const extern_type* __from_end, const extern_type*& __from_next, intern_type* __to, intern_type* __to_end, intern_type*& __to_next) const; virtual int do_encoding() const throw(); virtual bool do_always_noconv() const throw(); virtual int do_length(state_type&, const extern_type* __from, const extern_type* __end, size_t __max) const; virtual int do_max_length() const throw(); }; template locale::id codecvt<_InternT, _ExternT, _StateT>::id; template<> class codecvt : public __codecvt_abstract_base { public: typedef char intern_type; typedef char extern_type; typedef mbstate_t state_type; protected: __c_locale _M_c_locale_codecvt; public: static locale::id id; explicit codecvt(size_t __refs = 0); explicit codecvt(__c_locale __cloc, size_t __refs = 0); protected: virtual ~codecvt(); virtual result do_out(state_type& __state, const intern_type* __from, const intern_type* __from_end, const intern_type*& __from_next, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const; virtual result do_unshift(state_type& __state, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const; virtual result do_in(state_type& __state, const extern_type* __from, const extern_type* __from_end, const extern_type*& __from_next, intern_type* __to, intern_type* __to_end, intern_type*& __to_next) const; virtual int do_encoding() const throw(); virtual bool do_always_noconv() const throw(); virtual int do_length(state_type&, const extern_type* __from, const extern_type* __end, size_t __max) const; virtual int do_max_length() const throw(); }; template<> class codecvt : public __codecvt_abstract_base { public: typedef wchar_t intern_type; typedef char extern_type; typedef mbstate_t state_type; protected: __c_locale _M_c_locale_codecvt; public: static locale::id id; explicit codecvt(size_t __refs = 0); explicit codecvt(__c_locale __cloc, size_t __refs = 0); protected: virtual ~codecvt(); virtual result do_out(state_type& __state, const intern_type* __from, const intern_type* __from_end, const intern_type*& __from_next, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const; virtual result do_unshift(state_type& __state, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const; virtual result do_in(state_type& __state, const extern_type* __from, const extern_type* __from_end, const extern_type*& __from_next, intern_type* __to, intern_type* __to_end, intern_type*& __to_next) const; virtual int do_encoding() const throw(); virtual bool do_always_noconv() const throw(); virtual int do_length(state_type&, const extern_type* __from, const extern_type* __end, size_t __max) const; virtual int do_max_length() const throw(); }; template class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT> { public: explicit codecvt_byname(const char* __s, size_t __refs = 0) : codecvt<_InternT, _ExternT, _StateT>(__refs) { if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) { this->_S_destroy_c_locale(this->_M_c_locale_codecvt); this->_S_create_c_locale(this->_M_c_locale_codecvt, __s); } } protected: virtual ~codecvt_byname() { } }; } # 1537 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { class __num_base { public: enum { _S_ominus, _S_oplus, _S_ox, _S_oX, _S_odigits, _S_odigits_end = _S_odigits + 16, _S_oudigits = _S_odigits_end, _S_oudigits_end = _S_oudigits + 16, _S_oe = _S_odigits + 14, _S_oE = _S_oudigits + 14, _S_oend = _S_oudigits_end }; static const char* _S_atoms_out; static const char* _S_atoms_in; enum { _S_iminus, _S_iplus, _S_ix, _S_iX, _S_izero, _S_ie = _S_izero + 14, _S_iE = _S_izero + 20, _S_iend = 26 }; static void _S_format_float(const ios_base& __io, char* __fptr, char __mod); }; template struct __numpunct_cache : public locale::facet { const char* _M_grouping; size_t _M_grouping_size; bool _M_use_grouping; const _CharT* _M_truename; size_t _M_truename_size; const _CharT* _M_falsename; size_t _M_falsename_size; _CharT _M_decimal_point; _CharT _M_thousands_sep; _CharT _M_atoms_out[__num_base::_S_oend]; _CharT _M_atoms_in[__num_base::_S_iend]; bool _M_allocated; __numpunct_cache(size_t __refs = 0) : facet(__refs), _M_grouping(__null), _M_grouping_size(0), _M_use_grouping(false), _M_truename(__null), _M_truename_size(0), _M_falsename(__null), _M_falsename_size(0), _M_decimal_point(_CharT()), _M_thousands_sep(_CharT()), _M_allocated(false) { } ~__numpunct_cache(); void _M_cache(const locale& __loc); private: __numpunct_cache& operator=(const __numpunct_cache&); explicit __numpunct_cache(const __numpunct_cache&); }; template __numpunct_cache<_CharT>::~__numpunct_cache() { if (_M_allocated) { delete [] _M_grouping; delete [] _M_truename; delete [] _M_falsename; } } # 1661 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 template class numpunct : public locale::facet { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; typedef __numpunct_cache<_CharT> __cache_type; protected: __cache_type* _M_data; public: static locale::id id; explicit numpunct(size_t __refs = 0) : facet(__refs), _M_data(__null) { _M_initialize_numpunct(); } # 1698 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 explicit numpunct(__cache_type* __cache, size_t __refs = 0) : facet(__refs), _M_data(__cache) { _M_initialize_numpunct(); } # 1712 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 explicit numpunct(__c_locale __cloc, size_t __refs = 0) : facet(__refs), _M_data(__null) { _M_initialize_numpunct(__cloc); } # 1726 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 char_type decimal_point() const { return this->do_decimal_point(); } # 1739 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 char_type thousands_sep() const { return this->do_thousands_sep(); } # 1770 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 string grouping() const { return this->do_grouping(); } # 1783 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 string_type truename() const { return this->do_truename(); } # 1796 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 string_type falsename() const { return this->do_falsename(); } protected: virtual ~numpunct(); # 1813 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual char_type do_decimal_point() const { return _M_data->_M_decimal_point; } # 1825 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual char_type do_thousands_sep() const { return _M_data->_M_thousands_sep; } # 1838 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual string do_grouping() const { return _M_data->_M_grouping; } # 1851 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual string_type do_truename() const { return _M_data->_M_truename; } # 1864 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual string_type do_falsename() const { return _M_data->_M_falsename; } void _M_initialize_numpunct(__c_locale __cloc = __null); }; template locale::id numpunct<_CharT>::id; template<> numpunct::~numpunct(); template<> void numpunct::_M_initialize_numpunct(__c_locale __cloc); template<> numpunct::~numpunct(); template<> void numpunct::_M_initialize_numpunct(__c_locale __cloc); template class numpunct_byname : public numpunct<_CharT> { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; explicit numpunct_byname(const char* __s, size_t __refs = 0) : numpunct<_CharT>(__refs) { if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) { __c_locale __tmp; this->_S_create_c_locale(__tmp, __s); this->_M_initialize_numpunct(__tmp); this->_S_destroy_c_locale(__tmp); } } protected: virtual ~numpunct_byname() { } }; namespace __gnu_cxx_ldbl128 { # 1931 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 template class num_get : public locale::facet { public: typedef _CharT char_type; typedef _InIter iter_type; static locale::id id; # 1952 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 explicit num_get(size_t __refs = 0) : facet(__refs) { } # 1978 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, bool& __v) const { return this->do_get(__in, __end, __io, __err, __v); } # 2014 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, long& __v) const { return this->do_get(__in, __end, __io, __err, __v); } iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned short& __v) const { return this->do_get(__in, __end, __io, __err, __v); } iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned int& __v) const { return this->do_get(__in, __end, __io, __err, __v); } iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned long& __v) const { return this->do_get(__in, __end, __io, __err, __v); } iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, long long& __v) const { return this->do_get(__in, __end, __io, __err, __v); } iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned long long& __v) const { return this->do_get(__in, __end, __io, __err, __v); } # 2073 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, float& __v) const { return this->do_get(__in, __end, __io, __err, __v); } iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, double& __v) const { return this->do_get(__in, __end, __io, __err, __v); } iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, long double& __v) const { return this->do_get(__in, __end, __io, __err, __v); } # 2115 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, void*& __v) const { return this->do_get(__in, __end, __io, __err, __v); } protected: virtual ~num_get() { } iter_type _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&, string& __xtrc) const; template iter_type _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&, _ValueT& __v) const; template typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, int>::__type _M_find(const _CharT2*, size_t __len, _CharT2 __c) const { int __ret = -1; if (__len <= 10) { if (__c >= _CharT2('0') && __c < _CharT2(_CharT2('0') + __len)) __ret = __c - _CharT2('0'); } else { if (__c >= _CharT2('0') && __c <= _CharT2('9')) __ret = __c - _CharT2('0'); else if (__c >= _CharT2('a') && __c <= _CharT2('f')) __ret = 10 + (__c - _CharT2('a')); else if (__c >= _CharT2('A') && __c <= _CharT2('F')) __ret = 10 + (__c - _CharT2('A')); } return __ret; } template typename __gnu_cxx::__enable_if::__value, int>::__type _M_find(const _CharT2* __zero, size_t __len, _CharT2 __c) const { int __ret = -1; const char_type* __q = char_traits<_CharT2>::find(__zero, __len, __c); if (__q) { __ret = __q - __zero; if (__ret > 15) __ret -= 6; } return __ret; } # 2186 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const; virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, long&) const; virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, unsigned short&) const; virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, unsigned int&) const; virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, unsigned long&) const; virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, long long&) const; virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, unsigned long long&) const; virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, float&) const; virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, double&) const; virtual iter_type __do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, double&) const; virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, void*&) const; virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, long double&) const; }; template locale::id num_get<_CharT, _InIter>::id; # 2262 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 template class num_put : public locale::facet { public: typedef _CharT char_type; typedef _OutIter iter_type; static locale::id id; # 2283 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 explicit num_put(size_t __refs = 0) : facet(__refs) { } # 2301 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 iter_type put(iter_type __s, ios_base& __f, char_type __fill, bool __v) const { return this->do_put(__s, __f, __fill, __v); } # 2343 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 iter_type put(iter_type __s, ios_base& __f, char_type __fill, long __v) const { return this->do_put(__s, __f, __fill, __v); } iter_type put(iter_type __s, ios_base& __f, char_type __fill, unsigned long __v) const { return this->do_put(__s, __f, __fill, __v); } iter_type put(iter_type __s, ios_base& __f, char_type __fill, long long __v) const { return this->do_put(__s, __f, __fill, __v); } iter_type put(iter_type __s, ios_base& __f, char_type __fill, unsigned long long __v) const { return this->do_put(__s, __f, __fill, __v); } # 2406 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 iter_type put(iter_type __s, ios_base& __f, char_type __fill, double __v) const { return this->do_put(__s, __f, __fill, __v); } iter_type put(iter_type __s, ios_base& __f, char_type __fill, long double __v) const { return this->do_put(__s, __f, __fill, __v); } # 2431 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 iter_type put(iter_type __s, ios_base& __f, char_type __fill, const void* __v) const { return this->do_put(__s, __f, __fill, __v); } protected: template iter_type _M_insert_float(iter_type, ios_base& __io, char_type __fill, char __mod, _ValueT __v) const; void _M_group_float(const char* __grouping, size_t __grouping_size, char_type __sep, const char_type* __p, char_type* __new, char_type* __cs, int& __len) const; template iter_type _M_insert_int(iter_type, ios_base& __io, char_type __fill, _ValueT __v) const; void _M_group_int(const char* __grouping, size_t __grouping_size, char_type __sep, ios_base& __io, char_type* __new, char_type* __cs, int& __len) const; void _M_pad(char_type __fill, streamsize __w, ios_base& __io, char_type* __new, const char_type* __cs, int& __len) const; virtual ~num_put() { }; # 2479 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual iter_type do_put(iter_type, ios_base&, char_type __fill, bool __v) const; virtual iter_type do_put(iter_type, ios_base&, char_type __fill, long __v) const; virtual iter_type do_put(iter_type, ios_base&, char_type __fill, unsigned long) const; virtual iter_type do_put(iter_type, ios_base&, char_type __fill, long long __v) const; virtual iter_type do_put(iter_type, ios_base&, char_type __fill, unsigned long long) const; virtual iter_type do_put(iter_type, ios_base&, char_type __fill, double __v) const; virtual iter_type __do_put(iter_type, ios_base&, char_type __fill, double __v) const; virtual iter_type do_put(iter_type, ios_base&, char_type __fill, const void* __v) const; virtual iter_type do_put(iter_type, ios_base&, char_type __fill, long double __v) const; }; template locale::id num_put<_CharT, _OutIter>::id; } # 2536 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 template class collate : public locale::facet { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; protected: __c_locale _M_c_locale_collate; public: static locale::id id; # 2563 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 explicit collate(size_t __refs = 0) : facet(__refs), _M_c_locale_collate(_S_get_c_locale()) { } # 2577 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 explicit collate(__c_locale __cloc, size_t __refs = 0) : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc)) { } # 2594 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 int compare(const _CharT* __lo1, const _CharT* __hi1, const _CharT* __lo2, const _CharT* __hi2) const { return this->do_compare(__lo1, __hi1, __lo2, __hi2); } # 2613 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 string_type transform(const _CharT* __lo, const _CharT* __hi) const { return this->do_transform(__lo, __hi); } # 2627 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 long hash(const _CharT* __lo, const _CharT* __hi) const { return this->do_hash(__lo, __hi); } int _M_compare(const _CharT*, const _CharT*) const; size_t _M_transform(_CharT*, const _CharT*, size_t) const; protected: virtual ~collate() { _S_destroy_c_locale(_M_c_locale_collate); } # 2656 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual int do_compare(const _CharT* __lo1, const _CharT* __hi1, const _CharT* __lo2, const _CharT* __hi2) const; # 2672 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual string_type do_transform(const _CharT* __lo, const _CharT* __hi) const; # 2685 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual long do_hash(const _CharT* __lo, const _CharT* __hi) const; }; template locale::id collate<_CharT>::id; template<> int collate::_M_compare(const char*, const char*) const; template<> size_t collate::_M_transform(char*, const char*, size_t) const; template<> int collate::_M_compare(const wchar_t*, const wchar_t*) const; template<> size_t collate::_M_transform(wchar_t*, const wchar_t*, size_t) const; template class collate_byname : public collate<_CharT> { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; explicit collate_byname(const char* __s, size_t __refs = 0) : collate<_CharT>(__refs) { if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) { this->_S_destroy_c_locale(this->_M_c_locale_collate); this->_S_create_c_locale(this->_M_c_locale_collate, __s); } } protected: virtual ~collate_byname() { } }; # 2745 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 class time_base { public: enum dateorder { no_order, dmy, mdy, ymd, ydm }; }; template struct __timepunct_cache : public locale::facet { static const _CharT* _S_timezones[14]; const _CharT* _M_date_format; const _CharT* _M_date_era_format; const _CharT* _M_time_format; const _CharT* _M_time_era_format; const _CharT* _M_date_time_format; const _CharT* _M_date_time_era_format; const _CharT* _M_am; const _CharT* _M_pm; const _CharT* _M_am_pm_format; const _CharT* _M_day1; const _CharT* _M_day2; const _CharT* _M_day3; const _CharT* _M_day4; const _CharT* _M_day5; const _CharT* _M_day6; const _CharT* _M_day7; const _CharT* _M_aday1; const _CharT* _M_aday2; const _CharT* _M_aday3; const _CharT* _M_aday4; const _CharT* _M_aday5; const _CharT* _M_aday6; const _CharT* _M_aday7; const _CharT* _M_month01; const _CharT* _M_month02; const _CharT* _M_month03; const _CharT* _M_month04; const _CharT* _M_month05; const _CharT* _M_month06; const _CharT* _M_month07; const _CharT* _M_month08; const _CharT* _M_month09; const _CharT* _M_month10; const _CharT* _M_month11; const _CharT* _M_month12; const _CharT* _M_amonth01; const _CharT* _M_amonth02; const _CharT* _M_amonth03; const _CharT* _M_amonth04; const _CharT* _M_amonth05; const _CharT* _M_amonth06; const _CharT* _M_amonth07; const _CharT* _M_amonth08; const _CharT* _M_amonth09; const _CharT* _M_amonth10; const _CharT* _M_amonth11; const _CharT* _M_amonth12; bool _M_allocated; __timepunct_cache(size_t __refs = 0) : facet(__refs), _M_date_format(__null), _M_date_era_format(__null), _M_time_format(__null), _M_time_era_format(__null), _M_date_time_format(__null), _M_date_time_era_format(__null), _M_am(__null), _M_pm(__null), _M_am_pm_format(__null), _M_day1(__null), _M_day2(__null), _M_day3(__null), _M_day4(__null), _M_day5(__null), _M_day6(__null), _M_day7(__null), _M_aday1(__null), _M_aday2(__null), _M_aday3(__null), _M_aday4(__null), _M_aday5(__null), _M_aday6(__null), _M_aday7(__null), _M_month01(__null), _M_month02(__null), _M_month03(__null), _M_month04(__null), _M_month05(__null), _M_month06(__null), _M_month07(__null), _M_month08(__null), _M_month09(__null), _M_month10(__null), _M_month11(__null), _M_month12(__null), _M_amonth01(__null), _M_amonth02(__null), _M_amonth03(__null), _M_amonth04(__null), _M_amonth05(__null), _M_amonth06(__null), _M_amonth07(__null), _M_amonth08(__null), _M_amonth09(__null), _M_amonth10(__null), _M_amonth11(__null), _M_amonth12(__null), _M_allocated(false) { } ~__timepunct_cache(); void _M_cache(const locale& __loc); private: __timepunct_cache& operator=(const __timepunct_cache&); explicit __timepunct_cache(const __timepunct_cache&); }; template __timepunct_cache<_CharT>::~__timepunct_cache() { if (_M_allocated) { } } template<> const char* __timepunct_cache::_S_timezones[14]; template<> const wchar_t* __timepunct_cache::_S_timezones[14]; template const _CharT* __timepunct_cache<_CharT>::_S_timezones[14]; template class __timepunct : public locale::facet { public: typedef _CharT __char_type; typedef basic_string<_CharT> __string_type; typedef __timepunct_cache<_CharT> __cache_type; protected: __cache_type* _M_data; __c_locale _M_c_locale_timepunct; const char* _M_name_timepunct; public: static locale::id id; explicit __timepunct(size_t __refs = 0); explicit __timepunct(__cache_type* __cache, size_t __refs = 0); # 2903 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 explicit __timepunct(__c_locale __cloc, const char* __s, size_t __refs = 0); void _M_put(_CharT* __s, size_t __maxlen, const _CharT* __format, const tm* __tm) const; void _M_date_formats(const _CharT** __date) const { __date[0] = _M_data->_M_date_format; __date[1] = _M_data->_M_date_era_format; } void _M_time_formats(const _CharT** __time) const { __time[0] = _M_data->_M_time_format; __time[1] = _M_data->_M_time_era_format; } void _M_date_time_formats(const _CharT** __dt) const { __dt[0] = _M_data->_M_date_time_format; __dt[1] = _M_data->_M_date_time_era_format; } void _M_am_pm_format(const _CharT* __ampm) const { __ampm = _M_data->_M_am_pm_format; } void _M_am_pm(const _CharT** __ampm) const { __ampm[0] = _M_data->_M_am; __ampm[1] = _M_data->_M_pm; } void _M_days(const _CharT** __days) const { __days[0] = _M_data->_M_day1; __days[1] = _M_data->_M_day2; __days[2] = _M_data->_M_day3; __days[3] = _M_data->_M_day4; __days[4] = _M_data->_M_day5; __days[5] = _M_data->_M_day6; __days[6] = _M_data->_M_day7; } void _M_days_abbreviated(const _CharT** __days) const { __days[0] = _M_data->_M_aday1; __days[1] = _M_data->_M_aday2; __days[2] = _M_data->_M_aday3; __days[3] = _M_data->_M_aday4; __days[4] = _M_data->_M_aday5; __days[5] = _M_data->_M_aday6; __days[6] = _M_data->_M_aday7; } void _M_months(const _CharT** __months) const { __months[0] = _M_data->_M_month01; __months[1] = _M_data->_M_month02; __months[2] = _M_data->_M_month03; __months[3] = _M_data->_M_month04; __months[4] = _M_data->_M_month05; __months[5] = _M_data->_M_month06; __months[6] = _M_data->_M_month07; __months[7] = _M_data->_M_month08; __months[8] = _M_data->_M_month09; __months[9] = _M_data->_M_month10; __months[10] = _M_data->_M_month11; __months[11] = _M_data->_M_month12; } void _M_months_abbreviated(const _CharT** __months) const { __months[0] = _M_data->_M_amonth01; __months[1] = _M_data->_M_amonth02; __months[2] = _M_data->_M_amonth03; __months[3] = _M_data->_M_amonth04; __months[4] = _M_data->_M_amonth05; __months[5] = _M_data->_M_amonth06; __months[6] = _M_data->_M_amonth07; __months[7] = _M_data->_M_amonth08; __months[8] = _M_data->_M_amonth09; __months[9] = _M_data->_M_amonth10; __months[10] = _M_data->_M_amonth11; __months[11] = _M_data->_M_amonth12; } protected: virtual ~__timepunct(); void _M_initialize_timepunct(__c_locale __cloc = __null); }; template locale::id __timepunct<_CharT>::id; template<> void __timepunct::_M_initialize_timepunct(__c_locale __cloc); template<> void __timepunct::_M_put(char*, size_t, const char*, const tm*) const; template<> void __timepunct::_M_initialize_timepunct(__c_locale __cloc); template<> void __timepunct::_M_put(wchar_t*, size_t, const wchar_t*, const tm*) const; } # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/time_members.h" 1 3 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/time_members.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template __timepunct<_CharT>::__timepunct(size_t __refs) : facet(__refs), _M_data(__null), _M_c_locale_timepunct(__null), _M_name_timepunct(_S_get_c_name()) { _M_initialize_timepunct(); } template __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(__null), _M_name_timepunct(_S_get_c_name()) { _M_initialize_timepunct(); } template __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, size_t __refs) : facet(__refs), _M_data(__null), _M_c_locale_timepunct(__null), _M_name_timepunct(__null) { const size_t __len = std::strlen(__s) + 1; char* __tmp = new char[__len]; std::memcpy(__tmp, __s, __len); _M_name_timepunct = __tmp; try { _M_initialize_timepunct(__cloc); } catch(...) { delete [] _M_name_timepunct; throw; } } template __timepunct<_CharT>::~__timepunct() { if (_M_name_timepunct != _S_get_c_name()) delete [] _M_name_timepunct; delete _M_data; _S_destroy_c_locale(_M_c_locale_timepunct); } } # 3041 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 3056 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 template class time_get : public locale::facet, public time_base { public: typedef _CharT char_type; typedef _InIter iter_type; typedef basic_string<_CharT> __string_type; static locale::id id; # 3078 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 explicit time_get(size_t __refs = 0) : facet (__refs) { } # 3095 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 dateorder date_order() const { return this->do_date_order(); } # 3119 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 iter_type get_time(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const { return this->do_get_time(__beg, __end, __io, __err, __tm); } # 3144 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 iter_type get_date(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const { return this->do_get_date(__beg, __end, __io, __err, __tm); } # 3172 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 iter_type get_weekday(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const { return this->do_get_weekday(__beg, __end, __io, __err, __tm); } # 3201 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 iter_type get_monthname(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const { return this->do_get_monthname(__beg, __end, __io, __err, __tm); } # 3227 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 iter_type get_year(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const { return this->do_get_year(__beg, __end, __io, __err, __tm); } protected: virtual ~time_get() { } # 3247 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual dateorder do_date_order() const; # 3265 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual iter_type do_get_time(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const; # 3284 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual iter_type do_get_date(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const; # 3303 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual iter_type do_get_weekday(iter_type __beg, iter_type __end, ios_base&, ios_base::iostate& __err, tm* __tm) const; # 3322 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual iter_type do_get_monthname(iter_type __beg, iter_type __end, ios_base&, ios_base::iostate& __err, tm* __tm) const; # 3341 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual iter_type do_get_year(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const; iter_type _M_extract_num(iter_type __beg, iter_type __end, int& __member, int __min, int __max, size_t __len, ios_base& __io, ios_base::iostate& __err) const; iter_type _M_extract_name(iter_type __beg, iter_type __end, int& __member, const _CharT** __names, size_t __indexlen, ios_base& __io, ios_base::iostate& __err) const; iter_type _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm, const _CharT* __format) const; }; template locale::id time_get<_CharT, _InIter>::id; template class time_get_byname : public time_get<_CharT, _InIter> { public: typedef _CharT char_type; typedef _InIter iter_type; explicit time_get_byname(const char*, size_t __refs = 0) : time_get<_CharT, _InIter>(__refs) { } protected: virtual ~time_get_byname() { } }; # 3397 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 template class time_put : public locale::facet { public: typedef _CharT char_type; typedef _OutIter iter_type; static locale::id id; # 3418 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 explicit time_put(size_t __refs = 0) : facet(__refs) { } # 3437 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 iter_type put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, const _CharT* __beg, const _CharT* __end) const; # 3457 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 iter_type put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, char __format, char __mod = 0) const { return this->do_put(__s, __io, __fill, __tm, __format, __mod); } protected: virtual ~time_put() { } # 3484 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual iter_type do_put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, char __format, char __mod) const; }; template locale::id time_put<_CharT, _OutIter>::id; template class time_put_byname : public time_put<_CharT, _OutIter> { public: typedef _CharT char_type; typedef _OutIter iter_type; explicit time_put_byname(const char*, size_t __refs = 0) : time_put<_CharT, _OutIter>(__refs) { }; protected: virtual ~time_put_byname() { } }; # 3522 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 class money_base { public: enum part { none, space, symbol, sign, value }; struct pattern { char field[4]; }; static const pattern _S_default_pattern; enum { _S_minus, _S_zero, _S_end = 11 }; static const char* _S_atoms; static pattern _S_construct_pattern(char __precedes, char __space, char __posn); }; template struct __moneypunct_cache : public locale::facet { const char* _M_grouping; size_t _M_grouping_size; bool _M_use_grouping; _CharT _M_decimal_point; _CharT _M_thousands_sep; const _CharT* _M_curr_symbol; size_t _M_curr_symbol_size; const _CharT* _M_positive_sign; size_t _M_positive_sign_size; const _CharT* _M_negative_sign; size_t _M_negative_sign_size; int _M_frac_digits; money_base::pattern _M_pos_format; money_base::pattern _M_neg_format; _CharT _M_atoms[money_base::_S_end]; bool _M_allocated; __moneypunct_cache(size_t __refs = 0) : facet(__refs), _M_grouping(__null), _M_grouping_size(0), _M_use_grouping(false), _M_decimal_point(_CharT()), _M_thousands_sep(_CharT()), _M_curr_symbol(__null), _M_curr_symbol_size(0), _M_positive_sign(__null), _M_positive_sign_size(0), _M_negative_sign(__null), _M_negative_sign_size(0), _M_frac_digits(0), _M_pos_format(money_base::pattern()), _M_neg_format(money_base::pattern()), _M_allocated(false) { } ~__moneypunct_cache(); void _M_cache(const locale& __loc); private: __moneypunct_cache& operator=(const __moneypunct_cache&); explicit __moneypunct_cache(const __moneypunct_cache&); }; template __moneypunct_cache<_CharT, _Intl>::~__moneypunct_cache() { if (_M_allocated) { delete [] _M_grouping; delete [] _M_curr_symbol; delete [] _M_positive_sign; delete [] _M_negative_sign; } } template class moneypunct : public locale::facet, public money_base { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; typedef __moneypunct_cache<_CharT, _Intl> __cache_type; private: __cache_type* _M_data; public: static const bool intl = _Intl; static locale::id id; # 3643 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 explicit moneypunct(size_t __refs = 0) : facet(__refs), _M_data(__null) { _M_initialize_moneypunct(); } # 3655 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 explicit moneypunct(__cache_type* __cache, size_t __refs = 0) : facet(__refs), _M_data(__cache) { _M_initialize_moneypunct(); } # 3670 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 explicit moneypunct(__c_locale __cloc, const char* __s, size_t __refs = 0) : facet(__refs), _M_data(__null) { _M_initialize_moneypunct(__cloc, __s); } # 3684 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 char_type decimal_point() const { return this->do_decimal_point(); } # 3697 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 char_type thousands_sep() const { return this->do_thousands_sep(); } # 3726 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 string grouping() const { return this->do_grouping(); } # 3739 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 string_type curr_symbol() const { return this->do_curr_symbol(); } # 3756 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 string_type positive_sign() const { return this->do_positive_sign(); } # 3773 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 string_type negative_sign() const { return this->do_negative_sign(); } # 3789 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 int frac_digits() const { return this->do_frac_digits(); } # 3824 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 pattern pos_format() const { return this->do_pos_format(); } pattern neg_format() const { return this->do_neg_format(); } protected: virtual ~moneypunct(); # 3846 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual char_type do_decimal_point() const { return _M_data->_M_decimal_point; } # 3858 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual char_type do_thousands_sep() const { return _M_data->_M_thousands_sep; } # 3871 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual string do_grouping() const { return _M_data->_M_grouping; } # 3884 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual string_type do_curr_symbol() const { return _M_data->_M_curr_symbol; } # 3897 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual string_type do_positive_sign() const { return _M_data->_M_positive_sign; } # 3910 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual string_type do_negative_sign() const { return _M_data->_M_negative_sign; } # 3924 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual int do_frac_digits() const { return _M_data->_M_frac_digits; } # 3938 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual pattern do_pos_format() const { return _M_data->_M_pos_format; } # 3952 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual pattern do_neg_format() const { return _M_data->_M_neg_format; } void _M_initialize_moneypunct(__c_locale __cloc = __null, const char* __name = __null); }; template locale::id moneypunct<_CharT, _Intl>::id; template const bool moneypunct<_CharT, _Intl>::intl; template<> moneypunct::~moneypunct(); template<> moneypunct::~moneypunct(); template<> void moneypunct::_M_initialize_moneypunct(__c_locale, const char*); template<> void moneypunct::_M_initialize_moneypunct(__c_locale, const char*); template<> moneypunct::~moneypunct(); template<> moneypunct::~moneypunct(); template<> void moneypunct::_M_initialize_moneypunct(__c_locale, const char*); template<> void moneypunct::_M_initialize_moneypunct(__c_locale, const char*); template class moneypunct_byname : public moneypunct<_CharT, _Intl> { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; static const bool intl = _Intl; explicit moneypunct_byname(const char* __s, size_t __refs = 0) : moneypunct<_CharT, _Intl>(__refs) { if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) { __c_locale __tmp; this->_S_create_c_locale(__tmp, __s); this->_M_initialize_moneypunct(__tmp); this->_S_destroy_c_locale(__tmp); } } protected: virtual ~moneypunct_byname() { } }; template const bool moneypunct_byname<_CharT, _Intl>::intl; namespace __gnu_cxx_ldbl128 { # 4044 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 template class money_get : public locale::facet { public: typedef _CharT char_type; typedef _InIter iter_type; typedef basic_string<_CharT> string_type; static locale::id id; # 4066 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 explicit money_get(size_t __refs = 0) : facet(__refs) { } # 4096 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 iter_type get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, ios_base::iostate& __err, long double& __units) const { return this->do_get(__s, __end, __intl, __io, __err, __units); } # 4126 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 iter_type get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, ios_base::iostate& __err, string_type& __digits) const { return this->do_get(__s, __end, __intl, __io, __err, __digits); } protected: virtual ~money_get() { } # 4145 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual iter_type __do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, ios_base::iostate& __err, double& __units) const; # 4161 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual iter_type do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, ios_base::iostate& __err, string_type& __digits) const; virtual iter_type do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, ios_base::iostate& __err, long double& __units) const; template iter_type _M_extract(iter_type __s, iter_type __end, ios_base& __io, ios_base::iostate& __err, string& __digits) const; }; template locale::id money_get<_CharT, _InIter>::id; # 4193 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 template class money_put : public locale::facet { public: typedef _CharT char_type; typedef _OutIter iter_type; typedef basic_string<_CharT> string_type; static locale::id id; # 4214 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 explicit money_put(size_t __refs = 0) : facet(__refs) { } # 4234 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 iter_type put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, long double __units) const { return this->do_put(__s, __intl, __io, __fill, __units); } # 4256 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 iter_type put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, const string_type& __digits) const { return this->do_put(__s, __intl, __io, __fill, __digits); } protected: virtual ~money_put() { } # 4286 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual iter_type __do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, double __units) const; # 4313 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual iter_type do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, const string_type& __digits) const; virtual iter_type do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, long double __units) const; template iter_type _M_insert(iter_type __s, ios_base& __io, char_type __fill, const string_type& __digits) const; }; template locale::id money_put<_CharT, _OutIter>::id; } struct messages_base { typedef int catalog; }; # 4363 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 template class messages : public locale::facet, public messages_base { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; protected: __c_locale _M_c_locale_messages; const char* _M_name_messages; public: static locale::id id; # 4391 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 explicit messages(size_t __refs = 0); # 4405 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 explicit messages(__c_locale __cloc, const char* __s, size_t __refs = 0); # 4418 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 catalog open(const basic_string& __s, const locale& __loc) const { return this->do_open(__s, __loc); } # 4436 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 catalog open(const basic_string&, const locale&, const char*) const; # 4454 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 string_type get(catalog __c, int __set, int __msgid, const string_type& __s) const { return this->do_get(__c, __set, __msgid, __s); } # 4465 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 void close(catalog __c) const { return this->do_close(__c); } protected: virtual ~messages(); # 4485 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual catalog do_open(const basic_string&, const locale&) const; # 4504 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 virtual string_type do_get(catalog, int, int, const string_type& __dfault) const; virtual void do_close(catalog) const; char* _M_convert_to_char(const string_type& __msg) const { return reinterpret_cast(const_cast<_CharT*>(__msg.c_str())); } string_type _M_convert_from_char(char*) const { # 4561 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 3 return string_type(); } }; template locale::id messages<_CharT>::id; template<> string messages::do_get(catalog, int, int, const string&) const; template<> wstring messages::do_get(catalog, int, int, const wstring&) const; template class messages_byname : public messages<_CharT> { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; explicit messages_byname(const char* __s, size_t __refs = 0); protected: virtual ~messages_byname() { } }; } # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/messages_members.h" 1 3 # 41 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/powerpc-unknown-linux-gnu/bits/messages_members.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template messages<_CharT>::messages(size_t __refs) : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), _M_name_messages(_S_get_c_name()) { } template messages<_CharT>::messages(__c_locale __cloc, const char* __s, size_t __refs) : facet(__refs), _M_c_locale_messages(__null), _M_name_messages(__null) { const size_t __len = std::strlen(__s) + 1; char* __tmp = new char[__len]; std::memcpy(__tmp, __s, __len); _M_name_messages = __tmp; _M_c_locale_messages = _S_clone_c_locale(__cloc); } template typename messages<_CharT>::catalog messages<_CharT>::open(const basic_string& __s, const locale& __loc, const char* __dir) const { bindtextdomain(__s.c_str(), __dir); return this->do_open(__s, __loc); } template messages<_CharT>::~messages() { if (_M_name_messages != _S_get_c_name()) delete [] _M_name_messages; _S_destroy_c_locale(_M_c_locale_messages); } template typename messages<_CharT>::catalog messages<_CharT>::do_open(const basic_string& __s, const locale&) const { textdomain(__s.c_str()); return 0; } template void messages<_CharT>::do_close(catalog) const { } template messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) : messages<_CharT>(__refs) { if (this->_M_name_messages != locale::facet::_S_get_c_name()) delete [] this->_M_name_messages; char* __tmp = new char[std::strlen(__s) + 1]; std::strcpy(__tmp, __s); this->_M_name_messages = __tmp; if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0) { this->_S_destroy_c_locale(this->_M_c_locale_messages); this->_S_create_c_locale(this->_M_c_locale_messages, __s); } } } # 4600 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template inline bool isspace(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::space, __c); } template inline bool isprint(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::print, __c); } template inline bool iscntrl(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::cntrl, __c); } template inline bool isupper(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::upper, __c); } template inline bool islower(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::lower, __c); } template inline bool isalpha(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::alpha, __c); } template inline bool isdigit(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::digit, __c); } template inline bool ispunct(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::punct, __c); } template inline bool isxdigit(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::xdigit, __c); } template inline bool isalnum(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::alnum, __c); } template inline bool isgraph(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::graph, __c); } template inline _CharT toupper(_CharT __c, const locale& __loc) { return use_facet >(__loc).toupper(__c); } template inline _CharT tolower(_CharT __c, const locale& __loc) { return use_facet >(__loc).tolower(__c); } } # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 55 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3 template class basic_ios : public ios_base { public: typedef _CharT char_type; typedef typename _Traits::int_type int_type; typedef typename _Traits::pos_type pos_type; typedef typename _Traits::off_type off_type; typedef _Traits traits_type; # 78 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3 typedef ctype<_CharT> __ctype_type; typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > __num_put_type; typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > __num_get_type; protected: basic_ostream<_CharT, _Traits>* _M_tie; mutable char_type _M_fill; mutable bool _M_fill_init; basic_streambuf<_CharT, _Traits>* _M_streambuf; const __ctype_type* _M_ctype; const __num_put_type* _M_num_put; const __num_get_type* _M_num_get; public: operator void*() const { return this->fail() ? 0 : const_cast(this); } bool operator!() const { return this->fail(); } # 122 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3 iostate rdstate() const { return _M_streambuf_state; } # 133 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3 void clear(iostate __state = goodbit); void setstate(iostate __state) { this->clear(this->rdstate() | __state); } void _M_setstate(iostate __state) { _M_streambuf_state |= __state; if (this->exceptions() & __state) throw; } bool good() const { return this->rdstate() == 0; } bool eof() const { return (this->rdstate() & eofbit) != 0; } # 186 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3 bool fail() const { return (this->rdstate() & (badbit | failbit)) != 0; } bool bad() const { return (this->rdstate() & badbit) != 0; } # 207 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3 iostate exceptions() const { return _M_exception; } # 242 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3 void exceptions(iostate __except) { _M_exception = __except; this->clear(_M_streambuf_state); } explicit basic_ios(basic_streambuf<_CharT, _Traits>* __sb) : ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0) { this->init(__sb); } virtual ~basic_ios() { } # 280 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3 basic_ostream<_CharT, _Traits>* tie() const { return _M_tie; } # 292 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3 basic_ostream<_CharT, _Traits>* tie(basic_ostream<_CharT, _Traits>* __tiestr) { basic_ostream<_CharT, _Traits>* __old = _M_tie; _M_tie = __tiestr; return __old; } basic_streambuf<_CharT, _Traits>* rdbuf() const { return _M_streambuf; } # 332 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3 basic_streambuf<_CharT, _Traits>* rdbuf(basic_streambuf<_CharT, _Traits>* __sb); # 346 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3 basic_ios& copyfmt(const basic_ios& __rhs); char_type fill() const { if (!_M_fill_init) { _M_fill = this->widen(' '); _M_fill_init = true; } return _M_fill; } # 375 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3 char_type fill(char_type __ch) { char_type __old = this->fill(); _M_fill = __ch; return __old; } # 395 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3 locale imbue(const locale& __loc); # 415 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3 char narrow(char_type __c, char __dfault) const; # 433 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 3 char_type widen(char __c) const; protected: basic_ios() : ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false), _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0) { } void init(basic_streambuf<_CharT, _Traits>* __sb); void _M_cache_locale(const locale& __loc); }; } # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.tcc" 1 3 # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.tcc" 3 # 40 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template void basic_ios<_CharT, _Traits>::clear(iostate __state) { if (this->rdbuf()) _M_streambuf_state = __state; else _M_streambuf_state = __state | badbit; if (this->exceptions() & this->rdstate()) __throw_ios_failure(("basic_ios::clear")); } template basic_streambuf<_CharT, _Traits>* basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __sb) { basic_streambuf<_CharT, _Traits>* __old = _M_streambuf; _M_streambuf = __sb; this->clear(); return __old; } template basic_ios<_CharT, _Traits>& basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs) { if (this != &__rhs) { _Words* __words = (__rhs._M_word_size <= _S_local_word_size) ? _M_local_word : new _Words[__rhs._M_word_size]; _Callback_list* __cb = __rhs._M_callbacks; if (__cb) __cb->_M_add_reference(); _M_call_callbacks(erase_event); if (_M_word != _M_local_word) { delete [] _M_word; _M_word = 0; } _M_dispose_callbacks(); _M_callbacks = __cb; for (int __i = 0; __i < __rhs._M_word_size; ++__i) __words[__i] = __rhs._M_word[__i]; _M_word = __words; _M_word_size = __rhs._M_word_size; this->flags(__rhs.flags()); this->width(__rhs.width()); this->precision(__rhs.precision()); this->tie(__rhs.tie()); this->fill(__rhs.fill()); _M_ios_locale = __rhs.getloc(); _M_cache_locale(_M_ios_locale); _M_call_callbacks(copyfmt_event); this->exceptions(__rhs.exceptions()); } return *this; } template char basic_ios<_CharT, _Traits>::narrow(char_type __c, char __dfault) const { return __check_facet(_M_ctype).narrow(__c, __dfault); } template _CharT basic_ios<_CharT, _Traits>::widen(char __c) const { return __check_facet(_M_ctype).widen(__c); } template locale basic_ios<_CharT, _Traits>::imbue(const locale& __loc) { locale __old(this->getloc()); ios_base::imbue(__loc); _M_cache_locale(__loc); if (this->rdbuf() != 0) this->rdbuf()->pubimbue(__loc); return __old; } template void basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb) { ios_base::_M_init(); _M_cache_locale(_M_ios_locale); # 160 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.tcc" 3 _M_fill = _CharT(); _M_fill_init = false; _M_tie = 0; _M_exception = goodbit; _M_streambuf = __sb; _M_streambuf_state = __sb ? goodbit : badbit; } template void basic_ios<_CharT, _Traits>::_M_cache_locale(const locale& __loc) { if (__builtin_expect(has_facet<__ctype_type>(__loc), true)) _M_ctype = &use_facet<__ctype_type>(__loc); else _M_ctype = 0; if (__builtin_expect(has_facet<__num_put_type>(__loc), true)) _M_num_put = &use_facet<__num_put_type>(__loc); else _M_num_put = 0; if (__builtin_expect(has_facet<__num_get_type>(__loc), true)) _M_num_get = &use_facet<__num_get_type>(__loc); else _M_num_get = 0; } extern template class basic_ios; extern template class basic_ios; } # 466 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/basic_ios.h" 2 3 # 51 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ios" 2 3 # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 58 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3 template class basic_ostream : virtual public basic_ios<_CharT, _Traits> { public: typedef _CharT char_type; typedef typename _Traits::int_type int_type; typedef typename _Traits::pos_type pos_type; typedef typename _Traits::off_type off_type; typedef _Traits traits_type; typedef basic_streambuf<_CharT, _Traits> __streambuf_type; typedef basic_ios<_CharT, _Traits> __ios_type; typedef basic_ostream<_CharT, _Traits> __ostream_type; typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > __num_put_type; typedef ctype<_CharT> __ctype_type; # 85 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3 explicit basic_ostream(__streambuf_type* __sb) { this->init(__sb); } virtual ~basic_ostream() { } class sentry; friend class sentry; # 111 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3 __ostream_type& operator<<(__ostream_type& (*__pf)(__ostream_type&)) { return __pf(*this); } __ostream_type& operator<<(__ios_type& (*__pf)(__ios_type&)) { __pf(*this); return *this; } __ostream_type& operator<<(ios_base& (*__pf) (ios_base&)) { __pf(*this); return *this; } # 168 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3 __ostream_type& operator<<(long __n) { return _M_insert(__n); } __ostream_type& operator<<(unsigned long __n) { return _M_insert(__n); } __ostream_type& operator<<(bool __n) { return _M_insert(__n); } __ostream_type& operator<<(short __n); __ostream_type& operator<<(unsigned short __n) { return _M_insert(static_cast(__n)); } __ostream_type& operator<<(int __n); __ostream_type& operator<<(unsigned int __n) { return _M_insert(static_cast(__n)); } __ostream_type& operator<<(long long __n) { return _M_insert(__n); } __ostream_type& operator<<(unsigned long long __n) { return _M_insert(__n); } __ostream_type& operator<<(double __f) { return _M_insert(__f); } __ostream_type& operator<<(float __f) { return _M_insert(static_cast(__f)); } __ostream_type& operator<<(long double __f) { return _M_insert(__f); } __ostream_type& operator<<(const void* __p) { return _M_insert(__p); } # 253 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3 __ostream_type& operator<<(__streambuf_type* __sb); # 286 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3 __ostream_type& put(char_type __c); void _M_write(const char_type* __s, streamsize __n) { const streamsize __put = this->rdbuf()->sputn(__s, __n); if (__put != __n) this->setstate(ios_base::badbit); } # 314 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3 __ostream_type& write(const char_type* __s, streamsize __n); # 327 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3 __ostream_type& flush(); # 338 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3 pos_type tellp(); # 349 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3 __ostream_type& seekp(pos_type); # 361 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3 __ostream_type& seekp(off_type, ios_base::seekdir); protected: explicit basic_ostream() { } template __ostream_type& _M_insert(_ValueT __v); }; # 383 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3 template class basic_ostream<_CharT, _Traits>::sentry { bool _M_ok; basic_ostream<_CharT, _Traits>& _M_os; public: # 402 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3 explicit sentry(basic_ostream<_CharT, _Traits>& __os); # 412 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3 ~sentry() { if (_M_os.flags() & ios_base::unitbuf && !uncaught_exception()) { if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1) _M_os.setstate(ios_base::badbit); } } # 430 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3 operator bool() const { return _M_ok; } }; # 451 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3 template inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) { return __ostream_insert(__out, &__c, 1); } template inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) { return (__out << __out.widen(__c)); } template inline basic_ostream& operator<<(basic_ostream& __out, char __c) { return __ostream_insert(__out, &__c, 1); } template inline basic_ostream& operator<<(basic_ostream& __out, signed char __c) { return (__out << static_cast(__c)); } template inline basic_ostream& operator<<(basic_ostream& __out, unsigned char __c) { return (__out << static_cast(__c)); } # 493 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3 template inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) { if (!__s) __out.setstate(ios_base::badbit); else __ostream_insert(__out, __s, static_cast(_Traits::length(__s))); return __out; } template basic_ostream<_CharT, _Traits> & operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s); template inline basic_ostream& operator<<(basic_ostream& __out, const char* __s) { if (!__s) __out.setstate(ios_base::badbit); else __ostream_insert(__out, __s, static_cast(_Traits::length(__s))); return __out; } template inline basic_ostream& operator<<(basic_ostream& __out, const signed char* __s) { return (__out << reinterpret_cast(__s)); } template inline basic_ostream & operator<<(basic_ostream& __out, const unsigned char* __s) { return (__out << reinterpret_cast(__s)); } # 543 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 3 template inline basic_ostream<_CharT, _Traits>& endl(basic_ostream<_CharT, _Traits>& __os) { return flush(__os.put(__os.widen('\n'))); } template inline basic_ostream<_CharT, _Traits>& ends(basic_ostream<_CharT, _Traits>& __os) { return __os.put(_CharT()); } template inline basic_ostream<_CharT, _Traits>& flush(basic_ostream<_CharT, _Traits>& __os) { return __os.flush(); } } # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ostream.tcc" 1 3 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ostream.tcc" 3 # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ostream.tcc" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/locale" 1 3 # 41 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/locale" 3 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/locale" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.tcc" 1 3 # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.tcc" 3 # 40 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.tcc" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/typeinfo" 1 3 # 41 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/typeinfo" 3 #pragma GCC visibility push(default) extern "C++" { namespace __cxxabiv1 { class __class_type_info; } # 60 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/typeinfo" 3 namespace std { class type_info { public: virtual ~type_info(); private: type_info& operator=(const type_info&); type_info(const type_info&); protected: const char *__name; protected: explicit type_info(const char *__n): __name(__n) { } public: const char* name() const { return __name; } # 106 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/typeinfo" 3 bool before(const type_info& __arg) const { return __name < __arg.__name; } bool operator==(const type_info& __arg) const { return __name == __arg.__name; } bool operator!=(const type_info& __arg) const { return !operator==(__arg); } public: virtual bool __is_pointer_p() const; virtual bool __is_function_p() const; virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj, unsigned __outer) const; virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target, void **__obj_ptr) const; }; class bad_cast : public exception { public: bad_cast() throw() { } virtual ~bad_cast() throw(); virtual const char* what() const throw(); }; class bad_typeid : public exception { public: bad_typeid () throw() { } virtual ~bad_typeid() throw(); virtual const char* what() const throw(); }; } #pragma GCC visibility pop } # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.tcc" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template locale locale::combine(const locale& __other) const { _Impl* __tmp = new _Impl(*_M_impl, 1); try { __tmp->_M_replace_facet(__other._M_impl, &_Facet::id); } catch(...) { __tmp->_M_remove_reference(); throw; } return locale(__tmp); } template bool locale::operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1, const basic_string<_CharT, _Traits, _Alloc>& __s2) const { typedef std::collate<_CharT> __collate_type; const __collate_type& __collate = use_facet<__collate_type>(*this); return (__collate.compare(__s1.data(), __s1.data() + __s1.length(), __s2.data(), __s2.data() + __s2.length()) < 0); } # 87 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.tcc" 3 template inline bool has_facet(const locale& __loc) throw() { const size_t __i = _Facet::id._M_id(); const locale::facet** __facets = __loc._M_impl->_M_facets; return (__i < __loc._M_impl->_M_facets_size && __facets[__i]); } # 109 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.tcc" 3 template inline const _Facet& use_facet(const locale& __loc) { const size_t __i = _Facet::id._M_id(); const locale::facet** __facets = __loc._M_impl->_M_facets; if (!(__i < __loc._M_impl->_M_facets_size && __facets[__i])) __throw_bad_cast(); return static_cast(*__facets[__i]); } template struct __use_cache { const _Facet* operator() (const locale& __loc) const; }; template struct __use_cache<__numpunct_cache<_CharT> > { const __numpunct_cache<_CharT>* operator() (const locale& __loc) const { const size_t __i = numpunct<_CharT>::id._M_id(); const locale::facet** __caches = __loc._M_impl->_M_caches; if (!__caches[__i]) { __numpunct_cache<_CharT>* __tmp = __null; try { __tmp = new __numpunct_cache<_CharT>; __tmp->_M_cache(__loc); } catch(...) { delete __tmp; throw; } __loc._M_impl->_M_install_cache(__tmp, __i); } return static_cast*>(__caches[__i]); } }; template struct __use_cache<__moneypunct_cache<_CharT, _Intl> > { const __moneypunct_cache<_CharT, _Intl>* operator() (const locale& __loc) const { const size_t __i = moneypunct<_CharT, _Intl>::id._M_id(); const locale::facet** __caches = __loc._M_impl->_M_caches; if (!__caches[__i]) { __moneypunct_cache<_CharT, _Intl>* __tmp = __null; try { __tmp = new __moneypunct_cache<_CharT, _Intl>; __tmp->_M_cache(__loc); } catch(...) { delete __tmp; throw; } __loc._M_impl->_M_install_cache(__tmp, __i); } return static_cast< const __moneypunct_cache<_CharT, _Intl>*>(__caches[__i]); } }; template void __numpunct_cache<_CharT>::_M_cache(const locale& __loc) { _M_allocated = true; const numpunct<_CharT>& __np = use_facet >(__loc); _M_grouping_size = __np.grouping().size(); char* __grouping = new char[_M_grouping_size]; __np.grouping().copy(__grouping, _M_grouping_size); _M_grouping = __grouping; _M_use_grouping = (_M_grouping_size && static_cast(__np.grouping()[0]) > 0); _M_truename_size = __np.truename().size(); _CharT* __truename = new _CharT[_M_truename_size]; __np.truename().copy(__truename, _M_truename_size); _M_truename = __truename; _M_falsename_size = __np.falsename().size(); _CharT* __falsename = new _CharT[_M_falsename_size]; __np.falsename().copy(__falsename, _M_falsename_size); _M_falsename = __falsename; _M_decimal_point = __np.decimal_point(); _M_thousands_sep = __np.thousands_sep(); const ctype<_CharT>& __ct = use_facet >(__loc); __ct.widen(__num_base::_S_atoms_out, __num_base::_S_atoms_out + __num_base::_S_oend, _M_atoms_out); __ct.widen(__num_base::_S_atoms_in, __num_base::_S_atoms_in + __num_base::_S_iend, _M_atoms_in); } template void __moneypunct_cache<_CharT, _Intl>::_M_cache(const locale& __loc) { _M_allocated = true; const moneypunct<_CharT, _Intl>& __mp = use_facet >(__loc); _M_grouping_size = __mp.grouping().size(); char* __grouping = new char[_M_grouping_size]; __mp.grouping().copy(__grouping, _M_grouping_size); _M_grouping = __grouping; _M_use_grouping = (_M_grouping_size && static_cast(__mp.grouping()[0]) > 0); _M_decimal_point = __mp.decimal_point(); _M_thousands_sep = __mp.thousands_sep(); _M_frac_digits = __mp.frac_digits(); _M_curr_symbol_size = __mp.curr_symbol().size(); _CharT* __curr_symbol = new _CharT[_M_curr_symbol_size]; __mp.curr_symbol().copy(__curr_symbol, _M_curr_symbol_size); _M_curr_symbol = __curr_symbol; _M_positive_sign_size = __mp.positive_sign().size(); _CharT* __positive_sign = new _CharT[_M_positive_sign_size]; __mp.positive_sign().copy(__positive_sign, _M_positive_sign_size); _M_positive_sign = __positive_sign; _M_negative_sign_size = __mp.negative_sign().size(); _CharT* __negative_sign = new _CharT[_M_negative_sign_size]; __mp.negative_sign().copy(__negative_sign, _M_negative_sign_size); _M_negative_sign = __negative_sign; _M_pos_format = __mp.pos_format(); _M_neg_format = __mp.neg_format(); const ctype<_CharT>& __ct = use_facet >(__loc); __ct.widen(money_base::_S_atoms, money_base::_S_atoms + money_base::_S_end, _M_atoms); } # 272 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.tcc" 3 static bool __verify_grouping(const char* __grouping, size_t __grouping_size, const string& __grouping_tmp); namespace __gnu_cxx_ldbl128 { template _InIter num_get<_CharT, _InIter>:: _M_extract_float(_InIter __beg, _InIter __end, ios_base& __io, ios_base::iostate& __err, string& __xtrc) const { typedef char_traits<_CharT> __traits_type; typedef __numpunct_cache<_CharT> __cache_type; __use_cache<__cache_type> __uc; const locale& __loc = __io._M_getloc(); const __cache_type* __lc = __uc(__loc); const _CharT* __lit = __lc->_M_atoms_in; char_type __c = char_type(); bool __testeof = __beg == __end; if (!__testeof) { __c = *__beg; const bool __plus = __c == __lit[__num_base::_S_iplus]; if ((__plus || __c == __lit[__num_base::_S_iminus]) && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) && !(__c == __lc->_M_decimal_point)) { __xtrc += __plus ? '+' : '-'; if (++__beg != __end) __c = *__beg; else __testeof = true; } } bool __found_mantissa = false; int __sep_pos = 0; while (!__testeof) { if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep || __c == __lc->_M_decimal_point) break; else if (__c == __lit[__num_base::_S_izero]) { if (!__found_mantissa) { __xtrc += '0'; __found_mantissa = true; } ++__sep_pos; if (++__beg != __end) __c = *__beg; else __testeof = true; } else break; } bool __found_dec = false; bool __found_sci = false; string __found_grouping; if (__lc->_M_use_grouping) __found_grouping.reserve(32); const char_type* __lit_zero = __lit + __num_base::_S_izero; if (!__lc->_M_allocated) while (!__testeof) { const int __digit = _M_find(__lit_zero, 10, __c); if (__digit != -1) { __xtrc += '0' + __digit; __found_mantissa = true; } else if (__c == __lc->_M_decimal_point && !__found_dec && !__found_sci) { __xtrc += '.'; __found_dec = true; } else if ((__c == __lit[__num_base::_S_ie] || __c == __lit[__num_base::_S_iE]) && !__found_sci && __found_mantissa) { __xtrc += 'e'; __found_sci = true; if (++__beg != __end) { __c = *__beg; const bool __plus = __c == __lit[__num_base::_S_iplus]; if (__plus || __c == __lit[__num_base::_S_iminus]) __xtrc += __plus ? '+' : '-'; else continue; } else { __testeof = true; break; } } else break; if (++__beg != __end) __c = *__beg; else __testeof = true; } else while (!__testeof) { if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) { if (!__found_dec && !__found_sci) { if (__sep_pos) { __found_grouping += static_cast(__sep_pos); __sep_pos = 0; } else { __xtrc.clear(); break; } } else break; } else if (__c == __lc->_M_decimal_point) { if (!__found_dec && !__found_sci) { if (__found_grouping.size()) __found_grouping += static_cast(__sep_pos); __xtrc += '.'; __found_dec = true; } else break; } else { const char_type* __q = __traits_type::find(__lit_zero, 10, __c); if (__q) { __xtrc += '0' + (__q - __lit_zero); __found_mantissa = true; ++__sep_pos; } else if ((__c == __lit[__num_base::_S_ie] || __c == __lit[__num_base::_S_iE]) && !__found_sci && __found_mantissa) { if (__found_grouping.size() && !__found_dec) __found_grouping += static_cast(__sep_pos); __xtrc += 'e'; __found_sci = true; if (++__beg != __end) { __c = *__beg; const bool __plus = __c == __lit[__num_base::_S_iplus]; if ((__plus || __c == __lit[__num_base::_S_iminus]) && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) && !(__c == __lc->_M_decimal_point)) __xtrc += __plus ? '+' : '-'; else continue; } else { __testeof = true; break; } } else break; } if (++__beg != __end) __c = *__beg; else __testeof = true; } if (__found_grouping.size()) { if (!__found_dec && !__found_sci) __found_grouping += static_cast(__sep_pos); if (!std::__verify_grouping(__lc->_M_grouping, __lc->_M_grouping_size, __found_grouping)) __err |= ios_base::failbit; } if (__testeof) __err |= ios_base::eofbit; return __beg; } } namespace __gnu_cxx_ldbl128 { template template _InIter num_get<_CharT, _InIter>:: _M_extract_int(_InIter __beg, _InIter __end, ios_base& __io, ios_base::iostate& __err, _ValueT& __v) const { typedef char_traits<_CharT> __traits_type; using __gnu_cxx::__add_unsigned; typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; typedef __numpunct_cache<_CharT> __cache_type; __use_cache<__cache_type> __uc; const locale& __loc = __io._M_getloc(); const __cache_type* __lc = __uc(__loc); const _CharT* __lit = __lc->_M_atoms_in; char_type __c = char_type(); const ios_base::fmtflags __basefield = __io.flags() & ios_base::basefield; const bool __oct = __basefield == ios_base::oct; int __base = __oct ? 8 : (__basefield == ios_base::hex ? 16 : 10); bool __testeof = __beg == __end; bool __negative = false; if (!__testeof) { __c = *__beg; if (numeric_limits<_ValueT>::is_signed) __negative = __c == __lit[__num_base::_S_iminus]; if ((__negative || __c == __lit[__num_base::_S_iplus]) && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) && !(__c == __lc->_M_decimal_point)) { if (++__beg != __end) __c = *__beg; else __testeof = true; } } bool __found_zero = false; int __sep_pos = 0; while (!__testeof) { if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep || __c == __lc->_M_decimal_point) break; else if (__c == __lit[__num_base::_S_izero] && (!__found_zero || __base == 10)) { __found_zero = true; ++__sep_pos; if (__basefield == 0) __base = 8; if (__base == 8) __sep_pos = 0; } else if (__found_zero && (__c == __lit[__num_base::_S_ix] || __c == __lit[__num_base::_S_iX])) { if (__basefield == 0) __base = 16; if (__base == 16) { __found_zero = false; __sep_pos = 0; } else break; } else break; if (++__beg != __end) { __c = *__beg; if (!__found_zero) break; } else __testeof = true; } const size_t __len = (__base == 16 ? __num_base::_S_iend - __num_base::_S_izero : __base); string __found_grouping; if (__lc->_M_use_grouping) __found_grouping.reserve(32); bool __testfail = false; const __unsigned_type __max = __negative ? -numeric_limits<_ValueT>::min() : numeric_limits<_ValueT>::max(); const __unsigned_type __smax = __max / __base; __unsigned_type __result = 0; int __digit = 0; const char_type* __lit_zero = __lit + __num_base::_S_izero; if (!__lc->_M_allocated) while (!__testeof) { __digit = _M_find(__lit_zero, __len, __c); if (__digit == -1) break; if (__result > __smax) __testfail = true; else { __result *= __base; __testfail |= __result > __max - __digit; __result += __digit; ++__sep_pos; } if (++__beg != __end) __c = *__beg; else __testeof = true; } else while (!__testeof) { if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) { if (__sep_pos) { __found_grouping += static_cast(__sep_pos); __sep_pos = 0; } else { __testfail = true; break; } } else if (__c == __lc->_M_decimal_point) break; else { const char_type* __q = __traits_type::find(__lit_zero, __len, __c); if (!__q) break; __digit = __q - __lit_zero; if (__digit > 15) __digit -= 6; if (__result > __smax) __testfail = true; else { __result *= __base; __testfail |= __result > __max - __digit; __result += __digit; ++__sep_pos; } } if (++__beg != __end) __c = *__beg; else __testeof = true; } if (__found_grouping.size()) { __found_grouping += static_cast(__sep_pos); if (!std::__verify_grouping(__lc->_M_grouping, __lc->_M_grouping_size, __found_grouping)) __err |= ios_base::failbit; } if (!__testfail && (__sep_pos || __found_zero || __found_grouping.size())) __v = __negative ? -__result : __result; else __err |= ios_base::failbit; if (__testeof) __err |= ios_base::eofbit; return __beg; } template _InIter num_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, bool& __v) const { if (!(__io.flags() & ios_base::boolalpha)) { long __l = -1; __beg = _M_extract_int(__beg, __end, __io, __err, __l); if (__l == 0 || __l == 1) __v = __l; else __err |= ios_base::failbit; } else { typedef __numpunct_cache<_CharT> __cache_type; __use_cache<__cache_type> __uc; const locale& __loc = __io._M_getloc(); const __cache_type* __lc = __uc(__loc); bool __testf = true; bool __testt = true; size_t __n; bool __testeof = __beg == __end; for (__n = 0; !__testeof; ++__n) { const char_type __c = *__beg; if (__testf) if (__n < __lc->_M_falsename_size) __testf = __c == __lc->_M_falsename[__n]; else break; if (__testt) if (__n < __lc->_M_truename_size) __testt = __c == __lc->_M_truename[__n]; else break; if (!__testf && !__testt) break; if (++__beg == __end) __testeof = true; } if (__testf && __n == __lc->_M_falsename_size) __v = 0; else if (__testt && __n == __lc->_M_truename_size) __v = 1; else __err |= ios_base::failbit; if (__testeof) __err |= ios_base::eofbit; } return __beg; } template _InIter num_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, long& __v) const { return _M_extract_int(__beg, __end, __io, __err, __v); } template _InIter num_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned short& __v) const { return _M_extract_int(__beg, __end, __io, __err, __v); } template _InIter num_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned int& __v) const { return _M_extract_int(__beg, __end, __io, __err, __v); } template _InIter num_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned long& __v) const { return _M_extract_int(__beg, __end, __io, __err, __v); } template _InIter num_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, long long& __v) const { return _M_extract_int(__beg, __end, __io, __err, __v); } template _InIter num_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned long long& __v) const { return _M_extract_int(__beg, __end, __io, __err, __v); } template _InIter num_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, float& __v) const { string __xtrc; __xtrc.reserve(32); __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); return __beg; } template _InIter num_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, double& __v) const { string __xtrc; __xtrc.reserve(32); __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); return __beg; } template _InIter num_get<_CharT, _InIter>:: __do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, double& __v) const { string __xtrc; __xtrc.reserve(32); __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); return __beg; } template _InIter num_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, long double& __v) const { string __xtrc; __xtrc.reserve(32); __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); return __beg; } template _InIter num_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, void*& __v) const { typedef ios_base::fmtflags fmtflags; const fmtflags __fmt = __io.flags(); __io.flags(__fmt & ~ios_base::basefield | ios_base::hex); unsigned long __ul; __beg = _M_extract_int(__beg, __end, __io, __err, __ul); __io.flags(__fmt); if (!(__err & ios_base::failbit)) __v = reinterpret_cast(__ul); return __beg; } template void num_put<_CharT, _OutIter>:: _M_pad(_CharT __fill, streamsize __w, ios_base& __io, _CharT* __new, const _CharT* __cs, int& __len) const { __pad<_CharT, char_traits<_CharT> >::_S_pad(__io, __fill, __new, __cs, __w, __len, true); __len = static_cast(__w); } } template int __int_to_char(_CharT* __bufend, _ValueT __v, const _CharT* __lit, ios_base::fmtflags __flags, bool __dec) { _CharT* __buf = __bufend; if (__builtin_expect(__dec, true)) { do { *--__buf = __lit[(__v % 10) + __num_base::_S_odigits]; __v /= 10; } while (__v != 0); } else if ((__flags & ios_base::basefield) == ios_base::oct) { do { *--__buf = __lit[(__v & 0x7) + __num_base::_S_odigits]; __v >>= 3; } while (__v != 0); } else { const bool __uppercase = __flags & ios_base::uppercase; const int __case_offset = __uppercase ? __num_base::_S_oudigits : __num_base::_S_odigits; do { *--__buf = __lit[(__v & 0xf) + __case_offset]; __v >>= 4; } while (__v != 0); } return __bufend - __buf; } namespace __gnu_cxx_ldbl128 { template void num_put<_CharT, _OutIter>:: _M_group_int(const char* __grouping, size_t __grouping_size, _CharT __sep, ios_base&, _CharT* __new, _CharT* __cs, int& __len) const { _CharT* __p = std::__add_grouping(__new, __sep, __grouping, __grouping_size, __cs, __cs + __len); __len = __p - __new; } template template _OutIter num_put<_CharT, _OutIter>:: _M_insert_int(_OutIter __s, ios_base& __io, _CharT __fill, _ValueT __v) const { using __gnu_cxx::__add_unsigned; typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; typedef __numpunct_cache<_CharT> __cache_type; __use_cache<__cache_type> __uc; const locale& __loc = __io._M_getloc(); const __cache_type* __lc = __uc(__loc); const _CharT* __lit = __lc->_M_atoms_out; const ios_base::fmtflags __flags = __io.flags(); const int __ilen = 5 * sizeof(_ValueT); _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __ilen)); const ios_base::fmtflags __basefield = __flags & ios_base::basefield; const bool __dec = (__basefield != ios_base::oct && __basefield != ios_base::hex); const __unsigned_type __u = (__v > 0 || !__dec) ? __v : -__v; int __len = __int_to_char(__cs + __ilen, __u, __lit, __flags, __dec); __cs += __ilen - __len; if (__lc->_M_use_grouping) { _CharT* __cs2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * (__len + 1) * 2)); _M_group_int(__lc->_M_grouping, __lc->_M_grouping_size, __lc->_M_thousands_sep, __io, __cs2 + 2, __cs, __len); __cs = __cs2 + 2; } if (__builtin_expect(__dec, true)) { if (__v > 0) { if (__flags & ios_base::showpos && numeric_limits<_ValueT>::is_signed) *--__cs = __lit[__num_base::_S_oplus], ++__len; } else if (__v) *--__cs = __lit[__num_base::_S_ominus], ++__len; } else if (__flags & ios_base::showbase && __v) { if (__basefield == ios_base::oct) *--__cs = __lit[__num_base::_S_odigits], ++__len; else { const bool __uppercase = __flags & ios_base::uppercase; *--__cs = __lit[__num_base::_S_ox + __uppercase]; *--__cs = __lit[__num_base::_S_odigits]; __len += 2; } } const streamsize __w = __io.width(); if (__w > static_cast(__len)) { _CharT* __cs3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __w)); _M_pad(__fill, __w, __io, __cs3, __cs, __len); __cs = __cs3; } __io.width(0); return std::__write(__s, __cs, __len); } template void num_put<_CharT, _OutIter>:: _M_group_float(const char* __grouping, size_t __grouping_size, _CharT __sep, const _CharT* __p, _CharT* __new, _CharT* __cs, int& __len) const { const int __declen = __p ? __p - __cs : __len; _CharT* __p2 = std::__add_grouping(__new, __sep, __grouping, __grouping_size, __cs, __cs + __declen); int __newlen = __p2 - __new; if (__p) { char_traits<_CharT>::copy(__p2, __p, __len - __declen); __newlen += __len - __declen; } __len = __newlen; } # 1093 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.tcc" 3 template template _OutIter num_put<_CharT, _OutIter>:: _M_insert_float(_OutIter __s, ios_base& __io, _CharT __fill, char __mod, _ValueT __v) const { typedef __numpunct_cache<_CharT> __cache_type; __use_cache<__cache_type> __uc; const locale& __loc = __io._M_getloc(); const __cache_type* __lc = __uc(__loc); const streamsize __prec = __io.precision() < 0 ? 6 : __io.precision(); const int __max_digits = numeric_limits<_ValueT>::digits10; int __len; char __fbuf[16]; __num_base::_S_format_float(__io, __fbuf, __mod); int __cs_size = __max_digits * 3; char* __cs = static_cast(__builtin_alloca(__cs_size)); __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf, __prec, __v); if (__len >= __cs_size) { __cs_size = __len + 1; __cs = static_cast(__builtin_alloca(__cs_size)); __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf, __prec, __v); } # 1152 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.tcc" 3 const ctype<_CharT>& __ctype = use_facet >(__loc); _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __len)); __ctype.widen(__cs, __cs + __len, __ws); _CharT* __wp = 0; const char* __p = char_traits::find(__cs, __len, '.'); if (__p) { __wp = __ws + (__p - __cs); *__wp = __lc->_M_decimal_point; } if (__lc->_M_use_grouping && (__wp || __len < 3 || (__cs[1] <= '9' && __cs[2] <= '9' && __cs[1] >= '0' && __cs[2] >= '0'))) { _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __len * 2)); streamsize __off = 0; if (__cs[0] == '-' || __cs[0] == '+') { __off = 1; __ws2[0] = __ws[0]; __len -= 1; } _M_group_float(__lc->_M_grouping, __lc->_M_grouping_size, __lc->_M_thousands_sep, __wp, __ws2 + __off, __ws + __off, __len); __len += __off; __ws = __ws2; } const streamsize __w = __io.width(); if (__w > static_cast(__len)) { _CharT* __ws3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __w)); _M_pad(__fill, __w, __io, __ws3, __ws, __len); __ws = __ws3; } __io.width(0); return std::__write(__s, __ws, __len); } template _OutIter num_put<_CharT, _OutIter>:: do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const { const ios_base::fmtflags __flags = __io.flags(); if ((__flags & ios_base::boolalpha) == 0) { const long __l = __v; __s = _M_insert_int(__s, __io, __fill, __l); } else { typedef __numpunct_cache<_CharT> __cache_type; __use_cache<__cache_type> __uc; const locale& __loc = __io._M_getloc(); const __cache_type* __lc = __uc(__loc); const _CharT* __name = __v ? __lc->_M_truename : __lc->_M_falsename; int __len = __v ? __lc->_M_truename_size : __lc->_M_falsename_size; const streamsize __w = __io.width(); if (__w > static_cast(__len)) { _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __w)); _M_pad(__fill, __w, __io, __cs, __name, __len); __name = __cs; } __io.width(0); __s = std::__write(__s, __name, __len); } return __s; } template _OutIter num_put<_CharT, _OutIter>:: do_put(iter_type __s, ios_base& __io, char_type __fill, long __v) const { return _M_insert_int(__s, __io, __fill, __v); } template _OutIter num_put<_CharT, _OutIter>:: do_put(iter_type __s, ios_base& __io, char_type __fill, unsigned long __v) const { return _M_insert_int(__s, __io, __fill, __v); } template _OutIter num_put<_CharT, _OutIter>:: do_put(iter_type __s, ios_base& __io, char_type __fill, long long __v) const { return _M_insert_int(__s, __io, __fill, __v); } template _OutIter num_put<_CharT, _OutIter>:: do_put(iter_type __s, ios_base& __io, char_type __fill, unsigned long long __v) const { return _M_insert_int(__s, __io, __fill, __v); } template _OutIter num_put<_CharT, _OutIter>:: do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const { return _M_insert_float(__s, __io, __fill, char(), __v); } template _OutIter num_put<_CharT, _OutIter>:: __do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const { return _M_insert_float(__s, __io, __fill, char(), __v); } template _OutIter num_put<_CharT, _OutIter>:: do_put(iter_type __s, ios_base& __io, char_type __fill, long double __v) const { return _M_insert_float(__s, __io, __fill, 'L', __v); } template _OutIter num_put<_CharT, _OutIter>:: do_put(iter_type __s, ios_base& __io, char_type __fill, const void* __v) const { const ios_base::fmtflags __flags = __io.flags(); const ios_base::fmtflags __fmt = ~(ios_base::basefield | ios_base::uppercase | ios_base::internal); __io.flags(__flags & __fmt | (ios_base::hex | ios_base::showbase)); __s = _M_insert_int(__s, __io, __fill, reinterpret_cast(__v)); __io.flags(__flags); return __s; } template template _InIter money_get<_CharT, _InIter>:: _M_extract(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, string& __units) const { typedef char_traits<_CharT> __traits_type; typedef typename string_type::size_type size_type; typedef money_base::part part; typedef __moneypunct_cache<_CharT, _Intl> __cache_type; const locale& __loc = __io._M_getloc(); const ctype<_CharT>& __ctype = use_facet >(__loc); __use_cache<__cache_type> __uc; const __cache_type* __lc = __uc(__loc); const char_type* __lit = __lc->_M_atoms; bool __negative = false; size_type __sign_size = 0; const bool __mandatory_sign = (__lc->_M_positive_sign_size && __lc->_M_negative_sign_size); string __grouping_tmp; if (__lc->_M_use_grouping) __grouping_tmp.reserve(32); int __last_pos = 0; int __n = 0; bool __testvalid = true; bool __testdecfound = false; string __res; __res.reserve(32); const char_type* __lit_zero = __lit + money_base::_S_zero; const money_base::pattern __p = __lc->_M_neg_format; for (int __i = 0; __i < 4 && __testvalid; ++__i) { const part __which = static_cast(__p.field[__i]); switch (__which) { case money_base::symbol: if (__io.flags() & ios_base::showbase || __sign_size > 1 || __i == 0 || (__i == 1 && (__mandatory_sign || (static_cast(__p.field[0]) == money_base::sign) || (static_cast(__p.field[2]) == money_base::space))) || (__i == 2 && ((static_cast(__p.field[3]) == money_base::value) || __mandatory_sign && (static_cast(__p.field[3]) == money_base::sign)))) { const size_type __len = __lc->_M_curr_symbol_size; size_type __j = 0; for (; __beg != __end && __j < __len && *__beg == __lc->_M_curr_symbol[__j]; ++__beg, ++__j); if (__j != __len && (__j || __io.flags() & ios_base::showbase)) __testvalid = false; } break; case money_base::sign: if (__lc->_M_positive_sign_size && __beg != __end && *__beg == __lc->_M_positive_sign[0]) { __sign_size = __lc->_M_positive_sign_size; ++__beg; } else if (__lc->_M_negative_sign_size && __beg != __end && *__beg == __lc->_M_negative_sign[0]) { __negative = true; __sign_size = __lc->_M_negative_sign_size; ++__beg; } else if (__lc->_M_positive_sign_size && !__lc->_M_negative_sign_size) __negative = true; else if (__mandatory_sign) __testvalid = false; break; case money_base::value: for (; __beg != __end; ++__beg) { const char_type __c = *__beg; const char_type* __q = __traits_type::find(__lit_zero, 10, __c); if (__q != 0) { __res += money_base::_S_atoms[__q - __lit]; ++__n; } else if (__c == __lc->_M_decimal_point && !__testdecfound) { __last_pos = __n; __n = 0; __testdecfound = true; } else if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep && !__testdecfound) { if (__n) { __grouping_tmp += static_cast(__n); __n = 0; } else { __testvalid = false; break; } } else break; } if (__res.empty()) __testvalid = false; break; case money_base::space: if (__beg != __end && __ctype.is(ctype_base::space, *__beg)) ++__beg; else __testvalid = false; case money_base::none: if (__i != 3) for (; __beg != __end && __ctype.is(ctype_base::space, *__beg); ++__beg); break; } } if (__sign_size > 1 && __testvalid) { const char_type* __sign = __negative ? __lc->_M_negative_sign : __lc->_M_positive_sign; size_type __i = 1; for (; __beg != __end && __i < __sign_size && *__beg == __sign[__i]; ++__beg, ++__i); if (__i != __sign_size) __testvalid = false; } if (__testvalid) { if (__res.size() > 1) { const size_type __first = __res.find_first_not_of('0'); const bool __only_zeros = __first == string::npos; if (__first) __res.erase(0, __only_zeros ? __res.size() - 1 : __first); } if (__negative && __res[0] != '0') __res.insert(__res.begin(), '-'); if (__grouping_tmp.size()) { __grouping_tmp += static_cast(__testdecfound ? __last_pos : __n); if (!std::__verify_grouping(__lc->_M_grouping, __lc->_M_grouping_size, __grouping_tmp)) __err |= ios_base::failbit; } if (__testdecfound && __lc->_M_frac_digits > 0 && __n != __lc->_M_frac_digits) __testvalid = false; } if (!__testvalid) __err |= ios_base::failbit; else __units.swap(__res); if (__beg == __end) __err |= ios_base::eofbit; return __beg; } template _InIter money_get<_CharT, _InIter>:: __do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io, ios_base::iostate& __err, double& __units) const { string __str; __beg = __intl ? _M_extract(__beg, __end, __io, __err, __str) : _M_extract(__beg, __end, __io, __err, __str); std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale()); return __beg; } template _InIter money_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io, ios_base::iostate& __err, long double& __units) const { string __str; __beg = __intl ? _M_extract(__beg, __end, __io, __err, __str) : _M_extract(__beg, __end, __io, __err, __str); std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale()); return __beg; } template _InIter money_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io, ios_base::iostate& __err, string_type& __digits) const { typedef typename string::size_type size_type; const locale& __loc = __io._M_getloc(); const ctype<_CharT>& __ctype = use_facet >(__loc); string __str; __beg = __intl ? _M_extract(__beg, __end, __io, __err, __str) : _M_extract(__beg, __end, __io, __err, __str); const size_type __len = __str.size(); if (__len) { __digits.resize(__len); __ctype.widen(__str.data(), __str.data() + __len, &__digits[0]); } return __beg; } template template _OutIter money_put<_CharT, _OutIter>:: _M_insert(iter_type __s, ios_base& __io, char_type __fill, const string_type& __digits) const { typedef typename string_type::size_type size_type; typedef money_base::part part; typedef __moneypunct_cache<_CharT, _Intl> __cache_type; const locale& __loc = __io._M_getloc(); const ctype<_CharT>& __ctype = use_facet >(__loc); __use_cache<__cache_type> __uc; const __cache_type* __lc = __uc(__loc); const char_type* __lit = __lc->_M_atoms; const char_type* __beg = __digits.data(); money_base::pattern __p; const char_type* __sign; size_type __sign_size; if (!(*__beg == __lit[money_base::_S_minus])) { __p = __lc->_M_pos_format; __sign = __lc->_M_positive_sign; __sign_size = __lc->_M_positive_sign_size; } else { __p = __lc->_M_neg_format; __sign = __lc->_M_negative_sign; __sign_size = __lc->_M_negative_sign_size; if (__digits.size()) ++__beg; } size_type __len = __ctype.scan_not(ctype_base::digit, __beg, __beg + __digits.size()) - __beg; if (__len) { string_type __value; __value.reserve(2 * __len); long __paddec = __len - __lc->_M_frac_digits; if (__paddec > 0) { if (__lc->_M_frac_digits < 0) __paddec = __len; if (__lc->_M_grouping_size) { __value.assign(2 * __paddec, char_type()); _CharT* __vend = std::__add_grouping(&__value[0], __lc->_M_thousands_sep, __lc->_M_grouping, __lc->_M_grouping_size, __beg, __beg + __paddec); __value.erase(__vend - &__value[0]); } else __value.assign(__beg, __paddec); } if (__lc->_M_frac_digits > 0) { __value += __lc->_M_decimal_point; if (__paddec >= 0) __value.append(__beg + __paddec, __lc->_M_frac_digits); else { __value.append(-__paddec, __lit[money_base::_S_zero]); __value.append(__beg, __len); } } const ios_base::fmtflags __f = __io.flags() & ios_base::adjustfield; __len = __value.size() + __sign_size; __len += ((__io.flags() & ios_base::showbase) ? __lc->_M_curr_symbol_size : 0); string_type __res; __res.reserve(2 * __len); const size_type __width = static_cast(__io.width()); const bool __testipad = (__f == ios_base::internal && __len < __width); for (int __i = 0; __i < 4; ++__i) { const part __which = static_cast(__p.field[__i]); switch (__which) { case money_base::symbol: if (__io.flags() & ios_base::showbase) __res.append(__lc->_M_curr_symbol, __lc->_M_curr_symbol_size); break; case money_base::sign: if (__sign_size) __res += __sign[0]; break; case money_base::value: __res += __value; break; case money_base::space: if (__testipad) __res.append(__width - __len, __fill); else __res += __fill; break; case money_base::none: if (__testipad) __res.append(__width - __len, __fill); break; } } if (__sign_size > 1) __res.append(__sign + 1, __sign_size - 1); __len = __res.size(); if (__width > __len) { if (__f == ios_base::left) __res.append(__width - __len, __fill); else __res.insert(0, __width - __len, __fill); __len = __width; } __s = std::__write(__s, __res.data(), __len); } __io.width(0); return __s; } template _OutIter money_put<_CharT, _OutIter>:: __do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, double __units) const { return this->do_put(__s, __intl, __io, __fill, (long double) __units); } template _OutIter money_put<_CharT, _OutIter>:: do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, long double __units) const { const locale __loc = __io.getloc(); const ctype<_CharT>& __ctype = use_facet >(__loc); int __cs_size = 64; char* __cs = static_cast(__builtin_alloca(__cs_size)); int __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, "%.*Lf", 0, __units); if (__len >= __cs_size) { __cs_size = __len + 1; __cs = static_cast(__builtin_alloca(__cs_size)); __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, "%.*Lf", 0, __units); } string_type __digits(__len, char_type()); __ctype.widen(__cs, __cs + __len, &__digits[0]); return __intl ? _M_insert(__s, __io, __fill, __digits) : _M_insert(__s, __io, __fill, __digits); } template _OutIter money_put<_CharT, _OutIter>:: do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, const string_type& __digits) const { return __intl ? _M_insert(__s, __io, __fill, __digits) : _M_insert(__s, __io, __fill, __digits); } } template time_base::dateorder time_get<_CharT, _InIter>::do_date_order() const { return time_base::no_order; } template _InIter time_get<_CharT, _InIter>:: _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm, const _CharT* __format) const { const locale& __loc = __io._M_getloc(); const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); const ctype<_CharT>& __ctype = use_facet >(__loc); const size_t __len = char_traits<_CharT>::length(__format); ios_base::iostate __tmperr = ios_base::goodbit; for (size_t __i = 0; __beg != __end && __i < __len && !__tmperr; ++__i) { if (__ctype.narrow(__format[__i], 0) == '%') { char __c = __ctype.narrow(__format[++__i], 0); int __mem = 0; if (__c == 'E' || __c == 'O') __c = __ctype.narrow(__format[++__i], 0); switch (__c) { const char* __cs; _CharT __wcs[10]; case 'a': const char_type* __days1[7]; __tp._M_days_abbreviated(__days1); __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days1, 7, __io, __tmperr); break; case 'A': const char_type* __days2[7]; __tp._M_days(__days2); __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days2, 7, __io, __tmperr); break; case 'h': case 'b': const char_type* __months1[12]; __tp._M_months_abbreviated(__months1); __beg = _M_extract_name(__beg, __end, __tm->tm_mon, __months1, 12, __io, __tmperr); break; case 'B': const char_type* __months2[12]; __tp._M_months(__months2); __beg = _M_extract_name(__beg, __end, __tm->tm_mon, __months2, 12, __io, __tmperr); break; case 'c': const char_type* __dt[2]; __tp._M_date_time_formats(__dt); __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, __tm, __dt[0]); break; case 'd': __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 1, 31, 2, __io, __tmperr); break; case 'e': if (__ctype.is(ctype_base::space, *__beg)) __beg = _M_extract_num(++__beg, __end, __tm->tm_mday, 1, 9, 1, __io, __tmperr); else __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 10, 31, 2, __io, __tmperr); break; case 'D': __cs = "%m/%d/%y"; __ctype.widen(__cs, __cs + 9, __wcs); __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, __tm, __wcs); break; case 'H': __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 0, 23, 2, __io, __tmperr); break; case 'I': __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 1, 12, 2, __io, __tmperr); break; case 'm': __beg = _M_extract_num(__beg, __end, __mem, 1, 12, 2, __io, __tmperr); if (!__tmperr) __tm->tm_mon = __mem - 1; break; case 'M': __beg = _M_extract_num(__beg, __end, __tm->tm_min, 0, 59, 2, __io, __tmperr); break; case 'n': if (__ctype.narrow(*__beg, 0) == '\n') ++__beg; else __tmperr |= ios_base::failbit; break; case 'R': __cs = "%H:%M"; __ctype.widen(__cs, __cs + 6, __wcs); __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, __tm, __wcs); break; case 'S': __beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 60, 2, __io, __tmperr); break; case 't': if (__ctype.narrow(*__beg, 0) == '\t') ++__beg; else __tmperr |= ios_base::failbit; break; case 'T': __cs = "%H:%M:%S"; __ctype.widen(__cs, __cs + 9, __wcs); __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, __tm, __wcs); break; case 'x': const char_type* __dates[2]; __tp._M_date_formats(__dates); __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, __tm, __dates[0]); break; case 'X': const char_type* __times[2]; __tp._M_time_formats(__times); __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, __tm, __times[0]); break; case 'y': case 'C': __beg = _M_extract_num(__beg, __end, __tm->tm_year, 0, 99, 2, __io, __tmperr); break; case 'Y': __beg = _M_extract_num(__beg, __end, __mem, 0, 9999, 4, __io, __tmperr); if (!__tmperr) __tm->tm_year = __mem - 1900; break; case 'Z': if (__ctype.is(ctype_base::upper, *__beg)) { int __tmp; __beg = _M_extract_name(__beg, __end, __tmp, __timepunct_cache<_CharT>::_S_timezones, 14, __io, __tmperr); if (__beg != __end && !__tmperr && __tmp == 0 && (*__beg == __ctype.widen('-') || *__beg == __ctype.widen('+'))) { __beg = _M_extract_num(__beg, __end, __tmp, 0, 23, 2, __io, __tmperr); __beg = _M_extract_num(__beg, __end, __tmp, 0, 59, 2, __io, __tmperr); } } else __tmperr |= ios_base::failbit; break; default: __tmperr |= ios_base::failbit; } } else { if (__format[__i] == *__beg) ++__beg; else __tmperr |= ios_base::failbit; } } if (__tmperr) __err |= ios_base::failbit; return __beg; } template _InIter time_get<_CharT, _InIter>:: _M_extract_num(iter_type __beg, iter_type __end, int& __member, int __min, int __max, size_t __len, ios_base& __io, ios_base::iostate& __err) const { const locale& __loc = __io._M_getloc(); const ctype<_CharT>& __ctype = use_facet >(__loc); int __mult = __len == 2 ? 10 : (__len == 4 ? 1000 : 1); ++__min; size_t __i = 0; int __value = 0; for (; __beg != __end && __i < __len; ++__beg, ++__i) { const char __c = __ctype.narrow(*__beg, '*'); if (__c >= '0' && __c <= '9') { __value = __value * 10 + (__c - '0'); const int __valuec = __value * __mult; if (__valuec > __max || __valuec + __mult < __min) break; __mult /= 10; } else break; } if (__i == __len) __member = __value; else __err |= ios_base::failbit; return __beg; } template _InIter time_get<_CharT, _InIter>:: _M_extract_name(iter_type __beg, iter_type __end, int& __member, const _CharT** __names, size_t __indexlen, ios_base& __io, ios_base::iostate& __err) const { typedef char_traits<_CharT> __traits_type; const locale& __loc = __io._M_getloc(); const ctype<_CharT>& __ctype = use_facet >(__loc); int* __matches = static_cast(__builtin_alloca(sizeof(int) * __indexlen)); size_t __nmatches = 0; size_t __pos = 0; bool __testvalid = true; const char_type* __name; if (__beg != __end) { const char_type __c = *__beg; for (size_t __i1 = 0; __i1 < __indexlen; ++__i1) if (__c == __names[__i1][0] || __c == __ctype.toupper(__names[__i1][0])) __matches[__nmatches++] = __i1; } while (__nmatches > 1) { size_t __minlen = __traits_type::length(__names[__matches[0]]); for (size_t __i2 = 1; __i2 < __nmatches; ++__i2) __minlen = std::min(__minlen, __traits_type::length(__names[__matches[__i2]])); ++__beg, ++__pos; if (__pos < __minlen && __beg != __end) for (size_t __i3 = 0; __i3 < __nmatches;) { __name = __names[__matches[__i3]]; if (!(__name[__pos] == *__beg)) __matches[__i3] = __matches[--__nmatches]; else ++__i3; } else break; } if (__nmatches == 1) { ++__beg, ++__pos; __name = __names[__matches[0]]; const size_t __len = __traits_type::length(__name); while (__pos < __len && __beg != __end && __name[__pos] == *__beg) ++__beg, ++__pos; if (__len == __pos) __member = __matches[0]; else __testvalid = false; } else __testvalid = false; if (!__testvalid) __err |= ios_base::failbit; return __beg; } template _InIter time_get<_CharT, _InIter>:: do_get_time(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const { const locale& __loc = __io._M_getloc(); const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); const char_type* __times[2]; __tp._M_time_formats(__times); __beg = _M_extract_via_format(__beg, __end, __io, __err, __tm, __times[0]); if (__beg == __end) __err |= ios_base::eofbit; return __beg; } template _InIter time_get<_CharT, _InIter>:: do_get_date(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const { const locale& __loc = __io._M_getloc(); const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); const char_type* __dates[2]; __tp._M_date_formats(__dates); __beg = _M_extract_via_format(__beg, __end, __io, __err, __tm, __dates[0]); if (__beg == __end) __err |= ios_base::eofbit; return __beg; } template _InIter time_get<_CharT, _InIter>:: do_get_weekday(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const { typedef char_traits<_CharT> __traits_type; const locale& __loc = __io._M_getloc(); const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); const ctype<_CharT>& __ctype = use_facet >(__loc); const char_type* __days[7]; __tp._M_days_abbreviated(__days); int __tmpwday; ios_base::iostate __tmperr = ios_base::goodbit; __beg = _M_extract_name(__beg, __end, __tmpwday, __days, 7, __io, __tmperr); if (!__tmperr && __beg != __end) { size_t __pos = __traits_type::length(__days[__tmpwday]); __tp._M_days(__days); const char_type* __name = __days[__tmpwday]; if (__name[__pos] == *__beg) { const size_t __len = __traits_type::length(__name); while (__pos < __len && __beg != __end && __name[__pos] == *__beg) ++__beg, ++__pos; if (__len != __pos) __tmperr |= ios_base::failbit; } } if (!__tmperr) __tm->tm_wday = __tmpwday; else __err |= ios_base::failbit; if (__beg == __end) __err |= ios_base::eofbit; return __beg; } template _InIter time_get<_CharT, _InIter>:: do_get_monthname(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const { typedef char_traits<_CharT> __traits_type; const locale& __loc = __io._M_getloc(); const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); const ctype<_CharT>& __ctype = use_facet >(__loc); const char_type* __months[12]; __tp._M_months_abbreviated(__months); int __tmpmon; ios_base::iostate __tmperr = ios_base::goodbit; __beg = _M_extract_name(__beg, __end, __tmpmon, __months, 12, __io, __tmperr); if (!__tmperr && __beg != __end) { size_t __pos = __traits_type::length(__months[__tmpmon]); __tp._M_months(__months); const char_type* __name = __months[__tmpmon]; if (__name[__pos] == *__beg) { const size_t __len = __traits_type::length(__name); while (__pos < __len && __beg != __end && __name[__pos] == *__beg) ++__beg, ++__pos; if (__len != __pos) __tmperr |= ios_base::failbit; } } if (!__tmperr) __tm->tm_mon = __tmpmon; else __err |= ios_base::failbit; if (__beg == __end) __err |= ios_base::eofbit; return __beg; } template _InIter time_get<_CharT, _InIter>:: do_get_year(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const { const locale& __loc = __io._M_getloc(); const ctype<_CharT>& __ctype = use_facet >(__loc); size_t __i = 0; int __value = 0; for (; __beg != __end && __i < 4; ++__beg, ++__i) { const char __c = __ctype.narrow(*__beg, '*'); if (__c >= '0' && __c <= '9') __value = __value * 10 + (__c - '0'); else break; } if (__i == 2 || __i == 4) __tm->tm_year = __i == 2 ? __value : __value - 1900; else __err |= ios_base::failbit; if (__beg == __end) __err |= ios_base::eofbit; return __beg; } template _OutIter time_put<_CharT, _OutIter>:: put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, const _CharT* __beg, const _CharT* __end) const { const locale& __loc = __io._M_getloc(); ctype<_CharT> const& __ctype = use_facet >(__loc); for (; __beg != __end; ++__beg) if (__ctype.narrow(*__beg, 0) != '%') { *__s = *__beg; ++__s; } else if (++__beg != __end) { char __format; char __mod = 0; const char __c = __ctype.narrow(*__beg, 0); if (__c != 'E' && __c != 'O') __format = __c; else if (++__beg != __end) { __mod = __c; __format = __ctype.narrow(*__beg, 0); } else break; __s = this->do_put(__s, __io, __fill, __tm, __format, __mod); } else break; return __s; } template _OutIter time_put<_CharT, _OutIter>:: do_put(iter_type __s, ios_base& __io, char_type, const tm* __tm, char __format, char __mod) const { const locale& __loc = __io._M_getloc(); ctype<_CharT> const& __ctype = use_facet >(__loc); __timepunct<_CharT> const& __tp = use_facet<__timepunct<_CharT> >(__loc); const size_t __maxlen = 128; char_type* __res = static_cast(__builtin_alloca(sizeof(char_type) * __maxlen)); char_type __fmt[4]; __fmt[0] = __ctype.widen('%'); if (!__mod) { __fmt[1] = __format; __fmt[2] = char_type(); } else { __fmt[1] = __mod; __fmt[2] = __format; __fmt[3] = char_type(); } __tp._M_put(__res, __maxlen, __fmt, __tm); return std::__write(__s, __res, char_traits::length(__res)); } template int collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const { return 0; } template size_t collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const { return 0; } template int collate<_CharT>:: do_compare(const _CharT* __lo1, const _CharT* __hi1, const _CharT* __lo2, const _CharT* __hi2) const { const string_type __one(__lo1, __hi1); const string_type __two(__lo2, __hi2); const _CharT* __p = __one.c_str(); const _CharT* __pend = __one.data() + __one.length(); const _CharT* __q = __two.c_str(); const _CharT* __qend = __two.data() + __two.length(); for (;;) { const int __res = _M_compare(__p, __q); if (__res) return __res; __p += char_traits<_CharT>::length(__p); __q += char_traits<_CharT>::length(__q); if (__p == __pend && __q == __qend) return 0; else if (__p == __pend) return -1; else if (__q == __qend) return 1; __p++; __q++; } } template typename collate<_CharT>::string_type collate<_CharT>:: do_transform(const _CharT* __lo, const _CharT* __hi) const { string_type __ret; const string_type __str(__lo, __hi); const _CharT* __p = __str.c_str(); const _CharT* __pend = __str.data() + __str.length(); size_t __len = (__hi - __lo) * 2; _CharT* __c = new _CharT[__len]; try { for (;;) { size_t __res = _M_transform(__c, __p, __len); if (__res >= __len) { __len = __res + 1; delete [] __c, __c = 0; __c = new _CharT[__len]; __res = _M_transform(__c, __p, __len); } __ret.append(__c, __res); __p += char_traits<_CharT>::length(__p); if (__p == __pend) break; __p++; __ret.push_back(_CharT()); } } catch(...) { delete [] __c; throw; } delete [] __c; return __ret; } template long collate<_CharT>:: do_hash(const _CharT* __lo, const _CharT* __hi) const { unsigned long __val = 0; for (; __lo < __hi; ++__lo) __val = *__lo + ((__val << 7) | (__val >> (numeric_limits::digits - 7))); return static_cast(__val); } # 2503 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/locale_facets.tcc" 3 template void __pad<_CharT, _Traits>::_S_pad(ios_base& __io, _CharT __fill, _CharT* __news, const _CharT* __olds, const streamsize __newlen, const streamsize __oldlen, const bool __num) { const size_t __plen = static_cast(__newlen - __oldlen); const ios_base::fmtflags __adjust = __io.flags() & ios_base::adjustfield; if (__adjust == ios_base::left) { _Traits::copy(__news, const_cast<_CharT*>(__olds), __oldlen); _Traits::assign(__news + __oldlen, __plen, __fill); return; } size_t __mod = 0; if (__adjust == ios_base::internal && __num) { const locale& __loc = __io._M_getloc(); const ctype<_CharT>& __ctype = use_facet >(__loc); const bool __testsign = (__ctype.widen('-') == __olds[0] || __ctype.widen('+') == __olds[0]); const bool __testhex = (__ctype.widen('0') == __olds[0] && __oldlen > 1 && (__ctype.widen('x') == __olds[1] || __ctype.widen('X') == __olds[1])); if (__testhex) { __news[0] = __olds[0]; __news[1] = __olds[1]; __mod = 2; __news += 2; } else if (__testsign) { __news[0] = __olds[0]; __mod = 1; ++__news; } } _Traits::assign(__news, __plen, __fill); _Traits::copy(__news + __plen, const_cast<_CharT*>(__olds + __mod), __oldlen - __mod); } bool __verify_grouping(const char* __grouping, size_t __grouping_size, const string& __grouping_tmp) { const size_t __n = __grouping_tmp.size() - 1; const size_t __min = std::min(__n, size_t(__grouping_size - 1)); size_t __i = __n; bool __test = true; for (size_t __j = 0; __j < __min && __test; --__i, ++__j) __test = __grouping_tmp[__i] == __grouping[__j]; for (; __i && __test; --__i) __test = __grouping_tmp[__i] == __grouping[__min]; if (static_cast(__grouping[__min]) > 0) __test &= __grouping_tmp[0] <= __grouping[__min]; return __test; } template _CharT* __add_grouping(_CharT* __s, _CharT __sep, const char* __gbeg, size_t __gsize, const _CharT* __first, const _CharT* __last) { size_t __idx = 0; size_t __ctr = 0; while (__last - __first > __gbeg[__idx] && static_cast(__gbeg[__idx]) > 0) { __last -= __gbeg[__idx]; __idx < __gsize - 1 ? ++__idx : ++__ctr; } while (__first != __last) *__s++ = *__first++; while (__ctr--) { *__s++ = __sep; for (char __i = __gbeg[__idx]; __i > 0; --__i) *__s++ = *__first++; } while (__idx--) { *__s++ = __sep; for (char __i = __gbeg[__idx]; __i > 0; --__i) *__s++ = *__first++; } return __s; } extern template class moneypunct; extern template class moneypunct; extern template class moneypunct_byname; extern template class moneypunct_byname; extern template class __gnu_cxx_ldbl128:: money_get; extern template class __gnu_cxx_ldbl128:: money_put; extern template class numpunct; extern template class numpunct_byname; extern template class __gnu_cxx_ldbl128:: num_get; extern template class __gnu_cxx_ldbl128:: num_put; extern template class __timepunct; extern template class time_put; extern template class time_put_byname; extern template class time_get; extern template class time_get_byname; extern template class messages; extern template class messages_byname; extern template class ctype_byname; extern template class codecvt_byname; extern template class collate; extern template class collate_byname; extern template const codecvt& use_facet >(const locale&); extern template const collate& use_facet >(const locale&); extern template const numpunct& use_facet >(const locale&); extern template const num_put& use_facet >(const locale&); extern template const num_get& use_facet >(const locale&); extern template const moneypunct& use_facet >(const locale&); extern template const moneypunct& use_facet >(const locale&); extern template const money_put& use_facet >(const locale&); extern template const money_get& use_facet >(const locale&); extern template const __timepunct& use_facet<__timepunct >(const locale&); extern template const time_put& use_facet >(const locale&); extern template const time_get& use_facet >(const locale&); extern template const messages& use_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet<__timepunct >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template class moneypunct; extern template class moneypunct; extern template class moneypunct_byname; extern template class moneypunct_byname; extern template class __gnu_cxx_ldbl128:: money_get; extern template class __gnu_cxx_ldbl128:: money_put; extern template class numpunct; extern template class numpunct_byname; extern template class __gnu_cxx_ldbl128:: num_get; extern template class __gnu_cxx_ldbl128:: num_put; extern template class __timepunct; extern template class time_put; extern template class time_put_byname; extern template class time_get; extern template class time_get_byname; extern template class messages; extern template class messages_byname; extern template class ctype_byname; extern template class codecvt_byname; extern template class collate; extern template class collate_byname; extern template const codecvt& use_facet >(locale const&); extern template const collate& use_facet >(const locale&); extern template const numpunct& use_facet >(const locale&); extern template const num_put& use_facet >(const locale&); extern template const num_get& use_facet >(const locale&); extern template const moneypunct& use_facet >(const locale&); extern template const moneypunct& use_facet >(const locale&); extern template const money_put& use_facet >(const locale&); extern template const money_get& use_facet >(const locale&); extern template const __timepunct& use_facet<__timepunct >(const locale&); extern template const time_put& use_facet >(const locale&); extern template const time_get& use_facet >(const locale&); extern template const messages& use_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet<__timepunct >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); } # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/locale" 2 3 # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/ostream.tcc" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template basic_ostream<_CharT, _Traits>::sentry:: sentry(basic_ostream<_CharT, _Traits>& __os) : _M_ok(false), _M_os(__os) { if (__os.tie() && __os.good()) __os.tie()->flush(); if (__os.good()) _M_ok = true; else __os.setstate(ios_base::failbit); } template template basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: _M_insert(_ValueT __v) { sentry __cerb(*this); if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); try { const __num_put_type& __np = __check_facet(this->_M_num_put); if (__np.put(*this, *this, this->fill(), __v).failed()) __err |= ios_base::badbit; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: operator<<(short __n) { const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; if (__fmt == ios_base::oct || __fmt == ios_base::hex) return _M_insert(static_cast(static_cast(__n))); else return _M_insert(static_cast(__n)); } template basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: operator<<(int __n) { const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; if (__fmt == ios_base::oct || __fmt == ios_base::hex) return _M_insert(static_cast(static_cast(__n))); else return _M_insert(static_cast(__n)); } template basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: operator<<(__streambuf_type* __sbin) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); sentry __cerb(*this); if (__cerb && __sbin) { try { if (!__copy_streambufs(__sbin, this->rdbuf())) __err |= ios_base::failbit; } catch(...) { this->_M_setstate(ios_base::failbit); } } else if (!__sbin) __err |= ios_base::badbit; if (__err) this->setstate(__err); return *this; } template basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: put(char_type __c) { sentry __cerb(*this); if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); try { const int_type __put = this->rdbuf()->sputc(__c); if (traits_type::eq_int_type(__put, traits_type::eof())) __err |= ios_base::badbit; } catch (...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: write(const _CharT* __s, streamsize __n) { sentry __cerb(*this); if (__cerb) { try { _M_write(__s, __n); } catch (...) { this->_M_setstate(ios_base::badbit); } } return *this; } template basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: flush() { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); try { if (this->rdbuf() && this->rdbuf()->pubsync() == -1) __err |= ios_base::badbit; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); return *this; } template typename basic_ostream<_CharT, _Traits>::pos_type basic_ostream<_CharT, _Traits>:: tellp() { pos_type __ret = pos_type(-1); try { if (!this->fail()) __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out); } catch(...) { this->_M_setstate(ios_base::badbit); } return __ret; } template basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: seekp(pos_type __pos) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); try { if (!this->fail()) { const pos_type __p = this->rdbuf()->pubseekpos(__pos, ios_base::out); if (__p == pos_type(off_type(-1))) __err |= ios_base::failbit; } } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); return *this; } template basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: seekp(off_type __off, ios_base::seekdir __dir) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); try { if (!this->fail()) { const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, ios_base::out); if (__p == pos_type(off_type(-1))) __err |= ios_base::failbit; } } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); return *this; } template basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) { if (!__s) __out.setstate(ios_base::badbit); else { const size_t __clen = char_traits::length(__s); _CharT* __ws = 0; try { __ws = new _CharT[__clen]; for (size_t __i = 0; __i < __clen; ++__i) __ws[__i] = __out.widen(__s[__i]); } catch(...) { delete [] __ws; __out._M_setstate(ios_base::badbit); return __out; } try { __ostream_insert(__out, __ws, __clen); delete [] __ws; } catch(...) { delete [] __ws; throw; } } return __out; } extern template class basic_ostream; extern template ostream& endl(ostream&); extern template ostream& ends(ostream&); extern template ostream& flush(ostream&); extern template ostream& operator<<(ostream&, char); extern template ostream& operator<<(ostream&, unsigned char); extern template ostream& operator<<(ostream&, signed char); extern template ostream& operator<<(ostream&, const char*); extern template ostream& operator<<(ostream&, const unsigned char*); extern template ostream& operator<<(ostream&, const signed char*); extern template ostream& __ostream_insert(ostream&, const char*, streamsize); extern template ostream& ostream::_M_insert(long); extern template ostream& ostream::_M_insert(unsigned long); extern template ostream& ostream::_M_insert(bool); extern template ostream& ostream::_M_insert(long long); extern template ostream& ostream::_M_insert(unsigned long long); extern template ostream& ostream::_M_insert(double); extern template ostream& ostream::_M_insert(long double); extern template ostream& ostream::_M_insert(const void*); extern template class basic_ostream; extern template wostream& endl(wostream&); extern template wostream& ends(wostream&); extern template wostream& flush(wostream&); extern template wostream& operator<<(wostream&, wchar_t); extern template wostream& operator<<(wostream&, char); extern template wostream& operator<<(wostream&, const wchar_t*); extern template wostream& operator<<(wostream&, const char*); extern template wostream& __ostream_insert(wostream&, const wchar_t*, streamsize); extern template wostream& wostream::_M_insert(long); extern template wostream& wostream::_M_insert(unsigned long); extern template wostream& wostream::_M_insert(bool); extern template wostream& wostream::_M_insert(long long); extern template wostream& wostream::_M_insert(unsigned long long); extern template wostream& wostream::_M_insert(double); extern template wostream& wostream::_M_insert(long double); extern template wostream& wostream::_M_insert(const void*); } # 573 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ostream" 2 3 # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iostream" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 1 3 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 57 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 template class basic_istream : virtual public basic_ios<_CharT, _Traits> { public: typedef _CharT char_type; typedef typename _Traits::int_type int_type; typedef typename _Traits::pos_type pos_type; typedef typename _Traits::off_type off_type; typedef _Traits traits_type; typedef basic_streambuf<_CharT, _Traits> __streambuf_type; typedef basic_ios<_CharT, _Traits> __ios_type; typedef basic_istream<_CharT, _Traits> __istream_type; typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > __num_get_type; typedef ctype<_CharT> __ctype_type; template friend basic_istream<_CharT2, _Traits2>& operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2&); template friend basic_istream<_CharT2, _Traits2>& operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*); protected: streamsize _M_gcount; public: # 103 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 explicit basic_istream(__streambuf_type* __sb): _M_gcount(streamsize(0)) { this->init(__sb); } virtual ~basic_istream() { _M_gcount = streamsize(0); } class sentry; friend class sentry; # 130 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 __istream_type& operator>>(__istream_type& (*__pf)(__istream_type&)) { return __pf(*this); } __istream_type& operator>>(__ios_type& (*__pf)(__ios_type&)) { __pf(*this); return *this; } __istream_type& operator>>(ios_base& (*__pf)(ios_base&)) { __pf(*this); return *this; } # 177 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 __istream_type& operator>>(bool& __n) { return _M_extract(__n); } __istream_type& operator>>(short& __n); __istream_type& operator>>(unsigned short& __n) { return _M_extract(__n); } __istream_type& operator>>(int& __n); __istream_type& operator>>(unsigned int& __n) { return _M_extract(__n); } __istream_type& operator>>(long& __n) { return _M_extract(__n); } __istream_type& operator>>(unsigned long& __n) { return _M_extract(__n); } __istream_type& operator>>(long long& __n) { return _M_extract(__n); } __istream_type& operator>>(unsigned long long& __n) { return _M_extract(__n); } __istream_type& operator>>(float& __f) { return _M_extract(__f); } __istream_type& operator>>(double& __f) { return _M_extract(__f); } __istream_type& operator>>(long double& __f) { return _M_extract(__f); } __istream_type& operator>>(void*& __p) { return _M_extract(__p); } # 249 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 __istream_type& operator>>(__streambuf_type* __sb); # 259 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 streamsize gcount() const { return _M_gcount; } # 291 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 int_type get(); # 305 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 __istream_type& get(char_type& __c); # 332 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 __istream_type& get(char_type* __s, streamsize __n, char_type __delim); # 343 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 __istream_type& get(char_type* __s, streamsize __n) { return this->get(__s, __n, this->widen('\n')); } # 366 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 __istream_type& get(__streambuf_type& __sb, char_type __delim); # 376 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 __istream_type& get(__streambuf_type& __sb) { return this->get(__sb, this->widen('\n')); } # 405 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 __istream_type& getline(char_type* __s, streamsize __n, char_type __delim); # 416 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 __istream_type& getline(char_type* __s, streamsize __n) { return this->getline(__s, __n, this->widen('\n')); } # 440 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 __istream_type& ignore(); __istream_type& ignore(streamsize __n); __istream_type& ignore(streamsize __n, int_type __delim); # 457 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 int_type peek(); # 475 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 __istream_type& read(char_type* __s, streamsize __n); # 494 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 streamsize readsome(char_type* __s, streamsize __n); # 510 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 __istream_type& putback(char_type __c); # 525 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 __istream_type& unget(); # 543 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 int sync(); # 557 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 pos_type tellg(); # 572 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 __istream_type& seekg(pos_type); # 588 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 __istream_type& seekg(off_type, ios_base::seekdir); protected: explicit basic_istream(): _M_gcount(streamsize(0)) { } template __istream_type& _M_extract(_ValueT& __v); }; template<> basic_istream& basic_istream:: getline(char_type* __s, streamsize __n, char_type __delim); template<> basic_istream& basic_istream:: ignore(streamsize __n); template<> basic_istream& basic_istream:: ignore(streamsize __n, int_type __delim); template<> basic_istream& basic_istream:: getline(char_type* __s, streamsize __n, char_type __delim); template<> basic_istream& basic_istream:: ignore(streamsize __n); template<> basic_istream& basic_istream:: ignore(streamsize __n, int_type __delim); # 645 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 template class basic_istream<_CharT, _Traits>::sentry { public: typedef _Traits traits_type; typedef basic_streambuf<_CharT, _Traits> __streambuf_type; typedef basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::__ctype_type __ctype_type; typedef typename _Traits::int_type __int_type; # 677 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 explicit sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false); # 687 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 operator bool() const { return _M_ok; } private: bool _M_ok; }; # 707 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 template basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c); template inline basic_istream& operator>>(basic_istream& __in, unsigned char& __c) { return (__in >> reinterpret_cast(__c)); } template inline basic_istream& operator>>(basic_istream& __in, signed char& __c) { return (__in >> reinterpret_cast(__c)); } # 748 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 template basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s); template<> basic_istream& operator>>(basic_istream& __in, char* __s); template inline basic_istream& operator>>(basic_istream& __in, unsigned char* __s) { return (__in >> reinterpret_cast(__s)); } template inline basic_istream& operator>>(basic_istream& __in, signed char* __s) { return (__in >> reinterpret_cast(__s)); } # 775 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 template class basic_iostream : public basic_istream<_CharT, _Traits>, public basic_ostream<_CharT, _Traits> { public: typedef _CharT char_type; typedef typename _Traits::int_type int_type; typedef typename _Traits::pos_type pos_type; typedef typename _Traits::off_type off_type; typedef _Traits traits_type; typedef basic_istream<_CharT, _Traits> __istream_type; typedef basic_ostream<_CharT, _Traits> __ostream_type; explicit basic_iostream(basic_streambuf<_CharT, _Traits>* __sb) : __istream_type(), __ostream_type() { this->init(__sb); } virtual ~basic_iostream() { } protected: explicit basic_iostream() : __istream_type(), __ostream_type() { } }; # 838 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 3 template basic_istream<_CharT, _Traits>& ws(basic_istream<_CharT, _Traits>& __is); } # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/istream.tcc" 1 3 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/istream.tcc" 3 # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/istream.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template basic_istream<_CharT, _Traits>::sentry:: sentry(basic_istream<_CharT, _Traits>& __in, bool __noskip) : _M_ok(false) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); if (__in.good()) { if (__in.tie()) __in.tie()->flush(); if (!__noskip && (__in.flags() & ios_base::skipws)) { const __int_type __eof = traits_type::eof(); __streambuf_type* __sb = __in.rdbuf(); __int_type __c = __sb->sgetc(); const __ctype_type& __ct = __check_facet(__in._M_ctype); while (!traits_type::eq_int_type(__c, __eof) && __ct.is(ctype_base::space, traits_type::to_char_type(__c))) __c = __sb->snextc(); if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; } } if (__in.good() && __err == ios_base::goodbit) _M_ok = true; else { __err |= ios_base::failbit; __in.setstate(__err); } } template template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: _M_extract(_ValueT& __v) { sentry __cerb(*this, false); if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); try { const __num_get_type& __ng = __check_facet(this->_M_num_get); __ng.get(*this, 0, *this, __err, __v); } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: operator>>(short& __n) { long __l; _M_extract(__l); if (!this->fail()) { if (numeric_limits::min() <= __l && __l <= numeric_limits::max()) __n = __l; else this->setstate(ios_base::failbit); } return *this; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: operator>>(int& __n) { long __l; _M_extract(__l); if (!this->fail()) { if (numeric_limits::min() <= __l && __l <= numeric_limits::max()) __n = __l; else this->setstate(ios_base::failbit); } return *this; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: operator>>(__streambuf_type* __sbout) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); sentry __cerb(*this, false); if (__cerb && __sbout) { try { bool __ineof; if (!__copy_streambufs_eof(this->rdbuf(), __sbout, __ineof)) __err |= ios_base::failbit; if (__ineof) __err |= ios_base::eofbit; } catch(...) { this->_M_setstate(ios_base::failbit); } } else if (!__sbout) __err |= ios_base::failbit; if (__err) this->setstate(__err); return *this; } template typename basic_istream<_CharT, _Traits>::int_type basic_istream<_CharT, _Traits>:: get(void) { const int_type __eof = traits_type::eof(); int_type __c = __eof; _M_gcount = 0; ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); sentry __cerb(*this, true); if (__cerb) { try { __c = this->rdbuf()->sbumpc(); if (!traits_type::eq_int_type(__c, __eof)) _M_gcount = 1; else __err |= ios_base::eofbit; } catch(...) { this->_M_setstate(ios_base::badbit); } } if (!_M_gcount) __err |= ios_base::failbit; if (__err) this->setstate(__err); return __c; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: get(char_type& __c) { _M_gcount = 0; ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); sentry __cerb(*this, true); if (__cerb) { try { const int_type __cb = this->rdbuf()->sbumpc(); if (!traits_type::eq_int_type(__cb, traits_type::eof())) { _M_gcount = 1; __c = traits_type::to_char_type(__cb); } else __err |= ios_base::eofbit; } catch(...) { this->_M_setstate(ios_base::badbit); } } if (!_M_gcount) __err |= ios_base::failbit; if (__err) this->setstate(__err); return *this; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: get(char_type* __s, streamsize __n, char_type __delim) { _M_gcount = 0; ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); sentry __cerb(*this, true); if (__cerb) { try { const int_type __idelim = traits_type::to_int_type(__delim); const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); int_type __c = __sb->sgetc(); while (_M_gcount + 1 < __n && !traits_type::eq_int_type(__c, __eof) && !traits_type::eq_int_type(__c, __idelim)) { *__s++ = traits_type::to_char_type(__c); ++_M_gcount; __c = __sb->snextc(); } if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; } catch(...) { this->_M_setstate(ios_base::badbit); } } if (__n > 0) *__s = char_type(); if (!_M_gcount) __err |= ios_base::failbit; if (__err) this->setstate(__err); return *this; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: get(__streambuf_type& __sb, char_type __delim) { _M_gcount = 0; ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); sentry __cerb(*this, true); if (__cerb) { try { const int_type __idelim = traits_type::to_int_type(__delim); const int_type __eof = traits_type::eof(); __streambuf_type* __this_sb = this->rdbuf(); int_type __c = __this_sb->sgetc(); char_type __c2 = traits_type::to_char_type(__c); while (!traits_type::eq_int_type(__c, __eof) && !traits_type::eq_int_type(__c, __idelim) && !traits_type::eq_int_type(__sb.sputc(__c2), __eof)) { ++_M_gcount; __c = __this_sb->snextc(); __c2 = traits_type::to_char_type(__c); } if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; } catch(...) { this->_M_setstate(ios_base::badbit); } } if (!_M_gcount) __err |= ios_base::failbit; if (__err) this->setstate(__err); return *this; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: getline(char_type* __s, streamsize __n, char_type __delim) { _M_gcount = 0; ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); sentry __cerb(*this, true); if (__cerb) { try { const int_type __idelim = traits_type::to_int_type(__delim); const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); int_type __c = __sb->sgetc(); while (_M_gcount + 1 < __n && !traits_type::eq_int_type(__c, __eof) && !traits_type::eq_int_type(__c, __idelim)) { *__s++ = traits_type::to_char_type(__c); __c = __sb->snextc(); ++_M_gcount; } if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; else { if (traits_type::eq_int_type(__c, __idelim)) { __sb->sbumpc(); ++_M_gcount; } else __err |= ios_base::failbit; } } catch(...) { this->_M_setstate(ios_base::badbit); } } if (__n > 0) *__s = char_type(); if (!_M_gcount) __err |= ios_base::failbit; if (__err) this->setstate(__err); return *this; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: ignore(void) { _M_gcount = 0; sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); try { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); if (traits_type::eq_int_type(__sb->sbumpc(), __eof)) __err |= ios_base::eofbit; else _M_gcount = 1; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: ignore(streamsize __n) { _M_gcount = 0; sentry __cerb(*this, true); if (__cerb && __n > 0) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); try { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); int_type __c = __sb->sgetc(); # 429 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/istream.tcc" 3 bool __large_ignore = false; while (true) { while (_M_gcount < __n && !traits_type::eq_int_type(__c, __eof)) { ++_M_gcount; __c = __sb->snextc(); } if (__n == numeric_limits::max() && !traits_type::eq_int_type(__c, __eof)) { _M_gcount = numeric_limits::min(); __large_ignore = true; } else break; } if (__large_ignore) _M_gcount = numeric_limits::max(); if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: ignore(streamsize __n, int_type __delim) { _M_gcount = 0; sentry __cerb(*this, true); if (__cerb && __n > 0) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); try { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); int_type __c = __sb->sgetc(); bool __large_ignore = false; while (true) { while (_M_gcount < __n && !traits_type::eq_int_type(__c, __eof) && !traits_type::eq_int_type(__c, __delim)) { ++_M_gcount; __c = __sb->snextc(); } if (__n == numeric_limits::max() && !traits_type::eq_int_type(__c, __eof) && !traits_type::eq_int_type(__c, __delim)) { _M_gcount = numeric_limits::min(); __large_ignore = true; } else break; } if (__large_ignore) _M_gcount = numeric_limits::max(); if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; else if (traits_type::eq_int_type(__c, __delim)) { if (_M_gcount < numeric_limits::max()) ++_M_gcount; __sb->sbumpc(); } } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template typename basic_istream<_CharT, _Traits>::int_type basic_istream<_CharT, _Traits>:: peek(void) { int_type __c = traits_type::eof(); _M_gcount = 0; sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); try { __c = this->rdbuf()->sgetc(); if (traits_type::eq_int_type(__c, traits_type::eof())) __err |= ios_base::eofbit; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return __c; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: read(char_type* __s, streamsize __n) { _M_gcount = 0; sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); try { _M_gcount = this->rdbuf()->sgetn(__s, __n); if (_M_gcount != __n) __err |= (ios_base::eofbit | ios_base::failbit); } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template streamsize basic_istream<_CharT, _Traits>:: readsome(char_type* __s, streamsize __n) { _M_gcount = 0; sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); try { const streamsize __num = this->rdbuf()->in_avail(); if (__num > 0) _M_gcount = this->rdbuf()->sgetn(__s, std::min(__num, __n)); else if (__num == -1) __err |= ios_base::eofbit; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return _M_gcount; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: putback(char_type __c) { _M_gcount = 0; sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); try { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); if (!__sb || traits_type::eq_int_type(__sb->sputbackc(__c), __eof)) __err |= ios_base::badbit; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: unget(void) { _M_gcount = 0; sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); try { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); if (!__sb || traits_type::eq_int_type(__sb->sungetc(), __eof)) __err |= ios_base::badbit; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template int basic_istream<_CharT, _Traits>:: sync(void) { int __ret = -1; sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); try { __streambuf_type* __sb = this->rdbuf(); if (__sb) { if (__sb->pubsync() == -1) __err |= ios_base::badbit; else __ret = 0; } } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return __ret; } template typename basic_istream<_CharT, _Traits>::pos_type basic_istream<_CharT, _Traits>:: tellg(void) { pos_type __ret = pos_type(-1); try { if (!this->fail()) __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::in); } catch(...) { this->_M_setstate(ios_base::badbit); } return __ret; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: seekg(pos_type __pos) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); try { if (!this->fail()) { const pos_type __p = this->rdbuf()->pubseekpos(__pos, ios_base::in); if (__p == pos_type(off_type(-1))) __err |= ios_base::failbit; } } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); return *this; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: seekg(off_type __off, ios_base::seekdir __dir) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); try { if (!this->fail()) { const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, ios_base::in); if (__p == pos_type(off_type(-1))) __err |= ios_base::failbit; } } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); return *this; } template basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) { typedef basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::int_type __int_type; typename __istream_type::sentry __cerb(__in, false); if (__cerb) { ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); try { const __int_type __cb = __in.rdbuf()->sbumpc(); if (!_Traits::eq_int_type(__cb, _Traits::eof())) __c = _Traits::to_char_type(__cb); else __err |= (ios_base::eofbit | ios_base::failbit); } catch(...) { __in._M_setstate(ios_base::badbit); } if (__err) __in.setstate(__err); } return __in; } template basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) { typedef basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::__streambuf_type __streambuf_type; typedef typename _Traits::int_type int_type; typedef _CharT char_type; typedef ctype<_CharT> __ctype_type; streamsize __extracted = 0; ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); typename __istream_type::sentry __cerb(__in, false); if (__cerb) { try { streamsize __num = __in.width(); if (__num <= 0) __num = numeric_limits::max(); const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); const int_type __eof = _Traits::eof(); __streambuf_type* __sb = __in.rdbuf(); int_type __c = __sb->sgetc(); while (__extracted < __num - 1 && !_Traits::eq_int_type(__c, __eof) && !__ct.is(ctype_base::space, _Traits::to_char_type(__c))) { *__s++ = _Traits::to_char_type(__c); ++__extracted; __c = __sb->snextc(); } if (_Traits::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; *__s = char_type(); __in.width(0); } catch(...) { __in._M_setstate(ios_base::badbit); } } if (!__extracted) __err |= ios_base::failbit; if (__err) __in.setstate(__err); return __in; } template basic_istream<_CharT,_Traits>& ws(basic_istream<_CharT,_Traits>& __in) { typedef basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::__streambuf_type __streambuf_type; typedef typename __istream_type::__ctype_type __ctype_type; typedef typename __istream_type::int_type __int_type; const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); const __int_type __eof = _Traits::eof(); __streambuf_type* __sb = __in.rdbuf(); __int_type __c = __sb->sgetc(); while (!_Traits::eq_int_type(__c, __eof) && __ct.is(ctype_base::space, _Traits::to_char_type(__c))) __c = __sb->snextc(); if (_Traits::eq_int_type(__c, __eof)) __in.setstate(ios_base::eofbit); return __in; } template basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __in, basic_string<_CharT, _Traits, _Alloc>& __str) { typedef basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::int_type __int_type; typedef typename __istream_type::__streambuf_type __streambuf_type; typedef typename __istream_type::__ctype_type __ctype_type; typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef typename __string_type::size_type __size_type; __size_type __extracted = 0; ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); typename __istream_type::sentry __cerb(__in, false); if (__cerb) { try { __str.erase(); _CharT __buf[128]; __size_type __len = 0; const streamsize __w = __in.width(); const __size_type __n = __w > 0 ? static_cast<__size_type>(__w) : __str.max_size(); const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); const __int_type __eof = _Traits::eof(); __streambuf_type* __sb = __in.rdbuf(); __int_type __c = __sb->sgetc(); while (__extracted < __n && !_Traits::eq_int_type(__c, __eof) && !__ct.is(ctype_base::space, _Traits::to_char_type(__c))) { if (__len == sizeof(__buf) / sizeof(_CharT)) { __str.append(__buf, sizeof(__buf) / sizeof(_CharT)); __len = 0; } __buf[__len++] = _Traits::to_char_type(__c); ++__extracted; __c = __sb->snextc(); } __str.append(__buf, __len); if (_Traits::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; __in.width(0); } catch(...) { __in._M_setstate(ios_base::badbit); } } if (!__extracted) __err |= ios_base::failbit; if (__err) __in.setstate(__err); return __in; } template basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>& __in, basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) { typedef basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::int_type __int_type; typedef typename __istream_type::__streambuf_type __streambuf_type; typedef typename __istream_type::__ctype_type __ctype_type; typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef typename __string_type::size_type __size_type; __size_type __extracted = 0; const __size_type __n = __str.max_size(); ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); typename __istream_type::sentry __cerb(__in, true); if (__cerb) { try { __str.erase(); const __int_type __idelim = _Traits::to_int_type(__delim); const __int_type __eof = _Traits::eof(); __streambuf_type* __sb = __in.rdbuf(); __int_type __c = __sb->sgetc(); while (__extracted < __n && !_Traits::eq_int_type(__c, __eof) && !_Traits::eq_int_type(__c, __idelim)) { __str += _Traits::to_char_type(__c); ++__extracted; __c = __sb->snextc(); } if (_Traits::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; else if (_Traits::eq_int_type(__c, __idelim)) { ++__extracted; __sb->sbumpc(); } else __err |= ios_base::failbit; } catch(...) { __in._M_setstate(ios_base::badbit); } } if (!__extracted) __err |= ios_base::failbit; if (__err) __in.setstate(__err); return __in; } extern template class basic_istream; extern template istream& ws(istream&); extern template istream& operator>>(istream&, char&); extern template istream& operator>>(istream&, char*); extern template istream& operator>>(istream&, unsigned char&); extern template istream& operator>>(istream&, signed char&); extern template istream& operator>>(istream&, unsigned char*); extern template istream& operator>>(istream&, signed char*); extern template istream& istream::_M_extract(unsigned short&); extern template istream& istream::_M_extract(unsigned int&); extern template istream& istream::_M_extract(long&); extern template istream& istream::_M_extract(unsigned long&); extern template istream& istream::_M_extract(bool&); extern template istream& istream::_M_extract(long long&); extern template istream& istream::_M_extract(unsigned long long&); extern template istream& istream::_M_extract(float&); extern template istream& istream::_M_extract(double&); extern template istream& istream::_M_extract(long double&); extern template istream& istream::_M_extract(void*&); extern template class basic_iostream; extern template class basic_istream; extern template wistream& ws(wistream&); extern template wistream& operator>>(wistream&, wchar_t&); extern template wistream& operator>>(wistream&, wchar_t*); extern template wistream& wistream::_M_extract(unsigned short&); extern template wistream& wistream::_M_extract(unsigned int&); extern template wistream& wistream::_M_extract(long&); extern template wistream& wistream::_M_extract(unsigned long&); extern template wistream& wistream::_M_extract(bool&); extern template wistream& wistream::_M_extract(long long&); extern template wistream& wistream::_M_extract(unsigned long long&); extern template wistream& wistream::_M_extract(float&); extern template wistream& wistream::_M_extract(double&); extern template wistream& wistream::_M_extract(long double&); extern template wistream& wistream::_M_extract(void*&); extern template class basic_iostream; } # 846 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/istream" 2 3 # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iostream" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 63 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iostream" 3 extern istream cin; extern ostream cout; extern ostream cerr; extern ostream clog; extern wistream wcin; extern wostream wcout; extern wostream wcerr; extern wostream wclog; static ios_base::Init __ioinit; } # 49 "enblend.cc" 2 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/list" 1 3 # 63 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/list" 3 # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/list" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 1 3 # 67 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { struct _List_node_base { _List_node_base* _M_next; _List_node_base* _M_prev; static void swap(_List_node_base& __x, _List_node_base& __y); void transfer(_List_node_base * const __first, _List_node_base * const __last); void reverse(); void hook(_List_node_base * const __position); void unhook(); }; template struct _List_node : public _List_node_base { _Tp _M_data; }; # 111 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 template struct _List_iterator { typedef _List_iterator<_Tp> _Self; typedef _List_node<_Tp> _Node; typedef ptrdiff_t difference_type; typedef std::bidirectional_iterator_tag iterator_category; typedef _Tp value_type; typedef _Tp* pointer; typedef _Tp& reference; _List_iterator() : _M_node() { } explicit _List_iterator(_List_node_base* __x) : _M_node(__x) { } reference operator*() const { return static_cast<_Node*>(_M_node)->_M_data; } pointer operator->() const { return &static_cast<_Node*>(_M_node)->_M_data; } _Self& operator++() { _M_node = _M_node->_M_next; return *this; } _Self operator++(int) { _Self __tmp = *this; _M_node = _M_node->_M_next; return __tmp; } _Self& operator--() { _M_node = _M_node->_M_prev; return *this; } _Self operator--(int) { _Self __tmp = *this; _M_node = _M_node->_M_prev; return __tmp; } bool operator==(const _Self& __x) const { return _M_node == __x._M_node; } bool operator!=(const _Self& __x) const { return _M_node != __x._M_node; } _List_node_base* _M_node; }; # 188 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 template struct _List_const_iterator { typedef _List_const_iterator<_Tp> _Self; typedef const _List_node<_Tp> _Node; typedef _List_iterator<_Tp> iterator; typedef ptrdiff_t difference_type; typedef std::bidirectional_iterator_tag iterator_category; typedef _Tp value_type; typedef const _Tp* pointer; typedef const _Tp& reference; _List_const_iterator() : _M_node() { } explicit _List_const_iterator(const _List_node_base* __x) : _M_node(__x) { } _List_const_iterator(const iterator& __x) : _M_node(__x._M_node) { } reference operator*() const { return static_cast<_Node*>(_M_node)->_M_data; } pointer operator->() const { return &static_cast<_Node*>(_M_node)->_M_data; } _Self& operator++() { _M_node = _M_node->_M_next; return *this; } _Self operator++(int) { _Self __tmp = *this; _M_node = _M_node->_M_next; return __tmp; } _Self& operator--() { _M_node = _M_node->_M_prev; return *this; } _Self operator--(int) { _Self __tmp = *this; _M_node = _M_node->_M_prev; return __tmp; } bool operator==(const _Self& __x) const { return _M_node == __x._M_node; } bool operator!=(const _Self& __x) const { return _M_node != __x._M_node; } const _List_node_base* _M_node; }; template inline bool operator==(const _List_iterator<_Val>& __x, const _List_const_iterator<_Val>& __y) { return __x._M_node == __y._M_node; } template inline bool operator!=(const _List_iterator<_Val>& __x, const _List_const_iterator<_Val>& __y) { return __x._M_node != __y._M_node; } template class _List_base { protected: # 298 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 typedef typename _Alloc::template rebind<_List_node<_Tp> >::other _Node_alloc_type; typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; struct _List_impl : public _Node_alloc_type { _List_node_base _M_node; _List_impl(const _Node_alloc_type& __a) : _Node_alloc_type(__a), _M_node() { } }; _List_impl _M_impl; _List_node<_Tp>* _M_get_node() { return _M_impl._Node_alloc_type::allocate(1); } void _M_put_node(_List_node<_Tp>* __p) { _M_impl._Node_alloc_type::deallocate(__p, 1); } public: typedef _Alloc allocator_type; _Node_alloc_type& _M_get_Node_allocator() { return *static_cast<_Node_alloc_type*>(&this->_M_impl); } const _Node_alloc_type& _M_get_Node_allocator() const { return *static_cast(&this->_M_impl); } _Tp_alloc_type _M_get_Tp_allocator() const { return _Tp_alloc_type(_M_get_Node_allocator()); } allocator_type get_allocator() const { return allocator_type(_M_get_Node_allocator()); } _List_base(const allocator_type& __a) : _M_impl(__a) { _M_init(); } ~_List_base() { _M_clear(); } void _M_clear(); void _M_init() { this->_M_impl._M_node._M_next = &this->_M_impl._M_node; this->_M_impl._M_node._M_prev = &this->_M_impl._M_node; } }; # 406 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 template > class list : protected _List_base<_Tp, _Alloc> { typedef typename _Alloc::value_type _Alloc_value_type; typedef _List_base<_Tp, _Alloc> _Base; typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; public: typedef _Tp value_type; typedef typename _Tp_alloc_type::pointer pointer; typedef typename _Tp_alloc_type::const_pointer const_pointer; typedef typename _Tp_alloc_type::reference reference; typedef typename _Tp_alloc_type::const_reference const_reference; typedef _List_iterator<_Tp> iterator; typedef _List_const_iterator<_Tp> const_iterator; typedef std::reverse_iterator const_reverse_iterator; typedef std::reverse_iterator reverse_iterator; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Alloc allocator_type; protected: typedef _List_node<_Tp> _Node; using _Base::_M_impl; using _Base::_M_put_node; using _Base::_M_get_node; using _Base::_M_get_Tp_allocator; using _Base::_M_get_Node_allocator; # 449 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 _Node* _M_create_node(const value_type& __x) { _Node* __p = this->_M_get_node(); try { _M_get_Tp_allocator().construct(&__p->_M_data, __x); } catch(...) { _M_put_node(__p); throw; } return __p; } public: explicit list(const allocator_type& __a = allocator_type()) : _Base(__a) { } # 482 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 explicit list(size_type __n, const value_type& __value = value_type(), const allocator_type& __a = allocator_type()) : _Base(__a) { _M_fill_initialize(__n, __value); } # 495 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 list(const list& __x) : _Base(__x._M_get_Node_allocator()) { _M_initialize_dispatch(__x.begin(), __x.end(), __false_type()); } # 508 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 template list(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) : _Base(__a) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_initialize_dispatch(__first, __last, _Integral()); } # 533 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 list& operator=(const list& __x); # 546 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 void assign(size_type __n, const value_type& __val) { _M_fill_assign(__n, __val); } # 562 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 template void assign(_InputIterator __first, _InputIterator __last) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_assign_dispatch(__first, __last, _Integral()); } allocator_type get_allocator() const { return _Base::get_allocator(); } iterator begin() { return iterator(this->_M_impl._M_node._M_next); } const_iterator begin() const { return const_iterator(this->_M_impl._M_node._M_next); } iterator end() { return iterator(&this->_M_impl._M_node); } const_iterator end() const { return const_iterator(&this->_M_impl._M_node); } reverse_iterator rbegin() { return reverse_iterator(end()); } const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); } reverse_iterator rend() { return reverse_iterator(begin()); } const_reverse_iterator rend() const { return const_reverse_iterator(begin()); } bool empty() const { return this->_M_impl._M_node._M_next == &this->_M_impl._M_node; } size_type size() const { return std::distance(begin(), end()); } size_type max_size() const { return _M_get_Tp_allocator().max_size(); } # 677 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 void resize(size_type __new_size, value_type __x = value_type()); reference front() { return *begin(); } const_reference front() const { return *begin(); } reference back() { iterator __tmp = end(); --__tmp; return *__tmp; } const_reference back() const { const_iterator __tmp = end(); --__tmp; return *__tmp; } # 732 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 void push_front(const value_type& __x) { this->_M_insert(begin(), __x); } # 748 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 void pop_front() { this->_M_erase(begin()); } # 762 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 void push_back(const value_type& __x) { this->_M_insert(end(), __x); } # 777 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 void pop_back() { this->_M_erase(iterator(this->_M_impl._M_node._M_prev)); } # 792 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 iterator insert(iterator __position, const value_type& __x); # 807 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 void insert(iterator __position, size_type __n, const value_type& __x) { list __tmp(__n, __x, _M_get_Node_allocator()); splice(__position, __tmp); } # 827 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 template void insert(iterator __position, _InputIterator __first, _InputIterator __last) { list __tmp(__first, __last, _M_get_Node_allocator()); splice(__position, __tmp); } # 851 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 iterator erase(iterator __position); # 872 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 iterator erase(iterator __first, iterator __last) { while (__first != __last) __first = erase(__first); return __last; } # 889 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 void swap(list& __x) { _List_node_base::swap(this->_M_impl._M_node, __x._M_impl._M_node); std::__alloc_swap:: _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator()); } void clear() { _Base::_M_clear(); _Base::_M_init(); } # 925 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 void splice(iterator __position, list& __x) { if (!__x.empty()) { _M_check_equal_allocators(__x); this->_M_transfer(__position, __x.begin(), __x.end()); } } # 945 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 void splice(iterator __position, list& __x, iterator __i) { iterator __j = __i; ++__j; if (__position == __i || __position == __j) return; if (this != &__x) _M_check_equal_allocators(__x); this->_M_transfer(__position, __i, __j); } # 971 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 void splice(iterator __position, list& __x, iterator __first, iterator __last) { if (__first != __last) { if (this != &__x) _M_check_equal_allocators(__x); this->_M_transfer(__position, __first, __last); } } # 994 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 void remove(const _Tp& __value); # 1008 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 template void remove_if(_Predicate); # 1022 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 void unique(); # 1037 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 template void unique(_BinaryPredicate); # 1050 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 void merge(list& __x); # 1065 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 template void merge(list&, _StrictWeakOrdering); void reverse() { this->_M_impl._M_node.reverse(); } void sort(); template void sort(_StrictWeakOrdering); protected: template void _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) { _M_fill_initialize(static_cast(__n), static_cast(__x)); } template void _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { for (; __first != __last; ++__first) push_back(*__first); } void _M_fill_initialize(size_type __n, const value_type& __x) { for (; __n > 0; --__n) push_back(__x); } template void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) { _M_fill_assign(static_cast(__n), static_cast(__val)); } template void _M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type); void _M_fill_assign(size_type __n, const value_type& __val); void _M_transfer(iterator __position, iterator __first, iterator __last) { __position._M_node->transfer(__first._M_node, __last._M_node); } void _M_insert(iterator __position, const value_type& __x) { _Node* __tmp = _M_create_node(__x); __tmp->hook(__position._M_node); } void _M_erase(iterator __position) { __position._M_node->unhook(); _Node* __n = static_cast<_Node*>(__position._M_node); _M_get_Tp_allocator().destroy(&__n->_M_data); _M_put_node(__n); } void _M_check_equal_allocators(list& __x) { if (_M_get_Node_allocator() != __x._M_get_Node_allocator()) __throw_runtime_error(("list::_M_check_equal_allocators")); } }; # 1194 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 template inline bool operator==(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) { typedef typename list<_Tp, _Alloc>::const_iterator const_iterator; const_iterator __end1 = __x.end(); const_iterator __end2 = __y.end(); const_iterator __i1 = __x.begin(); const_iterator __i2 = __y.begin(); while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2) { ++__i1; ++__i2; } return __i1 == __end1 && __i2 == __end2; } # 1223 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_list.h" 3 template inline bool operator<(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) { return std::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); } template inline bool operator!=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) { return !(__x == __y); } template inline bool operator>(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) { return __y < __x; } template inline bool operator<=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) { return !(__y < __x); } template inline bool operator>=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) { return !(__x < __y); } template inline void swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y) { __x.swap(__y); } } # 71 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/list" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/list.tcc" 1 3 # 65 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/list.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template void _List_base<_Tp, _Alloc>:: _M_clear() { typedef _List_node<_Tp> _Node; _Node* __cur = static_cast<_Node*>(this->_M_impl._M_node._M_next); while (__cur != &this->_M_impl._M_node) { _Node* __tmp = __cur; __cur = static_cast<_Node*>(__cur->_M_next); _M_get_Tp_allocator().destroy(&__tmp->_M_data); _M_put_node(__tmp); } } template typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>:: insert(iterator __position, const value_type& __x) { _Node* __tmp = _M_create_node(__x); __tmp->hook(__position._M_node); return iterator(__tmp); } template typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>:: erase(iterator __position) { iterator __ret = iterator(__position._M_node->_M_next); _M_erase(__position); return __ret; } template void list<_Tp, _Alloc>:: resize(size_type __new_size, value_type __x) { iterator __i = begin(); size_type __len = 0; for (; __i != end() && __len < __new_size; ++__i, ++__len) ; if (__len == __new_size) erase(__i, end()); else insert(end(), __new_size - __len, __x); } template list<_Tp, _Alloc>& list<_Tp, _Alloc>:: operator=(const list& __x) { if (this != &__x) { iterator __first1 = begin(); iterator __last1 = end(); const_iterator __first2 = __x.begin(); const_iterator __last2 = __x.end(); for (; __first1 != __last1 && __first2 != __last2; ++__first1, ++__first2) *__first1 = *__first2; if (__first2 == __last2) erase(__first1, __last1); else insert(__last1, __first2, __last2); } return *this; } template void list<_Tp, _Alloc>:: _M_fill_assign(size_type __n, const value_type& __val) { iterator __i = begin(); for (; __i != end() && __n > 0; ++__i, --__n) *__i = __val; if (__n > 0) insert(end(), __n, __val); else erase(__i, end()); } template template void list<_Tp, _Alloc>:: _M_assign_dispatch(_InputIterator __first2, _InputIterator __last2, __false_type) { iterator __first1 = begin(); iterator __last1 = end(); for (; __first1 != __last1 && __first2 != __last2; ++__first1, ++__first2) *__first1 = *__first2; if (__first2 == __last2) erase(__first1, __last1); else insert(__last1, __first2, __last2); } template void list<_Tp, _Alloc>:: remove(const value_type& __value) { iterator __first = begin(); iterator __last = end(); while (__first != __last) { iterator __next = __first; ++__next; if (*__first == __value) _M_erase(__first); __first = __next; } } template void list<_Tp, _Alloc>:: unique() { iterator __first = begin(); iterator __last = end(); if (__first == __last) return; iterator __next = __first; while (++__next != __last) { if (*__first == *__next) _M_erase(__next); else __first = __next; __next = __first; } } template void list<_Tp, _Alloc>:: merge(list& __x) { if (this != &__x) { _M_check_equal_allocators(__x); iterator __first1 = begin(); iterator __last1 = end(); iterator __first2 = __x.begin(); iterator __last2 = __x.end(); while (__first1 != __last1 && __first2 != __last2) if (*__first2 < *__first1) { iterator __next = __first2; _M_transfer(__first1, __first2, ++__next); __first2 = __next; } else ++__first1; if (__first2 != __last2) _M_transfer(__last1, __first2, __last2); } } template template void list<_Tp, _Alloc>:: merge(list& __x, _StrictWeakOrdering __comp) { if (this != &__x) { _M_check_equal_allocators(__x); iterator __first1 = begin(); iterator __last1 = end(); iterator __first2 = __x.begin(); iterator __last2 = __x.end(); while (__first1 != __last1 && __first2 != __last2) if (__comp(*__first2, *__first1)) { iterator __next = __first2; _M_transfer(__first1, __first2, ++__next); __first2 = __next; } else ++__first1; if (__first2 != __last2) _M_transfer(__last1, __first2, __last2); } } template void list<_Tp, _Alloc>:: sort() { if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node) { list __carry; list __tmp[64]; list * __fill = &__tmp[0]; list * __counter; do { __carry.splice(__carry.begin(), *this, begin()); for(__counter = &__tmp[0]; __counter != __fill && !__counter->empty(); ++__counter) { __counter->merge(__carry); __carry.swap(*__counter); } __carry.swap(*__counter); if (__counter == __fill) ++__fill; } while ( !empty() ); for (__counter = &__tmp[1]; __counter != __fill; ++__counter) __counter->merge(*(__counter - 1)); swap( *(__fill - 1) ); } } template template void list<_Tp, _Alloc>:: remove_if(_Predicate __pred) { iterator __first = begin(); iterator __last = end(); while (__first != __last) { iterator __next = __first; ++__next; if (__pred(*__first)) _M_erase(__first); __first = __next; } } template template void list<_Tp, _Alloc>:: unique(_BinaryPredicate __binary_pred) { iterator __first = begin(); iterator __last = end(); if (__first == __last) return; iterator __next = __first; while (++__next != __last) { if (__binary_pred(*__first, *__next)) _M_erase(__next); else __first = __next; __next = __first; } } template template void list<_Tp, _Alloc>:: sort(_StrictWeakOrdering __comp) { if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node) { list __carry; list __tmp[64]; list * __fill = &__tmp[0]; list * __counter; do { __carry.splice(__carry.begin(), *this, begin()); for(__counter = &__tmp[0]; __counter != __fill && !__counter->empty(); ++__counter) { __counter->merge(__carry, __comp); __carry.swap(*__counter); } __carry.swap(*__counter); if (__counter == __fill) ++__fill; } while ( !empty() ); for (__counter = &__tmp[1]; __counter != __fill; ++__counter) __counter->merge(*(__counter - 1), __comp); swap(*(__fill - 1)); } } } # 74 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/list" 2 3 # 50 "enblend.cc" 2 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/vector" 1 3 # 63 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/vector" 3 # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/vector" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 1 3 # 69 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template struct _Vector_base { typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; struct _Vector_impl : public _Tp_alloc_type { _Tp* _M_start; _Tp* _M_finish; _Tp* _M_end_of_storage; _Vector_impl(_Tp_alloc_type const& __a) : _Tp_alloc_type(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0) { } }; public: typedef _Alloc allocator_type; _Tp_alloc_type& _M_get_Tp_allocator() { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); } const _Tp_alloc_type& _M_get_Tp_allocator() const { return *static_cast(&this->_M_impl); } allocator_type get_allocator() const { return allocator_type(_M_get_Tp_allocator()); } _Vector_base(const allocator_type& __a) : _M_impl(__a) { } _Vector_base(size_t __n, const allocator_type& __a) : _M_impl(__a) { this->_M_impl._M_start = this->_M_allocate(__n); this->_M_impl._M_finish = this->_M_impl._M_start; this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; } ~_Vector_base() { _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); } public: _Vector_impl _M_impl; _Tp* _M_allocate(size_t __n) { return _M_impl.allocate(__n); } void _M_deallocate(_Tp* __p, size_t __n) { if (__p) _M_impl.deallocate(__p, __n); } }; # 158 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3 template > class vector : protected _Vector_base<_Tp, _Alloc> { typedef typename _Alloc::value_type _Alloc_value_type; typedef _Vector_base<_Tp, _Alloc> _Base; typedef vector<_Tp, _Alloc> vector_type; typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; public: typedef _Tp value_type; typedef typename _Tp_alloc_type::pointer pointer; typedef typename _Tp_alloc_type::const_pointer const_pointer; typedef typename _Tp_alloc_type::reference reference; typedef typename _Tp_alloc_type::const_reference const_reference; typedef __gnu_cxx::__normal_iterator iterator; typedef __gnu_cxx::__normal_iterator const_iterator; typedef std::reverse_iterator const_reverse_iterator; typedef std::reverse_iterator reverse_iterator; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Alloc allocator_type; protected: using _Base::_M_allocate; using _Base::_M_deallocate; using _Base::_M_impl; using _Base::_M_get_Tp_allocator; public: explicit vector(const allocator_type& __a = allocator_type()) : _Base(__a) { } # 209 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3 explicit vector(size_type __n, const value_type& __value = value_type(), const allocator_type& __a = allocator_type()) : _Base(__n, __a) { std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value, _M_get_Tp_allocator()); this->_M_impl._M_finish = this->_M_impl._M_start + __n; } # 228 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3 vector(const vector& __x) : _Base(__x.size(), __x._M_get_Tp_allocator()) { this->_M_impl._M_finish = std::__uninitialized_copy_a(__x.begin(), __x.end(), this->_M_impl._M_start, _M_get_Tp_allocator()); } # 251 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3 template vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) : _Base(__a) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_initialize_dispatch(__first, __last, _Integral()); } ~vector() { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); } # 279 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3 vector& operator=(const vector& __x); # 292 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3 void assign(size_type __n, const value_type& __val) { _M_fill_assign(__n, __val); } # 308 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3 template void assign(_InputIterator __first, _InputIterator __last) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_assign_dispatch(__first, __last, _Integral()); } using _Base::get_allocator; iterator begin() { return iterator(this->_M_impl._M_start); } const_iterator begin() const { return const_iterator(this->_M_impl._M_start); } iterator end() { return iterator(this->_M_impl._M_finish); } const_iterator end() const { return const_iterator(this->_M_impl._M_finish); } reverse_iterator rbegin() { return reverse_iterator(end()); } const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); } reverse_iterator rend() { return reverse_iterator(begin()); } const_reverse_iterator rend() const { return const_reverse_iterator(begin()); } size_type size() const { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); } size_type max_size() const { return _M_get_Tp_allocator().max_size(); } # 415 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3 void resize(size_type __new_size, value_type __x = value_type()) { if (__new_size < size()) _M_erase_at_end(this->_M_impl._M_start + __new_size); else insert(end(), __new_size - size(), __x); } size_type capacity() const { return size_type(this->_M_impl._M_end_of_storage - this->_M_impl._M_start); } bool empty() const { return begin() == end(); } # 458 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3 void reserve(size_type __n); # 473 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3 reference operator[](size_type __n) { return *(this->_M_impl._M_start + __n); } # 488 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3 const_reference operator[](size_type __n) const { return *(this->_M_impl._M_start + __n); } protected: void _M_range_check(size_type __n) const { if (__n >= this->size()) __throw_out_of_range(("vector::_M_range_check")); } public: # 513 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3 reference at(size_type __n) { _M_range_check(__n); return (*this)[__n]; } # 531 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3 const_reference at(size_type __n) const { _M_range_check(__n); return (*this)[__n]; } reference front() { return *begin(); } const_reference front() const { return *begin(); } reference back() { return *(end() - 1); } const_reference back() const { return *(end() - 1); } # 577 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3 pointer data() { return pointer(this->_M_impl._M_start); } const_pointer data() const { return const_pointer(this->_M_impl._M_start); } # 596 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3 void push_back(const value_type& __x) { if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) { this->_M_impl.construct(this->_M_impl._M_finish, __x); ++this->_M_impl._M_finish; } else _M_insert_aux(end(), __x); } # 617 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3 void pop_back() { --this->_M_impl._M_finish; this->_M_impl.destroy(this->_M_impl._M_finish); } # 635 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3 iterator insert(iterator __position, const value_type& __x); # 651 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3 void insert(iterator __position, size_type __n, const value_type& __x) { _M_fill_insert(__position, __n, __x); } # 669 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3 template void insert(iterator __position, _InputIterator __first, _InputIterator __last) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_insert_dispatch(__position, __first, __last, _Integral()); } # 694 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3 iterator erase(iterator __position); # 715 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3 iterator erase(iterator __first, iterator __last); # 727 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3 void swap(vector& __x) { std::swap(this->_M_impl._M_start, __x._M_impl._M_start); std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); std::swap(this->_M_impl._M_end_of_storage, __x._M_impl._M_end_of_storage); std::__alloc_swap<_Tp_alloc_type>::_S_do_it(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); } void clear() { _M_erase_at_end(this->_M_impl._M_start); } protected: template pointer _M_allocate_and_copy(size_type __n, _ForwardIterator __first, _ForwardIterator __last) { pointer __result = this->_M_allocate(__n); try { std::__uninitialized_copy_a(__first, __last, __result, _M_get_Tp_allocator()); return __result; } catch(...) { _M_deallocate(__result, __n); throw; } } template void _M_initialize_dispatch(_Integer __n, _Integer __value, __true_type) { this->_M_impl._M_start = _M_allocate(__n); this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value, _M_get_Tp_allocator()); this->_M_impl._M_finish = this->_M_impl._M_end_of_storage; } template void _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { typedef typename std::iterator_traits<_InputIterator>:: iterator_category _IterCategory; _M_range_initialize(__first, __last, _IterCategory()); } template void _M_range_initialize(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) { for (; __first != __last; ++__first) push_back(*__first); } template void _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { const size_type __n = std::distance(__first, __last); this->_M_impl._M_start = this->_M_allocate(__n); this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; this->_M_impl._M_finish = std::__uninitialized_copy_a(__first, __last, this->_M_impl._M_start, _M_get_Tp_allocator()); } template void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) { _M_fill_assign(static_cast(__n), static_cast(__val)); } template void _M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { typedef typename std::iterator_traits<_InputIterator>:: iterator_category _IterCategory; _M_assign_aux(__first, __last, _IterCategory()); } template void _M_assign_aux(_InputIterator __first, _InputIterator __last, std::input_iterator_tag); template void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); void _M_fill_assign(size_type __n, const value_type& __val); template void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, __true_type) { _M_fill_insert(__pos, static_cast(__n), static_cast(__val)); } template void _M_insert_dispatch(iterator __pos, _InputIterator __first, _InputIterator __last, __false_type) { typedef typename std::iterator_traits<_InputIterator>:: iterator_category _IterCategory; _M_range_insert(__pos, __first, __last, _IterCategory()); } template void _M_range_insert(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag); template void _M_range_insert(iterator __pos, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); void _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); void _M_insert_aux(iterator __position, const value_type& __x); void _M_erase_at_end(pointer __pos) { std::_Destroy(__pos, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish = __pos; } }; # 937 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3 template inline bool operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return (__x.size() == __y.size() && std::equal(__x.begin(), __x.end(), __y.begin())); } # 954 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_vector.h" 3 template inline bool operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return std::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); } template inline bool operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return !(__x == __y); } template inline bool operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return __y < __x; } template inline bool operator<=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return !(__y < __x); } template inline bool operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return !(__x < __y); } template inline void swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y) { __x.swap(__y); } } # 71 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/vector" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_bvector.h" 1 3 # 65 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_bvector.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { typedef unsigned long _Bit_type; enum { _S_word_bit = int(8 * sizeof(_Bit_type)) }; struct _Bit_reference { _Bit_type * _M_p; _Bit_type _M_mask; _Bit_reference(_Bit_type * __x, _Bit_type __y) : _M_p(__x), _M_mask(__y) { } _Bit_reference() : _M_p(0), _M_mask(0) { } operator bool() const { return !!(*_M_p & _M_mask); } _Bit_reference& operator=(bool __x) { if (__x) *_M_p |= _M_mask; else *_M_p &= ~_M_mask; return *this; } _Bit_reference& operator=(const _Bit_reference& __x) { return *this = bool(__x); } bool operator==(const _Bit_reference& __x) const { return bool(*this) == bool(__x); } bool operator<(const _Bit_reference& __x) const { return !bool(*this) && bool(__x); } void flip() { *_M_p ^= _M_mask; } }; struct _Bit_iterator_base : public std::iterator { _Bit_type * _M_p; unsigned int _M_offset; _Bit_iterator_base(_Bit_type * __x, unsigned int __y) : _M_p(__x), _M_offset(__y) { } void _M_bump_up() { if (_M_offset++ == int(_S_word_bit) - 1) { _M_offset = 0; ++_M_p; } } void _M_bump_down() { if (_M_offset-- == 0) { _M_offset = int(_S_word_bit) - 1; --_M_p; } } void _M_incr(ptrdiff_t __i) { difference_type __n = __i + _M_offset; _M_p += __n / int(_S_word_bit); __n = __n % int(_S_word_bit); if (__n < 0) { __n += int(_S_word_bit); --_M_p; } _M_offset = static_cast(__n); } bool operator==(const _Bit_iterator_base& __i) const { return _M_p == __i._M_p && _M_offset == __i._M_offset; } bool operator<(const _Bit_iterator_base& __i) const { return _M_p < __i._M_p || (_M_p == __i._M_p && _M_offset < __i._M_offset); } bool operator!=(const _Bit_iterator_base& __i) const { return !(*this == __i); } bool operator>(const _Bit_iterator_base& __i) const { return __i < *this; } bool operator<=(const _Bit_iterator_base& __i) const { return !(__i < *this); } bool operator>=(const _Bit_iterator_base& __i) const { return !(*this < __i); } }; inline ptrdiff_t operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) { return (int(_S_word_bit) * (__x._M_p - __y._M_p) + __x._M_offset - __y._M_offset); } struct _Bit_iterator : public _Bit_iterator_base { typedef _Bit_reference reference; typedef _Bit_reference* pointer; typedef _Bit_iterator iterator; _Bit_iterator() : _Bit_iterator_base(0, 0) { } _Bit_iterator(_Bit_type * __x, unsigned int __y) : _Bit_iterator_base(__x, __y) { } reference operator*() const { return reference(_M_p, 1UL << _M_offset); } iterator& operator++() { _M_bump_up(); return *this; } iterator operator++(int) { iterator __tmp = *this; _M_bump_up(); return __tmp; } iterator& operator--() { _M_bump_down(); return *this; } iterator operator--(int) { iterator __tmp = *this; _M_bump_down(); return __tmp; } iterator& operator+=(difference_type __i) { _M_incr(__i); return *this; } iterator& operator-=(difference_type __i) { *this += -__i; return *this; } iterator operator+(difference_type __i) const { iterator __tmp = *this; return __tmp += __i; } iterator operator-(difference_type __i) const { iterator __tmp = *this; return __tmp -= __i; } reference operator[](difference_type __i) const { return *(*this + __i); } }; inline _Bit_iterator operator+(ptrdiff_t __n, const _Bit_iterator& __x) { return __x + __n; } struct _Bit_const_iterator : public _Bit_iterator_base { typedef bool reference; typedef bool const_reference; typedef const bool* pointer; typedef _Bit_const_iterator const_iterator; _Bit_const_iterator() : _Bit_iterator_base(0, 0) { } _Bit_const_iterator(_Bit_type * __x, unsigned int __y) : _Bit_iterator_base(__x, __y) { } _Bit_const_iterator(const _Bit_iterator& __x) : _Bit_iterator_base(__x._M_p, __x._M_offset) { } const_reference operator*() const { return _Bit_reference(_M_p, 1UL << _M_offset); } const_iterator& operator++() { _M_bump_up(); return *this; } const_iterator operator++(int) { const_iterator __tmp = *this; _M_bump_up(); return __tmp; } const_iterator& operator--() { _M_bump_down(); return *this; } const_iterator operator--(int) { const_iterator __tmp = *this; _M_bump_down(); return __tmp; } const_iterator& operator+=(difference_type __i) { _M_incr(__i); return *this; } const_iterator& operator-=(difference_type __i) { *this += -__i; return *this; } const_iterator operator+(difference_type __i) const { const_iterator __tmp = *this; return __tmp += __i; } const_iterator operator-(difference_type __i) const { const_iterator __tmp = *this; return __tmp -= __i; } const_reference operator[](difference_type __i) const { return *(*this + __i); } }; inline _Bit_const_iterator operator+(ptrdiff_t __n, const _Bit_const_iterator& __x) { return __x + __n; } inline void __fill_bvector(_Bit_iterator __first, _Bit_iterator __last, bool __x) { for (; __first != __last; ++__first) *__first = __x; } inline void fill(_Bit_iterator __first, _Bit_iterator __last, const bool& __x) { if (__first._M_p != __last._M_p) { std::fill(__first._M_p + 1, __last._M_p, __x ? ~0 : 0); __fill_bvector(__first, _Bit_iterator(__first._M_p + 1, 0), __x); __fill_bvector(_Bit_iterator(__last._M_p, 0), __last, __x); } else __fill_bvector(__first, __last, __x); } template struct _Bvector_base { typedef typename _Alloc::template rebind<_Bit_type>::other _Bit_alloc_type; struct _Bvector_impl : public _Bit_alloc_type { _Bit_iterator _M_start; _Bit_iterator _M_finish; _Bit_type* _M_end_of_storage; _Bvector_impl(const _Bit_alloc_type& __a) : _Bit_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage(0) { } }; public: typedef _Alloc allocator_type; _Bit_alloc_type& _M_get_Bit_allocator() { return *static_cast<_Bit_alloc_type*>(&this->_M_impl); } const _Bit_alloc_type& _M_get_Bit_allocator() const { return *static_cast(&this->_M_impl); } allocator_type get_allocator() const { return allocator_type(_M_get_Bit_allocator()); } _Bvector_base(const allocator_type& __a) : _M_impl(__a) { } ~_Bvector_base() { this->_M_deallocate(); } protected: _Bvector_impl _M_impl; _Bit_type* _M_allocate(size_t __n) { return _M_impl.allocate((__n + int(_S_word_bit) - 1) / int(_S_word_bit)); } void _M_deallocate() { if (_M_impl._M_start._M_p) _M_impl.deallocate(_M_impl._M_start._M_p, _M_impl._M_end_of_storage - _M_impl._M_start._M_p); } }; } namespace std __attribute__ ((__visibility__ ("default"))) { # 455 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_bvector.h" 3 template class vector : protected _Bvector_base<_Alloc> { typedef _Bvector_base<_Alloc> _Base; public: typedef bool value_type; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Bit_reference reference; typedef bool const_reference; typedef _Bit_reference* pointer; typedef const bool* const_pointer; typedef _Bit_iterator iterator; typedef _Bit_const_iterator const_iterator; typedef std::reverse_iterator const_reverse_iterator; typedef std::reverse_iterator reverse_iterator; typedef _Alloc allocator_type; allocator_type get_allocator() const { return _Base::get_allocator(); } protected: using _Base::_M_allocate; using _Base::_M_deallocate; using _Base::_M_get_Bit_allocator; public: explicit vector(const allocator_type& __a = allocator_type()) : _Base(__a) { } explicit vector(size_type __n, const bool& __value = bool(), const allocator_type& __a = allocator_type()) : _Base(__a) { _M_initialize(__n); std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_of_storage, __value ? ~0 : 0); } vector(const vector& __x) : _Base(__x._M_get_Bit_allocator()) { _M_initialize(__x.size()); _M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start); } template vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) : _Base(__a) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_initialize_dispatch(__first, __last, _Integral()); } ~vector() { } vector& operator=(const vector& __x) { if (&__x == this) return *this; if (__x.size() > capacity()) { this->_M_deallocate(); _M_initialize(__x.size()); } this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(), begin()); return *this; } void assign(size_type __n, const bool& __x) { _M_fill_assign(__n, __x); } template void assign(_InputIterator __first, _InputIterator __last) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_assign_dispatch(__first, __last, _Integral()); } iterator begin() { return this->_M_impl._M_start; } const_iterator begin() const { return this->_M_impl._M_start; } iterator end() { return this->_M_impl._M_finish; } const_iterator end() const { return this->_M_impl._M_finish; } reverse_iterator rbegin() { return reverse_iterator(end()); } const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); } reverse_iterator rend() { return reverse_iterator(begin()); } const_reverse_iterator rend() const { return const_reverse_iterator(begin()); } size_type size() const { return size_type(end() - begin()); } size_type max_size() const { const size_type __asize = _M_get_Bit_allocator().max_size(); return (__asize <= size_type(-1) / int(_S_word_bit) ? __asize * int(_S_word_bit) : size_type(-1)); } size_type capacity() const { return size_type(const_iterator(this->_M_impl._M_end_of_storage, 0) - begin()); } bool empty() const { return begin() == end(); } reference operator[](size_type __n) { return *iterator(this->_M_impl._M_start._M_p + __n / int(_S_word_bit), __n % int(_S_word_bit)); } const_reference operator[](size_type __n) const { return *const_iterator(this->_M_impl._M_start._M_p + __n / int(_S_word_bit), __n % int(_S_word_bit)); } protected: void _M_range_check(size_type __n) const { if (__n >= this->size()) __throw_out_of_range(("vector::_M_range_check")); } public: reference at(size_type __n) { _M_range_check(__n); return (*this)[__n]; } const_reference at(size_type __n) const { _M_range_check(__n); return (*this)[__n]; } void reserve(size_type __n) { if (__n > this->max_size()) __throw_length_error(("vector::reserve")); if (this->capacity() < __n) { _Bit_type* __q = this->_M_allocate(__n); this->_M_impl._M_finish = _M_copy_aligned(begin(), end(), iterator(__q, 0)); this->_M_deallocate(); this->_M_impl._M_start = iterator(__q, 0); this->_M_impl._M_end_of_storage = (__q + (__n + int(_S_word_bit) - 1) / int(_S_word_bit)); } } reference front() { return *begin(); } const_reference front() const { return *begin(); } reference back() { return *(end() - 1); } const_reference back() const { return *(end() - 1); } void data() { } void push_back(bool __x) { if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage) *this->_M_impl._M_finish++ = __x; else _M_insert_aux(end(), __x); } void swap(vector& __x) { std::swap(this->_M_impl._M_start, __x._M_impl._M_start); std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); std::swap(this->_M_impl._M_end_of_storage, __x._M_impl._M_end_of_storage); std::__alloc_swap:: _S_do_it(_M_get_Bit_allocator(), __x._M_get_Bit_allocator()); } static void swap(reference __x, reference __y) { bool __tmp = __x; __x = __y; __y = __tmp; } iterator insert(iterator __position, const bool& __x = bool()) { const difference_type __n = __position - begin(); if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage && __position == end()) *this->_M_impl._M_finish++ = __x; else _M_insert_aux(__position, __x); return begin() + __n; } template void insert(iterator __position, _InputIterator __first, _InputIterator __last) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_insert_dispatch(__position, __first, __last, _Integral()); } void insert(iterator __position, size_type __n, const bool& __x) { _M_fill_insert(__position, __n, __x); } void pop_back() { --this->_M_impl._M_finish; } iterator erase(iterator __position) { if (__position + 1 != end()) std::copy(__position + 1, end(), __position); --this->_M_impl._M_finish; return __position; } iterator erase(iterator __first, iterator __last) { _M_erase_at_end(std::copy(__last, end(), __first)); return __first; } void resize(size_type __new_size, bool __x = bool()) { if (__new_size < size()) _M_erase_at_end(begin() + difference_type(__new_size)); else insert(end(), __new_size - size(), __x); } void flip() { for (_Bit_type * __p = this->_M_impl._M_start._M_p; __p != this->_M_impl._M_end_of_storage; ++__p) *__p = ~*__p; } void clear() { _M_erase_at_end(begin()); } protected: iterator _M_copy_aligned(const_iterator __first, const_iterator __last, iterator __result) { _Bit_type* __q = std::copy(__first._M_p, __last._M_p, __result._M_p); return std::copy(const_iterator(__last._M_p, 0), __last, iterator(__q, 0)); } void _M_initialize(size_type __n) { _Bit_type* __q = this->_M_allocate(__n); this->_M_impl._M_end_of_storage = (__q + ((__n + int(_S_word_bit) - 1) / int(_S_word_bit))); this->_M_impl._M_start = iterator(__q, 0); this->_M_impl._M_finish = this->_M_impl._M_start + difference_type(__n); } template void _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) { _M_initialize(__n); std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_of_storage, __x ? ~0 : 0); } template void _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { _M_initialize_range(__first, __last, std::__iterator_category(__first)); } template void _M_initialize_range(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) { for (; __first != __last; ++__first) push_back(*__first); } template void _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { const size_type __n = std::distance(__first, __last); _M_initialize(__n); std::copy(__first, __last, this->_M_impl._M_start); } template void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) { _M_fill_assign((size_t) __n, (bool) __val); } template void _M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } void _M_fill_assign(size_t __n, bool __x) { if (__n > size()) { std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_of_storage, __x ? ~0 : 0); insert(end(), __n - size(), __x); } else { _M_erase_at_end(begin() + __n); std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_of_storage, __x ? ~0 : 0); } } template void _M_assign_aux(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) { iterator __cur = begin(); for (; __first != __last && __cur != end(); ++__cur, ++__first) *__cur = *__first; if (__first == __last) _M_erase_at_end(__cur); else insert(end(), __first, __last); } template void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { const size_type __len = std::distance(__first, __last); if (__len < size()) _M_erase_at_end(std::copy(__first, __last, begin())); else { _ForwardIterator __mid = __first; std::advance(__mid, size()); std::copy(__first, __mid, begin()); insert(end(), __mid, __last); } } template void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, __true_type) { _M_fill_insert(__pos, __n, __x); } template void _M_insert_dispatch(iterator __pos, _InputIterator __first, _InputIterator __last, __false_type) { _M_insert_range(__pos, __first, __last, std::__iterator_category(__first)); } void _M_fill_insert(iterator __position, size_type __n, bool __x) { if (__n == 0) return; if (capacity() - size() >= __n) { std::copy_backward(__position, end(), this->_M_impl._M_finish + difference_type(__n)); std::fill(__position, __position + difference_type(__n), __x); this->_M_impl._M_finish += difference_type(__n); } else { const size_type __len = size() + std::max(size(), __n); _Bit_type * __q = this->_M_allocate(__len); iterator __i = _M_copy_aligned(begin(), __position, iterator(__q, 0)); std::fill(__i, __i + difference_type(__n), __x); this->_M_impl._M_finish = std::copy(__position, end(), __i + difference_type(__n)); this->_M_deallocate(); this->_M_impl._M_end_of_storage = (__q + ((__len + int(_S_word_bit) - 1) / int(_S_word_bit))); this->_M_impl._M_start = iterator(__q, 0); } } template void _M_insert_range(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag) { for (; __first != __last; ++__first) { __pos = insert(__pos, *__first); ++__pos; } } template void _M_insert_range(iterator __position, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { if (__first != __last) { size_type __n = std::distance(__first, __last); if (capacity() - size() >= __n) { std::copy_backward(__position, end(), this->_M_impl._M_finish + difference_type(__n)); std::copy(__first, __last, __position); this->_M_impl._M_finish += difference_type(__n); } else { const size_type __len = size() + std::max(size(), __n); _Bit_type * __q = this->_M_allocate(__len); iterator __i = _M_copy_aligned(begin(), __position, iterator(__q, 0)); __i = std::copy(__first, __last, __i); this->_M_impl._M_finish = std::copy(__position, end(), __i); this->_M_deallocate(); this->_M_impl._M_end_of_storage = (__q + ((__len + int(_S_word_bit) - 1) / int(_S_word_bit))); this->_M_impl._M_start = iterator(__q, 0); } } } void _M_insert_aux(iterator __position, bool __x) { if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage) { std::copy_backward(__position, this->_M_impl._M_finish, this->_M_impl._M_finish + 1); *__position = __x; ++this->_M_impl._M_finish; } else { const size_type __len = size() ? 2 * size() : static_cast(_S_word_bit); _Bit_type * __q = this->_M_allocate(__len); iterator __i = _M_copy_aligned(begin(), __position, iterator(__q, 0)); *__i++ = __x; this->_M_impl._M_finish = std::copy(__position, end(), __i); this->_M_deallocate(); this->_M_impl._M_end_of_storage = (__q + ((__len + int(_S_word_bit) - 1) / int(_S_word_bit))); this->_M_impl._M_start = iterator(__q, 0); } } void _M_erase_at_end(iterator __pos) { this->_M_impl._M_finish = __pos; } }; } # 72 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/vector" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/vector.tcc" 1 3 # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/vector.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template void vector<_Tp, _Alloc>:: reserve(size_type __n) { if (__n > this->max_size()) __throw_length_error(("vector::reserve")); if (this->capacity() < __n) { const size_type __old_size = size(); pointer __tmp = _M_allocate_and_copy(__n, this->_M_impl._M_start, this->_M_impl._M_finish); std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = __tmp; this->_M_impl._M_finish = __tmp + __old_size; this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; } } template typename vector<_Tp, _Alloc>::iterator vector<_Tp, _Alloc>:: insert(iterator __position, const value_type& __x) { const size_type __n = __position - begin(); if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage && __position == end()) { this->_M_impl.construct(this->_M_impl._M_finish, __x); ++this->_M_impl._M_finish; } else _M_insert_aux(__position, __x); return iterator(this->_M_impl._M_start + __n); } template typename vector<_Tp, _Alloc>::iterator vector<_Tp, _Alloc>:: erase(iterator __position) { if (__position + 1 != end()) std::copy(__position + 1, end(), __position); --this->_M_impl._M_finish; this->_M_impl.destroy(this->_M_impl._M_finish); return __position; } template typename vector<_Tp, _Alloc>::iterator vector<_Tp, _Alloc>:: erase(iterator __first, iterator __last) { if (__last != end()) std::copy(__last, end(), __first); _M_erase_at_end(__first.base() + (end() - __last)); return __first; } template vector<_Tp, _Alloc>& vector<_Tp, _Alloc>:: operator=(const vector<_Tp, _Alloc>& __x) { if (&__x != this) { const size_type __xlen = __x.size(); if (__xlen > capacity()) { pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(), __x.end()); std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = __tmp; this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen; } else if (size() >= __xlen) { std::_Destroy(std::copy(__x.begin(), __x.end(), begin()), end(), _M_get_Tp_allocator()); } else { std::copy(__x._M_impl._M_start, __x._M_impl._M_start + size(), this->_M_impl._M_start); std::__uninitialized_copy_a(__x._M_impl._M_start + size(), __x._M_impl._M_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); } this->_M_impl._M_finish = this->_M_impl._M_start + __xlen; } return *this; } template void vector<_Tp, _Alloc>:: _M_fill_assign(size_t __n, const value_type& __val) { if (__n > capacity()) { vector __tmp(__n, __val, _M_get_Tp_allocator()); __tmp.swap(*this); } else if (__n > size()) { std::fill(begin(), end(), __val); std::__uninitialized_fill_n_a(this->_M_impl._M_finish, __n - size(), __val, _M_get_Tp_allocator()); this->_M_impl._M_finish += __n - size(); } else _M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val)); } template template void vector<_Tp, _Alloc>:: _M_assign_aux(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) { pointer __cur(this->_M_impl._M_start); for (; __first != __last && __cur != this->_M_impl._M_finish; ++__cur, ++__first) *__cur = *__first; if (__first == __last) _M_erase_at_end(__cur); else insert(end(), __first, __last); } template template void vector<_Tp, _Alloc>:: _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { const size_type __len = std::distance(__first, __last); if (__len > capacity()) { pointer __tmp(_M_allocate_and_copy(__len, __first, __last)); std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = __tmp; this->_M_impl._M_finish = this->_M_impl._M_start + __len; this->_M_impl._M_end_of_storage = this->_M_impl._M_finish; } else if (size() >= __len) _M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start)); else { _ForwardIterator __mid = __first; std::advance(__mid, size()); std::copy(__first, __mid, this->_M_impl._M_start); this->_M_impl._M_finish = std::__uninitialized_copy_a(__mid, __last, this->_M_impl._M_finish, _M_get_Tp_allocator()); } } template void vector<_Tp, _Alloc>:: _M_insert_aux(iterator __position, const _Tp& __x) { if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) { this->_M_impl.construct(this->_M_impl._M_finish, *(this->_M_impl._M_finish - 1)); ++this->_M_impl._M_finish; _Tp __x_copy = __x; std::copy_backward(__position.base(), this->_M_impl._M_finish - 2, this->_M_impl._M_finish - 1); *__position = __x_copy; } else { const size_type __old_size = size(); if (__old_size == this->max_size()) __throw_length_error(("vector::_M_insert_aux")); size_type __len = __old_size != 0 ? 2 * __old_size : 1; if (__len < __old_size) __len = this->max_size(); pointer __new_start(this->_M_allocate(__len)); pointer __new_finish(__new_start); try { __new_finish = std::__uninitialized_copy_a(this->_M_impl._M_start, __position.base(), __new_start, _M_get_Tp_allocator()); this->_M_impl.construct(__new_finish, __x); ++__new_finish; __new_finish = std::__uninitialized_copy_a(__position.base(), this->_M_impl._M_finish, __new_finish, _M_get_Tp_allocator()); } catch(...) { std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); _M_deallocate(__new_start, __len); throw; } std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = __new_start; this->_M_impl._M_finish = __new_finish; this->_M_impl._M_end_of_storage = __new_start + __len; } } template void vector<_Tp, _Alloc>:: _M_fill_insert(iterator __position, size_type __n, const value_type& __x) { if (__n != 0) { if (size_type(this->_M_impl._M_end_of_storage - this->_M_impl._M_finish) >= __n) { value_type __x_copy = __x; const size_type __elems_after = end() - __position; pointer __old_finish(this->_M_impl._M_finish); if (__elems_after > __n) { std::__uninitialized_copy_a(this->_M_impl._M_finish - __n, this->_M_impl._M_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish += __n; std::copy_backward(__position.base(), __old_finish - __n, __old_finish); std::fill(__position.base(), __position.base() + __n, __x_copy); } else { std::__uninitialized_fill_n_a(this->_M_impl._M_finish, __n - __elems_after, __x_copy, _M_get_Tp_allocator()); this->_M_impl._M_finish += __n - __elems_after; std::__uninitialized_copy_a(__position.base(), __old_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish += __elems_after; std::fill(__position.base(), __old_finish, __x_copy); } } else { const size_type __old_size = size(); if (this->max_size() - __old_size < __n) __throw_length_error(("vector::_M_fill_insert")); size_type __len = __old_size + std::max(__old_size, __n); if (__len < __old_size) __len = this->max_size(); pointer __new_start(this->_M_allocate(__len)); pointer __new_finish(__new_start); try { __new_finish = std::__uninitialized_copy_a(this->_M_impl._M_start, __position.base(), __new_start, _M_get_Tp_allocator()); std::__uninitialized_fill_n_a(__new_finish, __n, __x, _M_get_Tp_allocator()); __new_finish += __n; __new_finish = std::__uninitialized_copy_a(__position.base(), this->_M_impl._M_finish, __new_finish, _M_get_Tp_allocator()); } catch(...) { std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); _M_deallocate(__new_start, __len); throw; } std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = __new_start; this->_M_impl._M_finish = __new_finish; this->_M_impl._M_end_of_storage = __new_start + __len; } } } template template void vector<_Tp, _Alloc>:: _M_range_insert(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag) { for (; __first != __last; ++__first) { __pos = insert(__pos, *__first); ++__pos; } } template template void vector<_Tp, _Alloc>:: _M_range_insert(iterator __position, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { if (__first != __last) { const size_type __n = std::distance(__first, __last); if (size_type(this->_M_impl._M_end_of_storage - this->_M_impl._M_finish) >= __n) { const size_type __elems_after = end() - __position; pointer __old_finish(this->_M_impl._M_finish); if (__elems_after > __n) { std::__uninitialized_copy_a(this->_M_impl._M_finish - __n, this->_M_impl._M_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish += __n; std::copy_backward(__position.base(), __old_finish - __n, __old_finish); std::copy(__first, __last, __position); } else { _ForwardIterator __mid = __first; std::advance(__mid, __elems_after); std::__uninitialized_copy_a(__mid, __last, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish += __n - __elems_after; std::__uninitialized_copy_a(__position.base(), __old_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish += __elems_after; std::copy(__first, __mid, __position); } } else { const size_type __old_size = size(); if (this->max_size() - __old_size < __n) __throw_length_error(("vector::_M_range_insert")); size_type __len = __old_size + std::max(__old_size, __n); if (__len < __old_size) __len = this->max_size(); pointer __new_start(this->_M_allocate(__len)); pointer __new_finish(__new_start); try { __new_finish = std::__uninitialized_copy_a(this->_M_impl._M_start, __position.base(), __new_start, _M_get_Tp_allocator()); __new_finish = std::__uninitialized_copy_a(__first, __last, __new_finish, _M_get_Tp_allocator()); __new_finish = std::__uninitialized_copy_a(__position.base(), this->_M_impl._M_finish, __new_finish, _M_get_Tp_allocator()); } catch(...) { std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); _M_deallocate(__new_start, __len); throw; } std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = __new_start; this->_M_impl._M_finish = __new_finish; this->_M_impl._M_end_of_storage = __new_start + __len; } } } } # 75 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/vector" 2 3 # 51 "enblend.cc" 2 # 1 "/usr/include/getopt.h" 1 3 4 # 50 "/usr/include/getopt.h" 3 4 extern "C" { # 59 "/usr/include/getopt.h" 3 4 extern char *optarg; # 73 "/usr/include/getopt.h" 3 4 extern int optind; extern int opterr; extern int optopt; # 106 "/usr/include/getopt.h" 3 4 struct option { const char *name; int has_arg; int *flag; int val; }; # 152 "/usr/include/getopt.h" 3 4 extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) throw (); extern int getopt_long (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) throw (); extern int getopt_long_only (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) throw (); } # 54 "enblend.cc" 2 extern "C" char *optarg; extern "C" int optind; # 1 "/usr/include/fenv.h" 1 3 4 # 58 "/usr/include/fenv.h" 3 4 # 1 "/usr/include/bits/fenv.h" 1 3 4 # 26 "/usr/include/bits/fenv.h" 3 4 enum { FE_INEXACT = 1 << (31 - 6), FE_DIVBYZERO = 1 << (31 - 5), FE_UNDERFLOW = 1 << (31 - 4), FE_OVERFLOW = 1 << (31 - 3), # 43 "/usr/include/bits/fenv.h" 3 4 FE_INVALID = 1 << (31 - 2), # 54 "/usr/include/bits/fenv.h" 3 4 FE_INVALID_SNAN = 1 << (31 - 7), FE_INVALID_ISI = 1 << (31 - 8), FE_INVALID_IDI = 1 << (31 - 9), FE_INVALID_ZDZ = 1 << (31 - 10), FE_INVALID_IMZ = 1 << (31 - 11), FE_INVALID_COMPARE = 1 << (31 - 12), FE_INVALID_SOFTWARE = 1 << (31 - 21), FE_INVALID_SQRT = 1 << (31 - 22), FE_INVALID_INTEGER_CONVERSION = 1 << (31 - 23) }; enum { FE_TONEAREST = 0, FE_TOWARDZERO = 1, FE_UPWARD = 2, FE_DOWNWARD = 3 }; typedef unsigned int fexcept_t; typedef double fenv_t; extern const fenv_t __fe_dfl_env; extern const fenv_t __fe_enabled_env; extern const fenv_t __fe_nonieee_env; # 145 "/usr/include/bits/fenv.h" 3 4 extern const fenv_t *__fe_nomask_env (void); extern const fenv_t *__fe_mask_env (void); # 59 "/usr/include/fenv.h" 2 3 4 extern "C" { extern int feclearexcept (int __excepts) throw (); extern int fegetexceptflag (fexcept_t *__flagp, int __excepts) throw (); extern int feraiseexcept (int __excepts) throw (); extern int fesetexceptflag (__const fexcept_t *__flagp, int __excepts) throw (); extern int fetestexcept (int __excepts) throw (); extern int fegetround (void) throw (); extern int fesetround (int __rounding_direction) throw (); extern int fegetenv (fenv_t *__envp) throw (); extern int feholdexcept (fenv_t *__envp) throw (); extern int fesetenv (__const fenv_t *__envp) throw (); extern int feupdateenv (__const fenv_t *__envp) throw (); # 1 "/usr/include/bits/fenvinline.h" 1 3 4 # 116 "/usr/include/fenv.h" 2 3 4 extern int feenableexcept (int __excepts) throw (); extern int fedisableexcept (int __excepts) throw (); extern int fegetexcept (void) throw (); } # 66 "enblend.cc" 2 # 1 "/usr/include/signal.h" 1 3 4 # 31 "/usr/include/signal.h" 3 4 extern "C" { # 1 "/usr/include/bits/sigset.h" 1 3 4 # 104 "/usr/include/bits/sigset.h" 3 4 extern int __sigismember (__const __sigset_t *, int); extern int __sigaddset (__sigset_t *, int); extern int __sigdelset (__sigset_t *, int); # 118 "/usr/include/bits/sigset.h" 3 4 extern __inline int __sigismember (__const __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return (__set->__val[__word] & __mask) ? 1 : 0; } extern __inline int __sigaddset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] |= __mask), 0); } extern __inline int __sigdelset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] &= ~__mask), 0); } # 34 "/usr/include/signal.h" 2 3 4 typedef __sig_atomic_t sig_atomic_t; # 58 "/usr/include/signal.h" 3 4 # 1 "/usr/include/bits/signum.h" 1 3 4 # 59 "/usr/include/signal.h" 2 3 4 # 75 "/usr/include/signal.h" 3 4 typedef void (*__sighandler_t) (int); extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) throw (); extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler) throw (); extern __sighandler_t signal (int __sig, __sighandler_t __handler) throw (); # 104 "/usr/include/signal.h" 3 4 extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler) throw (); extern int kill (__pid_t __pid, int __sig) throw (); extern int killpg (__pid_t __pgrp, int __sig) throw (); extern int raise (int __sig) throw (); extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) throw (); extern int gsignal (int __sig) throw (); extern void psignal (int __sig, __const char *__s); # 153 "/usr/include/signal.h" 3 4 extern int __sigpause (int __sig_or_mask, int __is_sig); # 162 "/usr/include/signal.h" 3 4 extern int sigpause (int __sig) __asm__ ("__xpg_sigpause"); # 181 "/usr/include/signal.h" 3 4 extern int sigblock (int __mask) throw () __attribute__ ((__deprecated__)); extern int sigsetmask (int __mask) throw () __attribute__ ((__deprecated__)); extern int siggetmask (void) throw () __attribute__ ((__deprecated__)); # 196 "/usr/include/signal.h" 3 4 typedef __sighandler_t sighandler_t; typedef __sighandler_t sig_t; # 212 "/usr/include/signal.h" 3 4 # 1 "/usr/include/bits/siginfo.h" 1 3 4 # 25 "/usr/include/bits/siginfo.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 26 "/usr/include/bits/siginfo.h" 2 3 4 typedef union sigval { int sival_int; void *sival_ptr; } sigval_t; # 51 "/usr/include/bits/siginfo.h" 3 4 typedef struct siginfo { int si_signo; int si_errno; int si_code; union { int _pad[((128 / sizeof (int)) - 3)]; struct { __pid_t si_pid; __uid_t si_uid; } _kill; struct { int si_tid; int si_overrun; sigval_t si_sigval; } _timer; struct { __pid_t si_pid; __uid_t si_uid; sigval_t si_sigval; } _rt; struct { __pid_t si_pid; __uid_t si_uid; int si_status; __clock_t si_utime; __clock_t si_stime; } _sigchld; struct { void *si_addr; } _sigfault; struct { long int si_band; int si_fd; } _sigpoll; } _sifields; } siginfo_t; # 129 "/usr/include/bits/siginfo.h" 3 4 enum { SI_ASYNCNL = -60, SI_TKILL = -6, SI_SIGIO, SI_ASYNCIO, SI_MESGQ, SI_TIMER, SI_QUEUE, SI_USER, SI_KERNEL = 0x80 }; enum { ILL_ILLOPC = 1, ILL_ILLOPN, ILL_ILLADR, ILL_ILLTRP, ILL_PRVOPC, ILL_PRVREG, ILL_COPROC, ILL_BADSTK }; enum { FPE_INTDIV = 1, FPE_INTOVF, FPE_FLTDIV, FPE_FLTOVF, FPE_FLTUND, FPE_FLTRES, FPE_FLTINV, FPE_FLTSUB }; enum { SEGV_MAPERR = 1, SEGV_ACCERR }; enum { BUS_ADRALN = 1, BUS_ADRERR, BUS_OBJERR }; enum { TRAP_BRKPT = 1, TRAP_TRACE }; enum { CLD_EXITED = 1, CLD_KILLED, CLD_DUMPED, CLD_TRAPPED, CLD_STOPPED, CLD_CONTINUED }; enum { POLL_IN = 1, POLL_OUT, POLL_MSG, POLL_ERR, POLL_PRI, POLL_HUP }; # 273 "/usr/include/bits/siginfo.h" 3 4 typedef struct sigevent { sigval_t sigev_value; int sigev_signo; int sigev_notify; union { int _pad[((64 / sizeof (int)) - 3)]; __pid_t _tid; struct { void (*_function) (sigval_t); void *_attribute; } _sigev_thread; } _sigev_un; } sigevent_t; enum { SIGEV_SIGNAL = 0, SIGEV_NONE, SIGEV_THREAD, SIGEV_THREAD_ID = 4 }; # 213 "/usr/include/signal.h" 2 3 4 extern int sigemptyset (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); extern int sigfillset (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); extern int sigaddset (sigset_t *__set, int __signo) throw () __attribute__ ((__nonnull__ (1))); extern int sigdelset (sigset_t *__set, int __signo) throw () __attribute__ ((__nonnull__ (1))); extern int sigismember (__const sigset_t *__set, int __signo) throw () __attribute__ ((__nonnull__ (1))); extern int sigisemptyset (__const sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); extern int sigandset (sigset_t *__set, __const sigset_t *__left, __const sigset_t *__right) throw () __attribute__ ((__nonnull__ (1, 2, 3))); extern int sigorset (sigset_t *__set, __const sigset_t *__left, __const sigset_t *__right) throw () __attribute__ ((__nonnull__ (1, 2, 3))); # 1 "/usr/include/bits/sigaction.h" 1 3 4 # 25 "/usr/include/bits/sigaction.h" 3 4 struct sigaction { union { __sighandler_t sa_handler; void (*sa_sigaction) (int, siginfo_t *, void *); } __sigaction_handler; __sigset_t sa_mask; int sa_flags; void (*sa_restorer) (void); }; # 247 "/usr/include/signal.h" 2 3 4 extern int sigprocmask (int __how, __const sigset_t *__restrict __set, sigset_t *__restrict __oset) throw (); extern int sigsuspend (__const sigset_t *__set) __attribute__ ((__nonnull__ (1))); extern int sigaction (int __sig, __const struct sigaction *__restrict __act, struct sigaction *__restrict __oact) throw (); extern int sigpending (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig) __attribute__ ((__nonnull__ (1, 2))); extern int sigwaitinfo (__const sigset_t *__restrict __set, siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1))); extern int sigtimedwait (__const sigset_t *__restrict __set, siginfo_t *__restrict __info, __const struct timespec *__restrict __timeout) __attribute__ ((__nonnull__ (1))); extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val) throw (); # 304 "/usr/include/signal.h" 3 4 extern __const char *__const _sys_siglist[65]; extern __const char *__const sys_siglist[65]; struct sigvec { __sighandler_t sv_handler; int sv_mask; int sv_flags; }; # 328 "/usr/include/signal.h" 3 4 extern int sigvec (int __sig, __const struct sigvec *__vec, struct sigvec *__ovec) throw (); # 1 "/usr/include/bits/sigcontext.h" 1 3 4 # 28 "/usr/include/bits/sigcontext.h" 3 4 # 1 "/usr/include/asm/sigcontext.h" 1 3 4 # 10 "/usr/include/asm/sigcontext.h" 3 4 # 1 "/usr/include/asm/ptrace.h" 1 3 4 # 29 "/usr/include/asm/ptrace.h" 3 4 struct pt_regs { unsigned long gpr[32]; unsigned long nip; unsigned long msr; unsigned long orig_gpr3; unsigned long ctr; unsigned long link; unsigned long xer; unsigned long ccr; unsigned long mq; unsigned long trap; unsigned long dar; unsigned long dsisr; unsigned long result; }; # 11 "/usr/include/asm/sigcontext.h" 2 3 4 struct sigcontext { unsigned long _unused[4]; int signal; unsigned long handler; unsigned long oldmask; struct pt_regs *regs; # 49 "/usr/include/asm/sigcontext.h" 3 4 }; # 29 "/usr/include/bits/sigcontext.h" 2 3 4 # 334 "/usr/include/signal.h" 2 3 4 extern int sigreturn (struct sigcontext *__scp) throw (); # 346 "/usr/include/signal.h" 3 4 extern int siginterrupt (int __sig, int __interrupt) throw (); # 1 "/usr/include/bits/sigstack.h" 1 3 4 # 26 "/usr/include/bits/sigstack.h" 3 4 struct sigstack { void *ss_sp; int ss_onstack; }; enum { SS_ONSTACK = 1, SS_DISABLE }; # 50 "/usr/include/bits/sigstack.h" 3 4 typedef struct sigaltstack { void *ss_sp; int ss_flags; size_t ss_size; } stack_t; # 349 "/usr/include/signal.h" 2 3 4 # 1 "/usr/include/sys/ucontext.h" 1 3 4 # 27 "/usr/include/sys/ucontext.h" 3 4 # 1 "/usr/include/bits/sigcontext.h" 1 3 4 # 28 "/usr/include/sys/ucontext.h" 2 3 4 typedef unsigned long gregset_t[48]; typedef struct _libc_fpstate { double fpregs[32]; double fpscr; unsigned int _pad[2]; } fpregset_t; typedef struct _libc_vrstate { unsigned int vrregs[32][4]; unsigned int vrsave; unsigned int _pad[2]; unsigned int vscr; } vrregset_t; typedef struct { gregset_t gregs; fpregset_t fpregs; vrregset_t vrregs __attribute__((__aligned__(16))); } mcontext_t; # 135 "/usr/include/sys/ucontext.h" 3 4 typedef struct ucontext { unsigned long int uc_flags; struct ucontext *uc_link; stack_t uc_stack; # 164 "/usr/include/sys/ucontext.h" 3 4 int uc_pad[7]; union uc_regs_ptr { struct pt_regs *regs; mcontext_t *uc_regs; } uc_mcontext; sigset_t uc_sigmask; char uc_reg_space[sizeof(mcontext_t) + 12]; } ucontext_t; # 352 "/usr/include/signal.h" 2 3 4 extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) throw () __attribute__ ((__deprecated__)); extern int sigaltstack (__const struct sigaltstack *__restrict __ss, struct sigaltstack *__restrict __oss) throw (); extern int sighold (int __sig) throw (); extern int sigrelse (int __sig) throw (); extern int sigignore (int __sig) throw (); extern __sighandler_t sigset (int __sig, __sighandler_t __disp) throw (); # 1 "/usr/include/bits/sigthread.h" 1 3 4 # 31 "/usr/include/bits/sigthread.h" 3 4 extern int pthread_sigmask (int __how, __const __sigset_t *__restrict __newmask, __sigset_t *__restrict __oldmask)throw (); extern int pthread_kill (pthread_t __threadid, int __signo) throw (); # 388 "/usr/include/signal.h" 2 3 4 extern int __libc_current_sigrtmin (void) throw (); extern int __libc_current_sigrtmax (void) throw (); } # 69 "enblend.cc" 2 # 1 "/usr/include/tiffconf.h" 1 3 4 # 72 "enblend.cc" 2 # 1 "/usr/include/boost/random/mersenne_twister.hpp" 1 3 4 # 21 "/usr/include/boost/random/mersenne_twister.hpp" 3 4 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/stdexcept" 1 3 4 # 41 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/stdexcept" 3 4 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/stdexcept" 3 namespace std __attribute__ ((__visibility__ ("default"))) { class logic_error : public exception { string _M_msg; public: explicit logic_error(const string& __arg); virtual ~logic_error() throw(); virtual const char* what() const throw(); }; class domain_error : public logic_error { public: explicit domain_error(const string& __arg); }; class invalid_argument : public logic_error { public: explicit invalid_argument(const string& __arg); }; class length_error : public logic_error { public: explicit length_error(const string& __arg); }; class out_of_range : public logic_error { public: explicit out_of_range(const string& __arg); }; class runtime_error : public exception { string _M_msg; public: explicit runtime_error(const string& __arg); virtual ~runtime_error() throw(); virtual const char* what() const throw(); }; class range_error : public runtime_error { public: explicit range_error(const string& __arg); }; class overflow_error : public runtime_error { public: explicit overflow_error(const string& __arg); }; class underflow_error : public runtime_error { public: explicit underflow_error(const string& __arg); }; } # 22 "/usr/include/boost/random/mersenne_twister.hpp" 2 3 4 # 1 "/usr/include/boost/config.hpp" 1 3 4 # 26 "/usr/include/boost/config.hpp" 3 4 # 1 "/usr/include/boost/config/user.hpp" 1 3 4 # 27 "/usr/include/boost/config.hpp" 2 3 4 # 1 "/usr/include/boost/config/select_compiler_config.hpp" 1 3 4 # 32 "/usr/include/boost/config.hpp" 2 3 4 # 1 "/usr/include/boost/config/compiler/gcc.hpp" 1 3 4 # 36 "/usr/include/boost/config.hpp" 2 3 4 # 1 "/usr/include/boost/config/select_stdlib_config.hpp" 1 3 4 # 20 "/usr/include/boost/config/select_stdlib_config.hpp" 3 4 # 1 "/usr/include/boost/config/no_tr1/utility.hpp" 1 3 4 # 21 "/usr/include/boost/config/select_stdlib_config.hpp" 2 3 4 # 41 "/usr/include/boost/config.hpp" 2 3 4 # 1 "/usr/include/boost/config/stdlib/libstdcpp3.hpp" 1 3 4 # 45 "/usr/include/boost/config.hpp" 2 3 4 # 1 "/usr/include/boost/config/select_platform_config.hpp" 1 3 4 # 50 "/usr/include/boost/config.hpp" 2 3 4 # 1 "/usr/include/boost/config/platform/linux.hpp" 1 3 4 # 70 "/usr/include/boost/config/platform/linux.hpp" 3 4 # 1 "/usr/include/boost/config/posix_features.hpp" 1 3 4 # 71 "/usr/include/boost/config/platform/linux.hpp" 2 3 4 # 54 "/usr/include/boost/config.hpp" 2 3 4 # 1 "/usr/include/boost/config/suffix.hpp" 1 3 4 # 433 "/usr/include/boost/config/suffix.hpp" 3 4 namespace boost{ __extension__ typedef long long long_long_type; __extension__ typedef unsigned long long ulong_long_type; } # 58 "/usr/include/boost/config.hpp" 2 3 4 # 23 "/usr/include/boost/random/mersenne_twister.hpp" 2 3 4 # 1 "/usr/include/boost/limits.hpp" 1 3 4 # 24 "/usr/include/boost/random/mersenne_twister.hpp" 2 3 4 # 1 "/usr/include/boost/static_assert.hpp" 1 3 4 # 18 "/usr/include/boost/static_assert.hpp" 3 4 # 1 "/usr/include/boost/detail/workaround.hpp" 1 3 4 # 19 "/usr/include/boost/static_assert.hpp" 2 3 4 # 31 "/usr/include/boost/static_assert.hpp" 3 4 namespace boost{ template struct STATIC_ASSERTION_FAILURE; template <> struct STATIC_ASSERTION_FAILURE { enum { value = 1 }; }; template struct static_assert_test{}; } # 25 "/usr/include/boost/random/mersenne_twister.hpp" 2 3 4 # 1 "/usr/include/boost/integer_traits.hpp" 1 3 4 # 23 "/usr/include/boost/integer_traits.hpp" 3 4 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/limits.h" 1 3 4 # 24 "/usr/include/boost/integer_traits.hpp" 2 3 4 namespace boost { template class integer_traits : public std::numeric_limits { public: static const bool is_integral = false; }; namespace detail { template class integer_traits_base { public: static const bool is_integral = true; static const T const_min = min_val; static const T const_max = max_val; }; template const bool integer_traits_base::is_integral; template const T integer_traits_base::const_min; template const T integer_traits_base::const_max; } template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base # 119 "/usr/include/boost/integer_traits.hpp" 3 4 { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits< ::boost::long_long_type> : public std::numeric_limits< ::boost::long_long_type>, public detail::integer_traits_base< ::boost::long_long_type, (-9223372036854775807LL -1), 9223372036854775807LL> { }; template<> class integer_traits< ::boost::ulong_long_type> : public std::numeric_limits< ::boost::ulong_long_type>, public detail::integer_traits_base< ::boost::ulong_long_type, 0, (9223372036854775807LL * 2ULL + 1)> { }; # 231 "/usr/include/boost/integer_traits.hpp" 3 4 } # 26 "/usr/include/boost/random/mersenne_twister.hpp" 2 3 4 # 1 "/usr/include/boost/cstdint.hpp" 1 3 4 # 85 "/usr/include/boost/cstdint.hpp" 3 4 namespace boost { using ::int8_t; using ::int_least8_t; using ::int_fast8_t; using ::uint8_t; using ::uint_least8_t; using ::uint_fast8_t; using ::int16_t; using ::int_least16_t; using ::int_fast16_t; using ::uint16_t; using ::uint_least16_t; using ::uint_fast16_t; using ::int32_t; using ::int_least32_t; using ::int_fast32_t; using ::uint32_t; using ::uint_least32_t; using ::uint_fast32_t; using ::int64_t; using ::int_least64_t; using ::int_fast64_t; using ::uint64_t; using ::uint_least64_t; using ::uint_fast64_t; using ::intmax_t; using ::uintmax_t; } # 27 "/usr/include/boost/random/mersenne_twister.hpp" 2 3 4 # 1 "/usr/include/boost/random/linear_congruential.hpp" 1 3 4 # 20 "/usr/include/boost/random/linear_congruential.hpp" 3 4 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cassert" 1 3 4 # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cassert" 3 4 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cassert" 2 3 # 21 "/usr/include/boost/random/linear_congruential.hpp" 2 3 4 # 1 "/usr/include/boost/random/detail/const_mod.hpp" 1 3 4 # 19 "/usr/include/boost/random/detail/const_mod.hpp" 3 4 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cassert" 1 3 4 # 47 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cassert" 3 4 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cassert" 2 3 # 20 "/usr/include/boost/random/detail/const_mod.hpp" 2 3 4 # 1 "/usr/include/boost/cstdint.hpp" 1 3 4 # 22 "/usr/include/boost/random/detail/const_mod.hpp" 2 3 4 namespace boost { namespace random { namespace detail { template struct do_add { }; template<> struct do_add { template static IntType add(IntType m, IntType x, IntType c) { x += (c-m); if(x < 0) x += m; return x; } }; template<> struct do_add { template static IntType add(IntType, IntType, IntType) { (static_cast (0)); return 0; } }; } template class const_mod { public: static IntType add(IntType x, IntType c) { if(c == 0) return x; else if(c <= traits::const_max - m) return add_small(x, c); else return detail::do_add::add(m, x, c); } static IntType mult(IntType a, IntType x) { if(a == 1) return x; else if(m <= traits::const_max/a) return mult_small(a, x); else if(traits::is_signed && (m%a < m/a)) return mult_schrage(a, x); else { (static_cast (0)); return 0; } } static IntType mult_add(IntType a, IntType x, IntType c) { if(m <= (traits::const_max-c)/a) return (a*x+c) % m; else return add(mult(a, x), c); } static IntType invert(IntType x) { return x == 0 ? 0 : invert_euclidian(x); } private: typedef integer_traits traits; const_mod(); static IntType add_small(IntType x, IntType c) { x += c; if(x >= m) x -= m; return x; } static IntType mult_small(IntType a, IntType x) { return a*x % m; } static IntType mult_schrage(IntType a, IntType value) { const IntType q = m / a; const IntType r = m % a; (static_cast (0)); value = a*(value%q) - r*(value/q); for(;;) { if (value > 0) break; value += m; } return value; } static IntType invert_euclidian(IntType c) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( m > 0 ) >)> boost_static_assert_typedef_148; typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( boost::integer_traits::is_signed ) >)> boost_static_assert_typedef_152; (static_cast (0)); IntType l1 = 0; IntType l2 = 1; IntType n = c; IntType p = m; for(;;) { IntType q = p / n; l1 -= q * l2; p -= q * n; if(p == 0) return (l2 < 1 ? l2 + m : l2); IntType q2 = n / p; l2 -= q2 * l1; n -= q2 * p; if(n == 0) return (l1 < 1 ? l1 + m : l1); } } }; template<> class const_mod { typedef unsigned int IntType; public: static IntType add(IntType x, IntType c) { return x+c; } static IntType mult(IntType a, IntType x) { return a*x; } static IntType mult_add(IntType a, IntType x, IntType c) { return a*x+c; } private: const_mod(); }; template<> class const_mod { typedef unsigned long IntType; public: static IntType add(IntType x, IntType c) { return x+c; } static IntType mult(IntType a, IntType x) { return a*x; } static IntType mult_add(IntType a, IntType x, IntType c) { return a*x+c; } private: const_mod(); }; template<> class const_mod { typedef uint64_t IntType; public: static IntType add(IntType x, IntType c) { return c == 0 ? x : mod(x+c); } static IntType mult(IntType a, IntType x) { return mod(a*x); } static IntType mult_add(IntType a, IntType x, IntType c) { return mod(a*x+c); } static IntType mod(IntType x) { return x &= ((uint64_t(1) << 48)-1); } private: const_mod(); }; # 356 "/usr/include/boost/random/detail/const_mod.hpp" 3 4 } } # 26 "/usr/include/boost/random/linear_congruential.hpp" 2 3 4 namespace boost { namespace random { template class linear_congruential { public: typedef IntType result_type; static const bool has_fixed_range = true; static const result_type min_value = ( c == 0 ? 1 : 0 ); static const result_type max_value = m-1; static const IntType multiplier = a; static const IntType increment = c; static const IntType modulus = m; explicit linear_congruential(IntType x0 = 1) : _modulus(modulus), _x(_modulus ? (x0 % _modulus) : x0) { (static_cast (0)); typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( std::numeric_limits::is_integer ) >)> boost_static_assert_typedef_63; } template linear_congruential(It& first, It last) { seed(first, last); } void seed(IntType x0 = 1) { (static_cast (0)); _x = (_modulus ? (x0 % _modulus) : x0); } template void seed(It& first, It last) { if(first == last) throw std::invalid_argument("linear_congruential::seed"); IntType value = *first++; _x = (_modulus ? (value % _modulus) : value); } result_type min () const { return c == 0 ? 1 : 0; } result_type max () const { return modulus-1; } IntType operator()() { _x = const_mod::mult_add(a, _x, c); return _x; } static bool validation(IntType x) { return val == x; } # 106 "/usr/include/boost/random/linear_congruential.hpp" 3 4 friend bool operator==(const linear_congruential& x, const linear_congruential& y) { return x._x == y._x; } friend bool operator!=(const linear_congruential& x, const linear_congruential& y) { return !(x == y); } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const linear_congruential& lcg) { return os << lcg._x; } template friend std::basic_istream& operator>>(std::basic_istream& is, linear_congruential& lcg) { return is >> lcg._x; } private: IntType _modulus; IntType _x; }; # 175 "/usr/include/boost/random/linear_congruential.hpp" 3 4 template const bool linear_congruential::has_fixed_range; template const typename linear_congruential::result_type linear_congruential::min_value; template const typename linear_congruential::result_type linear_congruential::max_value; template const IntType linear_congruential::modulus; } typedef random::linear_congruential minstd_rand0; typedef random::linear_congruential minstd_rand; class rand48 { public: typedef int32_t result_type; static const bool has_fixed_range = true; static const int32_t min_value = 0; static const int32_t max_value = integer_traits::const_max; int32_t min () const { return 0; } int32_t max () const { return std::numeric_limits::max (); } explicit rand48(int32_t x0 = 1) : lcf(cnv(x0)) { } explicit rand48(uint64_t x0) : lcf(x0) { } template rand48(It& first, It last) : lcf(first, last) { } void seed(int32_t x0 = 1) { lcf.seed(cnv(x0)); } void seed(uint64_t x0) { lcf.seed(x0); } template void seed(It& first, It last) { lcf.seed(first,last); } int32_t operator()() { return static_cast(lcf() >> 17); } static bool validation(int32_t x) { return x == 1993516219; } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const rand48& r) { os << r.lcf; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, rand48& r) { is >> r.lcf; return is; } friend bool operator==(const rand48& x, const rand48& y) { return x.lcf == y.lcf; } friend bool operator!=(const rand48& x, const rand48& y) { return !(x == y); } private: random::linear_congruential lcf; static uint64_t cnv(int32_t x) { return (static_cast(x) << 16) | 0x330e; } }; } # 28 "/usr/include/boost/random/mersenne_twister.hpp" 2 3 4 # 1 "/usr/include/boost/random/detail/ptr_helper.hpp" 1 3 4 # 20 "/usr/include/boost/random/detail/ptr_helper.hpp" 3 4 namespace boost { namespace random { namespace detail { template struct ptr_helper { typedef T value_type; typedef T& reference_type; typedef const T& rvalue_type; static reference_type ref(T& r) { return r; } static const T& ref(const T& r) { return r; } }; template struct ptr_helper { typedef T value_type; typedef T& reference_type; typedef T& rvalue_type; static reference_type ref(T& r) { return r; } static const T& ref(const T& r) { return r; } }; template struct ptr_helper { typedef T value_type; typedef T& reference_type; typedef T* rvalue_type; static reference_type ref(T * p) { return *p; } static const T& ref(const T * p) { return *p; } }; } } } # 30 "/usr/include/boost/random/mersenne_twister.hpp" 2 3 4 namespace boost { namespace random { template class mersenne_twister { public: typedef UIntType result_type; static const int word_size = w; static const int state_size = n; static const int shift_size = m; static const int mask_bits = r; static const UIntType parameter_a = a; static const int output_u = u; static const int output_s = s; static const UIntType output_b = b; static const int output_t = t; static const UIntType output_c = c; static const int output_l = l; static const bool has_fixed_range = false; mersenne_twister() { seed(); } explicit mersenne_twister(UIntType value) { seed(value); } template mersenne_twister(It& first, It last) { seed(first,last); } template explicit mersenne_twister(Generator & gen) { seed(gen); } void seed() { seed(UIntType(5489)); } void seed(UIntType value) { const UIntType mask = ~0u; x[0] = value & mask; for (i = 1; i < n; i++) { x[i] = (1812433253UL * (x[i-1] ^ (x[i-1] >> (w-2))) + i) & mask; } } template void seed(Generator & gen) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( !std::numeric_limits::is_signed ) >)> boost_static_assert_typedef_99; for(int j = 0; j < n; j++) x[j] = gen(); i = n; } template void seed(It& first, It last) { int j; for(j = 0; j < n && first != last; ++j, ++first) x[j] = *first; i = n; if(first == last && j < n) throw std::invalid_argument("mersenne_twister::seed"); } result_type min () const { return 0; } result_type max () const { result_type res = 0; for(int i = 0; i < w; ++i) res |= (1u << i); return res; } result_type operator()(); static bool validation(result_type v) { return val == v; } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const mersenne_twister& mt) { for(int j = 0; j < mt.state_size; ++j) os << mt.compute(j) << " "; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, mersenne_twister& mt) { for(int j = 0; j < mt.state_size; ++j) is >> mt.x[j] >> std::ws; mt.i = mt.state_size; return is; } friend bool operator==(const mersenne_twister& x, const mersenne_twister& y) { for(int j = 0; j < state_size; ++j) if(x.compute(j) != y.compute(j)) return false; return true; } friend bool operator!=(const mersenne_twister& x, const mersenne_twister& y) { return !(x == y); } # 181 "/usr/include/boost/random/mersenne_twister.hpp" 3 4 private: UIntType compute(unsigned int index) const { return x[ (i + n + index) % (2*n) ]; } void twist(int block); UIntType x[2*n]; int i; }; template const bool mersenne_twister::has_fixed_range; template const int mersenne_twister::state_size; template const int mersenne_twister::shift_size; template const int mersenne_twister::mask_bits; template const UIntType mersenne_twister::parameter_a; template const int mersenne_twister::output_u; template const int mersenne_twister::output_s; template const UIntType mersenne_twister::output_b; template const int mersenne_twister::output_t; template const UIntType mersenne_twister::output_c; template const int mersenne_twister::output_l; template void mersenne_twister::twist(int block) { const UIntType upper_mask = (~0u) << r; const UIntType lower_mask = ~upper_mask; if(block == 0) { for(int j = n; j < 2*n; j++) { UIntType y = (x[j-n] & upper_mask) | (x[j-(n-1)] & lower_mask); x[j] = x[j-(n-m)] ^ (y >> 1) ^ (y&1 ? a : 0); } } else if (block == 1) { { for(int j = 0; j < n-m; j++) { UIntType y = (x[j+n] & upper_mask) | (x[j+n+1] & lower_mask); x[j] = x[j+n+m] ^ (y >> 1) ^ (y&1 ? a : 0); } } for(int j = n-m; j < n-1; j++) { UIntType y = (x[j+n] & upper_mask) | (x[j+n+1] & lower_mask); x[j] = x[j-(n-m)] ^ (y >> 1) ^ (y&1 ? a : 0); } UIntType y = (x[2*n-1] & upper_mask) | (x[0] & lower_mask); x[n-1] = x[m-1] ^ (y >> 1) ^ (y&1 ? a : 0); i = 0; } } template inline typename mersenne_twister::result_type mersenne_twister::operator()() { if(i == n) twist(0); else if(i >= 2*n) twist(1); UIntType z = x[i]; ++i; z ^= (z >> u); z ^= ((z << s) & b); z ^= ((z << t) & c); z ^= (z >> l); return z; } } typedef random::mersenne_twister mt11213b; typedef random::mersenne_twister mt19937; } # 78 "enblend.cc" 2 # 1 "/usr/include/lcms.h" 1 3 4 # 99 "/usr/include/lcms.h" 3 4 # 1 "/usr/include/assert.h" 1 3 4 # 100 "/usr/include/lcms.h" 2 3 4 # 179 "/usr/include/lcms.h" 3 4 # 1 "/usr/include/memory.h" 1 3 4 # 180 "/usr/include/lcms.h" 2 3 4 # 190 "/usr/include/lcms.h" 3 4 typedef unsigned char BYTE, *LPBYTE; typedef unsigned short WORD, *LPWORD; typedef unsigned long DWORD, *LPDWORD; typedef char *LPSTR; typedef void *LPVOID; # 265 "/usr/include/lcms.h" 3 4 typedef int LCMS_RWLOCK_T; # 275 "/usr/include/lcms.h" 3 4 typedef int LCMSBOOL; typedef void* LCMSHANDLE; # 1 "/usr/include/icc34.h" 1 3 4 # 154 "/usr/include/icc34.h" 3 4 typedef unsigned char icUInt8Number; typedef unsigned short icUInt16Number; typedef unsigned int icUInt32Number; typedef unsigned int icUInt64Number[2]; typedef char icInt8Number; typedef short icInt16Number; typedef int icInt32Number; typedef int icInt64Number[2]; # 269 "/usr/include/icc34.h" 3 4 typedef icInt32Number icSignature; typedef icInt32Number icS15Fixed16Number; typedef icUInt32Number icU16Fixed16Number; typedef enum { icSigAToB0Tag = 0x41324230L, icSigAToB1Tag = 0x41324231L, icSigAToB2Tag = 0x41324232L, icSigBlueColorantTag = 0x6258595AL, icSigBlueTRCTag = 0x62545243L, icSigBToA0Tag = 0x42324130L, icSigBToA1Tag = 0x42324131L, icSigBToA2Tag = 0x42324132L, icSigCalibrationDateTimeTag = 0x63616C74L, icSigCharTargetTag = 0x74617267L, icSigCopyrightTag = 0x63707274L, icSigCrdInfoTag = 0x63726469L, icSigDeviceMfgDescTag = 0x646D6E64L, icSigDeviceModelDescTag = 0x646D6464L, icSigGamutTag = 0x67616D74L, icSigGrayTRCTag = 0x6b545243L, icSigGreenColorantTag = 0x6758595AL, icSigGreenTRCTag = 0x67545243L, icSigLuminanceTag = 0x6C756d69L, icSigMeasurementTag = 0x6D656173L, icSigMediaBlackPointTag = 0x626B7074L, icSigMediaWhitePointTag = 0x77747074L, icSigNamedColorTag = 0x6E636f6CL, icSigNamedColor2Tag = 0x6E636C32L, icSigPreview0Tag = 0x70726530L, icSigPreview1Tag = 0x70726531L, icSigPreview2Tag = 0x70726532L, icSigProfileDescriptionTag = 0x64657363L, icSigProfileSequenceDescTag = 0x70736571L, icSigPs2CRD0Tag = 0x70736430L, icSigPs2CRD1Tag = 0x70736431L, icSigPs2CRD2Tag = 0x70736432L, icSigPs2CRD3Tag = 0x70736433L, icSigPs2CSATag = 0x70733273L, icSigPs2RenderingIntentTag = 0x70733269L, icSigRedColorantTag = 0x7258595AL, icSigRedTRCTag = 0x72545243L, icSigScreeningDescTag = 0x73637264L, icSigScreeningTag = 0x7363726EL, icSigTechnologyTag = 0x74656368L, icSigUcrBgTag = 0x62666420L, icSigViewingCondDescTag = 0x76756564L, icSigViewingConditionsTag = 0x76696577L, icMaxEnumTag = 0xFFFFFFFFL } icTagSignature; typedef enum { icSigDigitalCamera = 0x6463616DL, icSigFilmScanner = 0x6673636EL, icSigReflectiveScanner = 0x7273636EL, icSigInkJetPrinter = 0x696A6574L, icSigThermalWaxPrinter = 0x74776178L, icSigElectrophotographicPrinter = 0x6570686FL, icSigElectrostaticPrinter = 0x65737461L, icSigDyeSublimationPrinter = 0x64737562L, icSigPhotographicPaperPrinter = 0x7270686FL, icSigFilmWriter = 0x6670726EL, icSigVideoMonitor = 0x7669646DL, icSigVideoCamera = 0x76696463L, icSigProjectionTelevision = 0x706A7476L, icSigCRTDisplay = 0x43525420L, icSigPMDisplay = 0x504D4420L, icSigAMDisplay = 0x414D4420L, icSigPhotoCD = 0x4B504344L, icSigPhotoImageSetter = 0x696D6773L, icSigGravure = 0x67726176L, icSigOffsetLithography = 0x6F666673L, icSigSilkscreen = 0x73696C6BL, icSigFlexography = 0x666C6578L, icMaxEnumTechnology = 0xFFFFFFFFL } icTechnologySignature; typedef enum { icSigCurveType = 0x63757276L, icSigDataType = 0x64617461L, icSigDateTimeType = 0x6474696DL, icSigLut16Type = 0x6d667432L, icSigLut8Type = 0x6d667431L, icSigMeasurementType = 0x6D656173L, icSigNamedColorType = 0x6E636f6CL, icSigProfileSequenceDescType = 0x70736571L, icSigS15Fixed16ArrayType = 0x73663332L, icSigScreeningType = 0x7363726EL, icSigSignatureType = 0x73696720L, icSigTextType = 0x74657874L, icSigTextDescriptionType = 0x64657363L, icSigU16Fixed16ArrayType = 0x75663332L, icSigUcrBgType = 0x62666420L, icSigUInt16ArrayType = 0x75693136L, icSigUInt32ArrayType = 0x75693332L, icSigUInt64ArrayType = 0x75693634L, icSigUInt8ArrayType = 0x75693038L, icSigViewingConditionsType = 0x76696577L, icSigXYZType = 0x58595A20L, icSigXYZArrayType = 0x58595A20L, icSigNamedColor2Type = 0x6E636C32L, icSigCrdInfoType = 0x63726469L, icMaxEnumType = 0xFFFFFFFFL } icTagTypeSignature; typedef enum { icSigXYZData = 0x58595A20L, icSigLabData = 0x4C616220L, icSigLuvData = 0x4C757620L, icSigYCbCrData = 0x59436272L, icSigYxyData = 0x59787920L, icSigRgbData = 0x52474220L, icSigGrayData = 0x47524159L, icSigHsvData = 0x48535620L, icSigHlsData = 0x484C5320L, icSigCmykData = 0x434D594BL, icSigCmyData = 0x434D5920L, icSig2colorData = 0x32434C52L, icSig3colorData = 0x33434C52L, icSig4colorData = 0x34434C52L, icSig5colorData = 0x35434C52L, icSig6colorData = 0x36434C52L, icSig7colorData = 0x37434C52L, icSig8colorData = 0x38434C52L, icSig9colorData = 0x39434C52L, icSig10colorData = 0x41434C52L, icSig11colorData = 0x42434C52L, icSig12colorData = 0x43434C52L, icSig13colorData = 0x44434C52L, icSig14colorData = 0x45434C52L, icSig15colorData = 0x46434C52L, icMaxEnumData = 0xFFFFFFFFL } icColorSpaceSignature; typedef enum { icSigInputClass = 0x73636E72L, icSigDisplayClass = 0x6D6E7472L, icSigOutputClass = 0x70727472L, icSigLinkClass = 0x6C696E6BL, icSigAbstractClass = 0x61627374L, icSigColorSpaceClass = 0x73706163L, icSigNamedColorClass = 0x6e6d636cL, icMaxEnumClass = 0xFFFFFFFFL } icProfileClassSignature; typedef enum { icSigMacintosh = 0x4150504CL, icSigMicrosoft = 0x4D534654L, icSigSolaris = 0x53554E57L, icSigSGI = 0x53474920L, icSigTaligent = 0x54474E54L, icMaxEnumPlatform = 0xFFFFFFFFL } icPlatformSignature; typedef enum { icFlare0 = 0x00000000L, icFlare100 = 0x00000001L, icMaxFlare = 0xFFFFFFFFL } icMeasurementFlare; typedef enum { icGeometryUnknown = 0x00000000L, icGeometry045or450 = 0x00000001L, icGeometry0dord0 = 0x00000002L, icMaxGeometry = 0xFFFFFFFFL } icMeasurementGeometry; typedef enum { icPerceptual = 0, icRelativeColorimetric = 1, icSaturation = 2, icAbsoluteColorimetric = 3, icMaxEnumIntent = 0xFFFFFFFFL } icRenderingIntent; typedef enum { icSpotShapeUnknown = 0, icSpotShapePrinterDefault = 1, icSpotShapeRound = 2, icSpotShapeDiamond = 3, icSpotShapeEllipse = 4, icSpotShapeLine = 5, icSpotShapeSquare = 6, icSpotShapeCross = 7, icMaxEnumSpot = 0xFFFFFFFFL } icSpotShape; typedef enum { icStdObsUnknown = 0x00000000L, icStdObs1931TwoDegrees = 0x00000001L, icStdObs1964TenDegrees = 0x00000002L, icMaxStdObs = 0xFFFFFFFFL } icStandardObserver; typedef enum { icIlluminantUnknown = 0x00000000L, icIlluminantD50 = 0x00000001L, icIlluminantD65 = 0x00000002L, icIlluminantD93 = 0x00000003L, icIlluminantF2 = 0x00000004L, icIlluminantD55 = 0x00000005L, icIlluminantA = 0x00000006L, icIlluminantEquiPowerE = 0x00000007L, icIlluminantF8 = 0x00000008L, icMaxEnumIluminant = 0xFFFFFFFFL } icIlluminant; # 508 "/usr/include/icc34.h" 3 4 typedef struct { icInt8Number data[1]; } icInt8Array; typedef struct { icUInt8Number data[1]; } icUInt8Array; typedef struct { icUInt16Number data[1]; } icUInt16Array; typedef struct { icInt16Number data[1]; } icInt16Array; typedef struct { icUInt32Number data[1]; } icUInt32Array; typedef struct { icInt32Number data[1]; } icInt32Array; typedef struct { icUInt64Number data[1]; } icUInt64Array; typedef struct { icInt64Number data[1]; } icInt64Array; typedef struct { icU16Fixed16Number data[1]; } icU16Fixed16Array; typedef struct { icS15Fixed16Number data[1]; } icS15Fixed16Array; typedef struct { icUInt16Number year; icUInt16Number month; icUInt16Number day; icUInt16Number hours; icUInt16Number minutes; icUInt16Number seconds; } icDateTimeNumber; typedef struct { icS15Fixed16Number X; icS15Fixed16Number Y; icS15Fixed16Number Z; } icXYZNumber; typedef struct { icXYZNumber data[1]; } icXYZArray; typedef struct { icUInt32Number count; icUInt16Number data[1]; } icCurve; typedef struct { icUInt32Number dataFlag; icInt8Number data[1]; } icData; typedef struct { icUInt8Number inputChan; icUInt8Number outputChan; icUInt8Number clutPoints; icInt8Number pad; icS15Fixed16Number e00; icS15Fixed16Number e01; icS15Fixed16Number e02; icS15Fixed16Number e10; icS15Fixed16Number e11; icS15Fixed16Number e12; icS15Fixed16Number e20; icS15Fixed16Number e21; icS15Fixed16Number e22; icUInt16Number inputEnt; icUInt16Number outputEnt; icUInt16Number data[1]; } icLut16; typedef struct { icUInt8Number inputChan; icUInt8Number outputChan; icUInt8Number clutPoints; icInt8Number pad; icS15Fixed16Number e00; icS15Fixed16Number e01; icS15Fixed16Number e02; icS15Fixed16Number e10; icS15Fixed16Number e11; icS15Fixed16Number e12; icS15Fixed16Number e20; icS15Fixed16Number e21; icS15Fixed16Number e22; icUInt8Number data[1]; } icLut8; typedef struct { icStandardObserver stdObserver; icXYZNumber backing; icMeasurementGeometry geometry; icMeasurementFlare flare; icIlluminant illuminant; } icMeasurement; typedef struct { icUInt32Number vendorFlag; icUInt32Number count; icUInt32Number nDeviceCoords; icInt8Number prefix[32]; icInt8Number suffix[32]; icInt8Number data[1]; # 692 "/usr/include/icc34.h" 3 4 } icNamedColor2; typedef struct { icSignature deviceMfg; icSignature deviceModel; icUInt64Number attributes; icTechnologySignature technology; icInt8Number data[1]; # 709 "/usr/include/icc34.h" 3 4 } icDescStruct; typedef struct { icUInt32Number count; icUInt8Number data[1]; } icProfileSequenceDesc; typedef struct { icUInt32Number count; icInt8Number data[1]; # 732 "/usr/include/icc34.h" 3 4 } icTextDescription; typedef struct { icS15Fixed16Number frequency; icS15Fixed16Number angle; icSpotShape spotShape; } icScreeningData; typedef struct { icUInt32Number screeningFlag; icUInt32Number channels; icScreeningData data[1]; } icScreening; typedef struct { icInt8Number data[1]; } icText; typedef struct { icUInt32Number count; icUInt16Number curve[1]; } icUcrBgCurve; typedef struct { icInt8Number data[1]; # 770 "/usr/include/icc34.h" 3 4 } icUcrBg; typedef struct { icXYZNumber illuminant; icXYZNumber surround; icIlluminant stdIluminant; } icViewingCondition; typedef struct { icUInt32Number count; icInt8Number desc[1]; } icCrdInfo; # 798 "/usr/include/icc34.h" 3 4 typedef struct { icTagTypeSignature sig; icInt8Number reserved[4]; } icTagBase; typedef struct { icTagBase base; icCurve curve; } icCurveType; typedef struct { icTagBase base; icData data; } icDataType; typedef struct { icTagBase base; icDateTimeNumber date; } icDateTimeType; typedef struct { icTagBase base; icLut16 lut; } icLut16Type; typedef struct { icTagBase base; icLut8 lut; } icLut8Type; typedef struct { icTagBase base; icMeasurement measurement; } icMeasurementType; typedef struct { icTagBase base; icNamedColor2 ncolor; } icNamedColor2Type; typedef struct { icTagBase base; icProfileSequenceDesc desc; } icProfileSequenceDescType; typedef struct { icTagBase base; icTextDescription desc; } icTextDescriptionType; typedef struct { icTagBase base; icS15Fixed16Array data; } icS15Fixed16ArrayType; typedef struct { icTagBase base; icScreening screen; } icScreeningType; typedef struct { icTagBase base; icSignature signature; } icSignatureType; typedef struct { icTagBase base; icText data; } icTextType; typedef struct { icTagBase base; icU16Fixed16Array data; } icU16Fixed16ArrayType; typedef struct { icTagBase base; icUcrBg data; } icUcrBgType; typedef struct { icTagBase base; icUInt16Array data; } icUInt16ArrayType; typedef struct { icTagBase base; icUInt32Array data; } icUInt32ArrayType; typedef struct { icTagBase base; icUInt64Array data; } icUInt64ArrayType; typedef struct { icTagBase base; icUInt8Array data; } icUInt8ArrayType; typedef struct { icTagBase base; icViewingCondition view; } icViewingConditionType; typedef struct { icTagBase base; icXYZArray data; } icXYZType; typedef struct { icTagBase base; icCrdInfo info; }icCrdInfoType; # 949 "/usr/include/icc34.h" 3 4 typedef struct { icTagSignature sig; icUInt32Number offset; icUInt32Number size; } icTag; typedef struct { icUInt32Number count; icTag tags[1]; } icTagList; typedef struct { icUInt32Number size; icSignature cmmId; icUInt32Number version; icProfileClassSignature deviceClass; icColorSpaceSignature colorSpace; icColorSpaceSignature pcs; icDateTimeNumber date; icSignature magic; icPlatformSignature platform; icUInt32Number flags; icSignature manufacturer; icUInt32Number model; icUInt64Number attributes; icUInt32Number renderingIntent; icXYZNumber illuminant; icSignature creator; icInt8Number reserved[44]; } icHeader; typedef struct { icHeader header; icUInt32Number count; icInt8Number data[1]; } icProfile; typedef struct { icUInt32Number vendorFlag; icUInt32Number count; icInt8Number data[1]; # 1021 "/usr/include/icc34.h" 3 4 } icNamedColor; typedef struct { icTagBase base; icNamedColor ncolor; } icNamedColorType; # 279 "/usr/include/lcms.h" 2 3 4 # 317 "/usr/include/lcms.h" 3 4 typedef struct { icUInt8Number gridPoints[16]; icUInt8Number prec; icUInt8Number pad1; icUInt8Number pad2; icUInt8Number pad3; } icCLutStruct; typedef struct { icUInt8Number inputChan; icUInt8Number outputChan; icUInt8Number pad1; icUInt8Number pad2; icUInt32Number offsetB; icUInt32Number offsetMat; icUInt32Number offsetM; icUInt32Number offsetC; icUInt32Number offsetA; } icLutAtoB; typedef struct { icUInt8Number inputChan; icUInt8Number outputChan; icUInt8Number pad1; icUInt8Number pad2; icUInt32Number offsetB; icUInt32Number offsetMat; icUInt32Number offsetM; icUInt32Number offsetC; icUInt32Number offsetA; } icLutBtoA; extern "C" { # 442 "/usr/include/lcms.h" 3 4 typedef LCMSHANDLE cmsHPROFILE; typedef LCMSHANDLE cmsHTRANSFORM; # 688 "/usr/include/lcms.h" 3 4 typedef struct { unsigned int Crc32; int Type; double Params[10]; } LCMSGAMMAPARAMS, * LPLCMSGAMMAPARAMS; typedef struct { LCMSGAMMAPARAMS Seed; int nEntries; WORD GammaTable[1]; } GAMMATABLE; typedef GAMMATABLE * LPGAMMATABLE; typedef struct { int nItems; double* Values; } SAMPLEDCURVE; typedef SAMPLEDCURVE * LPSAMPLEDCURVE; typedef struct { double n[3]; } VEC3; typedef VEC3 * LPVEC3; typedef struct { VEC3 v[3]; } MAT3; typedef MAT3 * LPMAT3; typedef struct { double X; double Y; double Z; } cmsCIEXYZ; typedef cmsCIEXYZ * LPcmsCIEXYZ; typedef struct { double x; double y; double Y; } cmsCIExyY; typedef cmsCIExyY * LPcmsCIExyY; typedef struct { double L; double a; double b; } cmsCIELab; typedef cmsCIELab * LPcmsCIELab; typedef struct { double L; double C; double h; } cmsCIELCh; typedef cmsCIELCh * LPcmsCIELCh; typedef struct { double J; double C; double h; } cmsJCh; typedef cmsJCh * LPcmsJCh; typedef struct { cmsCIEXYZ Red; cmsCIEXYZ Green; cmsCIEXYZ Blue; } cmsCIEXYZTRIPLE; typedef cmsCIEXYZTRIPLE * LPcmsCIEXYZTRIPLE; typedef struct { cmsCIExyY Red; cmsCIExyY Green; cmsCIExyY Blue; } cmsCIExyYTRIPLE; typedef cmsCIExyYTRIPLE * LPcmsCIExyYTRIPLE; # 829 "/usr/include/lcms.h" 3 4 LPcmsCIEXYZ cmsD50_XYZ(void); LPcmsCIExyY cmsD50_xyY(void); cmsHPROFILE cmsOpenProfileFromFile(const char *ICCProfile, const char *sAccess); cmsHPROFILE cmsOpenProfileFromMem(LPVOID MemPtr, DWORD dwSize); LCMSBOOL cmsCloseProfile(cmsHPROFILE hProfile); cmsHPROFILE cmsCreateRGBProfile(LPcmsCIExyY WhitePoint, LPcmsCIExyYTRIPLE Primaries, LPGAMMATABLE TransferFunction[3]); cmsHPROFILE cmsCreateGrayProfile(LPcmsCIExyY WhitePoint, LPGAMMATABLE TransferFunction); cmsHPROFILE cmsCreateLinearizationDeviceLink(icColorSpaceSignature ColorSpace, LPGAMMATABLE TransferFunctions[]); cmsHPROFILE cmsCreateInkLimitingDeviceLink(icColorSpaceSignature ColorSpace, double Limit); cmsHPROFILE cmsCreateLabProfile(LPcmsCIExyY WhitePoint); cmsHPROFILE cmsCreateLab4Profile(LPcmsCIExyY WhitePoint); cmsHPROFILE cmsCreateXYZProfile(void); cmsHPROFILE cmsCreate_sRGBProfile(void); cmsHPROFILE cmsCreateBCHSWabstractProfile(int nLUTPoints, double Bright, double Contrast, double Hue, double Saturation, int TempSrc, int TempDest); cmsHPROFILE cmsCreateNULLProfile(void); void cmsXYZ2xyY(LPcmsCIExyY Dest, const cmsCIEXYZ* Source); void cmsxyY2XYZ(LPcmsCIEXYZ Dest, const cmsCIExyY* Source); void cmsXYZ2Lab(LPcmsCIEXYZ WhitePoint, LPcmsCIELab Lab, const cmsCIEXYZ* xyz); void cmsLab2XYZ(LPcmsCIEXYZ WhitePoint, LPcmsCIEXYZ xyz, const cmsCIELab* Lab); void cmsLab2LCh(LPcmsCIELCh LCh, const cmsCIELab* Lab); void cmsLCh2Lab(LPcmsCIELab Lab, const cmsCIELCh* LCh); double cmsDeltaE(LPcmsCIELab Lab1, LPcmsCIELab Lab2); double cmsCIE94DeltaE(LPcmsCIELab Lab1, LPcmsCIELab Lab2); double cmsBFDdeltaE(LPcmsCIELab Lab1, LPcmsCIELab Lab2); double cmsCMCdeltaE(LPcmsCIELab Lab1, LPcmsCIELab Lab2); double cmsCIE2000DeltaE(LPcmsCIELab Lab1, LPcmsCIELab Lab2, double Kl, double Kc, double Kh); void cmsClampLab(LPcmsCIELab Lab, double amax, double amin, double bmax, double bmin); LCMSBOOL cmsWhitePointFromTemp(int TempK, LPcmsCIExyY WhitePoint); LCMSBOOL cmsAdaptToIlluminant(LPcmsCIEXYZ Result, LPcmsCIEXYZ SourceWhitePt, LPcmsCIEXYZ Illuminant, LPcmsCIEXYZ Value); LCMSBOOL cmsBuildRGB2XYZtransferMatrix(LPMAT3 r, LPcmsCIExyY WhitePoint, LPcmsCIExyYTRIPLE Primaries); # 916 "/usr/include/lcms.h" 3 4 typedef struct { cmsCIEXYZ whitePoint; double Yb; double La; int surround; double D_value; } cmsViewingConditions; typedef cmsViewingConditions * LPcmsViewingConditions; LCMSHANDLE cmsCIECAM97sInit(LPcmsViewingConditions pVC2); void cmsCIECAM97sDone(LCMSHANDLE hModel); void cmsCIECAM97sForward(LCMSHANDLE hModel, LPcmsCIEXYZ pIn, LPcmsJCh pOut); void cmsCIECAM97sReverse(LCMSHANDLE hModel, LPcmsJCh pIn, LPcmsCIEXYZ pOut); LCMSHANDLE cmsCIECAM02Init(LPcmsViewingConditions pVC); void cmsCIECAM02Done(LCMSHANDLE hModel); void cmsCIECAM02Forward(LCMSHANDLE hModel, LPcmsCIEXYZ pIn, LPcmsJCh pOut); void cmsCIECAM02Reverse(LCMSHANDLE hModel, LPcmsJCh pIn, LPcmsCIEXYZ pOut); LPGAMMATABLE cmsBuildGamma(int nEntries, double Gamma); LPGAMMATABLE cmsBuildParametricGamma(int nEntries, int Type, double Params[]); LPGAMMATABLE cmsAllocGamma(int nEntries); void cmsFreeGamma(LPGAMMATABLE Gamma); void cmsFreeGammaTriple(LPGAMMATABLE Gamma[3]); LPGAMMATABLE cmsDupGamma(LPGAMMATABLE Src); LPGAMMATABLE cmsReverseGamma(int nResultSamples, LPGAMMATABLE InGamma); LPGAMMATABLE cmsJoinGamma(LPGAMMATABLE InGamma, LPGAMMATABLE OutGamma); LPGAMMATABLE cmsJoinGammaEx(LPGAMMATABLE InGamma, LPGAMMATABLE OutGamma, int nPoints); LCMSBOOL cmsSmoothGamma(LPGAMMATABLE Tab, double lambda); double cmsEstimateGamma(LPGAMMATABLE t); double cmsEstimateGammaEx(LPWORD Table, int nEntries, double Thereshold); LPGAMMATABLE cmsReadICCGamma(cmsHPROFILE hProfile, icTagSignature sig); LPGAMMATABLE cmsReadICCGammaReversed(cmsHPROFILE hProfile, icTagSignature sig); LCMSBOOL cmsTakeMediaWhitePoint(LPcmsCIEXYZ Dest, cmsHPROFILE hProfile); LCMSBOOL cmsTakeMediaBlackPoint(LPcmsCIEXYZ Dest, cmsHPROFILE hProfile); LCMSBOOL cmsTakeIluminant(LPcmsCIEXYZ Dest, cmsHPROFILE hProfile); LCMSBOOL cmsTakeColorants(LPcmsCIEXYZTRIPLE Dest, cmsHPROFILE hProfile); DWORD cmsTakeHeaderFlags(cmsHPROFILE hProfile); DWORD cmsTakeHeaderAttributes(cmsHPROFILE hProfile); void cmsSetLanguage(const char LanguageCode[4], const char CountryCode[4]); const char* cmsTakeProductName(cmsHPROFILE hProfile); const char* cmsTakeProductDesc(cmsHPROFILE hProfile); const char* cmsTakeProductInfo(cmsHPROFILE hProfile); const char* cmsTakeManufacturer(cmsHPROFILE hProfile); const char* cmsTakeModel(cmsHPROFILE hProfile); const char* cmsTakeCopyright(cmsHPROFILE hProfile); const BYTE* cmsTakeProfileID(cmsHPROFILE hProfile); LCMSBOOL cmsTakeCreationDateTime(struct tm *Dest, cmsHPROFILE hProfile); LCMSBOOL cmsTakeCalibrationDateTime(struct tm *Dest, cmsHPROFILE hProfile); LCMSBOOL cmsIsTag(cmsHPROFILE hProfile, icTagSignature sig); int cmsTakeRenderingIntent(cmsHPROFILE hProfile); LCMSBOOL cmsTakeCharTargetData(cmsHPROFILE hProfile, char** Data, size_t* len); int cmsReadICCTextEx(cmsHPROFILE hProfile, icTagSignature sig, char *Text, size_t size); int cmsReadICCText(cmsHPROFILE hProfile, icTagSignature sig, char *Text); typedef struct { icSignature deviceMfg; icSignature deviceModel; icUInt32Number attributes[2]; icTechnologySignature technology; char Manufacturer[512]; char Model[512]; } cmsPSEQDESC, *LPcmsPSEQDESC; typedef struct { int n; cmsPSEQDESC seq[1]; } cmsSEQ, *LPcmsSEQ; LPcmsSEQ cmsReadProfileSequenceDescription(cmsHPROFILE hProfile); void cmsFreeProfileSequenceDescription(LPcmsSEQ pseq); icColorSpaceSignature _cmsICCcolorSpace(int OurNotation); int _cmsLCMScolorSpace(icColorSpaceSignature ProfileSpace); int _cmsChannelsOf(icColorSpaceSignature ColorSpace); LCMSBOOL _cmsIsMatrixShaper(cmsHPROFILE hProfile); LCMSBOOL cmsIsIntentSupported(cmsHPROFILE hProfile, int Intent, int UsedDirection); icColorSpaceSignature cmsGetPCS(cmsHPROFILE hProfile); icColorSpaceSignature cmsGetColorSpace(cmsHPROFILE hProfile); icProfileClassSignature cmsGetDeviceClass(cmsHPROFILE hProfile); DWORD cmsGetProfileICCversion(cmsHPROFILE hProfile); void cmsSetProfileICCversion(cmsHPROFILE hProfile, DWORD Version); icInt32Number cmsGetTagCount(cmsHPROFILE hProfile); icTagSignature cmsGetTagSignature(cmsHPROFILE hProfile, icInt32Number n); void cmsSetDeviceClass(cmsHPROFILE hProfile, icProfileClassSignature sig); void cmsSetColorSpace(cmsHPROFILE hProfile, icColorSpaceSignature sig); void cmsSetPCS(cmsHPROFILE hProfile, icColorSpaceSignature pcs); void cmsSetRenderingIntent(cmsHPROFILE hProfile, int RenderingIntent); void cmsSetHeaderFlags(cmsHPROFILE hProfile, DWORD Flags); void cmsSetHeaderAttributes(cmsHPROFILE hProfile, DWORD Flags); void cmsSetProfileID(cmsHPROFILE hProfile, LPBYTE ProfileID); # 1097 "/usr/include/lcms.h" 3 4 cmsHTRANSFORM cmsCreateTransform(cmsHPROFILE Input, DWORD InputFormat, cmsHPROFILE Output, DWORD OutputFormat, int Intent, DWORD dwFlags); cmsHTRANSFORM cmsCreateProofingTransform(cmsHPROFILE Input, DWORD InputFormat, cmsHPROFILE Output, DWORD OutputFormat, cmsHPROFILE Proofing, int Intent, int ProofingIntent, DWORD dwFlags); cmsHTRANSFORM cmsCreateMultiprofileTransform(cmsHPROFILE hProfiles[], int nProfiles, DWORD InputFormat, DWORD OutputFormat, int Intent, DWORD dwFlags); void cmsDeleteTransform(cmsHTRANSFORM hTransform); void cmsDoTransform(cmsHTRANSFORM Transform, LPVOID InputBuffer, LPVOID OutputBuffer, unsigned int Size); void cmsChangeBuffersFormat(cmsHTRANSFORM hTransform, DWORD InputFormat, DWORD dwOutputFormat); void cmsSetAlarmCodes(int r, int g, int b); void cmsGetAlarmCodes(int *r, int *g, int *b); double cmsSetAdaptationState(double d); int cmsSetCMYKPreservationStrategy(int n); typedef struct { char Name[(256)]; WORD PCS[3]; WORD DeviceColorant[16]; } cmsNAMEDCOLOR, * LPcmsNAMEDCOLOR; typedef struct { int nColors; int Allocated; int ColorantCount; char Prefix[33]; char Suffix[33]; cmsNAMEDCOLOR List[1]; } cmsNAMEDCOLORLIST, * LPcmsNAMEDCOLORLIST; int cmsNamedColorCount(cmsHTRANSFORM xform); LCMSBOOL cmsNamedColorInfo(cmsHTRANSFORM xform, int nColor, char* Name, char* Prefix, char* Suffix); int cmsNamedColorIndex(cmsHTRANSFORM xform, const char* Name); LPcmsNAMEDCOLORLIST cmsReadColorantTable(cmsHPROFILE hProfile, icTagSignature sig); LCMSBOOL cmsAddTag(cmsHPROFILE hProfile, icTagSignature sig, const void* data); cmsHPROFILE cmsTransform2DeviceLink(cmsHTRANSFORM hTransform, DWORD dwFlags); void _cmsSetLUTdepth(cmsHPROFILE hProfile, int depth); LCMSBOOL _cmsSaveProfile(cmsHPROFILE hProfile, const char* FileName); LCMSBOOL _cmsSaveProfileToMem(cmsHPROFILE hProfile, void *MemPtr, size_t* BytesNeeded); DWORD cmsGetPostScriptCSA(cmsHPROFILE hProfile, int Intent, LPVOID Buffer, DWORD dwBufferLen); DWORD cmsGetPostScriptCRD(cmsHPROFILE hProfile, int Intent, LPVOID Buffer, DWORD dwBufferLen); DWORD cmsGetPostScriptCRDEx(cmsHPROFILE hProfile, int Intent, DWORD dwFlags, LPVOID Buffer, DWORD dwBufferLen); # 1206 "/usr/include/lcms.h" 3 4 int cmsErrorAction(int nAction); typedef int (* cmsErrorHandlerFunction)(int ErrorCode, const char *ErrorText); void cmsSetErrorHandler(cmsErrorHandlerFunction Fn); typedef struct _lcms_LUT_struc LUT, * LPLUT; LPLUT cmsAllocLUT(void); LPLUT cmsAllocLinearTable(LPLUT NewLUT, LPGAMMATABLE Tables[], int nTable); LPLUT cmsAlloc3DGrid(LPLUT Lut, int clutPoints, int inputChan, int outputChan); LPLUT cmsSetMatrixLUT(LPLUT Lut, LPMAT3 M); LPLUT cmsSetMatrixLUT4(LPLUT Lut, LPMAT3 M, LPVEC3 off, DWORD dwFlags); void cmsFreeLUT(LPLUT Lut); void cmsEvalLUT(LPLUT Lut, WORD In[], WORD Out[]); double cmsEvalLUTreverse(LPLUT Lut, WORD Target[], WORD Result[], LPWORD Hint); LPLUT cmsReadICCLut(cmsHPROFILE hProfile, icTagSignature sig); LPLUT cmsDupLUT(LPLUT Orig); typedef int (* _cmsSAMPLER)(register WORD In[], register WORD Out[], register LPVOID Cargo); int cmsSample3DGrid(LPLUT Lut, _cmsSAMPLER Sampler, LPVOID Cargo, DWORD dwFlags); typedef unsigned char* (* cmsFORMATTER)(register void* CMMcargo, register WORD ToUnroll[], register LPBYTE Buffer); void cmsSetUserFormatters(cmsHTRANSFORM hTransform, DWORD dwInput, cmsFORMATTER Input, DWORD dwOutput, cmsFORMATTER Output); void cmsGetUserFormatters(cmsHTRANSFORM hTransform, LPDWORD InputFormat, cmsFORMATTER* Input, LPDWORD OutputFormat, cmsFORMATTER* Output); LCMSHANDLE cmsIT8Alloc(void); void cmsIT8Free(LCMSHANDLE IT8); int cmsIT8TableCount(LCMSHANDLE IT8); int cmsIT8SetTable(LCMSHANDLE IT8, int nTable); LCMSHANDLE cmsIT8LoadFromFile(const char* cFileName); LCMSHANDLE cmsIT8LoadFromMem(void *Ptr, size_t len); LCMSBOOL cmsIT8SaveToFile(LCMSHANDLE IT8, const char* cFileName); LCMSBOOL cmsIT8SaveToMem(LCMSHANDLE hIT8, void *MemPtr, size_t* BytesNeeded); const char* cmsIT8GetSheetType(LCMSHANDLE hIT8); LCMSBOOL cmsIT8SetSheetType(LCMSHANDLE hIT8, const char* Type); LCMSBOOL cmsIT8SetComment(LCMSHANDLE hIT8, const char* cComment); LCMSBOOL cmsIT8SetPropertyStr(LCMSHANDLE hIT8, const char* cProp, const char *Str); LCMSBOOL cmsIT8SetPropertyDbl(LCMSHANDLE hIT8, const char* cProp, double Val); LCMSBOOL cmsIT8SetPropertyHex(LCMSHANDLE hIT8, const char* cProp, int Val); LCMSBOOL cmsIT8SetPropertyUncooked(LCMSHANDLE hIT8, const char* Key, const char* Buffer); const char* cmsIT8GetProperty(LCMSHANDLE hIT8, const char* cProp); double cmsIT8GetPropertyDbl(LCMSHANDLE hIT8, const char* cProp); int cmsIT8EnumProperties(LCMSHANDLE IT8, char ***PropertyNames); const char* cmsIT8GetDataRowCol(LCMSHANDLE IT8, int row, int col); double cmsIT8GetDataRowColDbl(LCMSHANDLE IT8, int row, int col); LCMSBOOL cmsIT8SetDataRowCol(LCMSHANDLE hIT8, int row, int col, const char* Val); LCMSBOOL cmsIT8SetDataRowColDbl(LCMSHANDLE hIT8, int row, int col, double Val); const char* cmsIT8GetData(LCMSHANDLE IT8, const char* cPatch, const char* cSample); double cmsIT8GetDataDbl(LCMSHANDLE IT8, const char* cPatch, const char* cSample); LCMSBOOL cmsIT8SetData(LCMSHANDLE IT8, const char* cPatch, const char* cSample, const char *Val); LCMSBOOL cmsIT8SetDataDbl(LCMSHANDLE hIT8, const char* cPatch, const char* cSample, double Val); int cmsIT8GetDataFormat(LCMSHANDLE hIT8, const char* cSample); LCMSBOOL cmsIT8SetDataFormat(LCMSHANDLE IT8, int n, const char *Sample); int cmsIT8EnumDataFormat(LCMSHANDLE IT8, char ***SampleNames); const char* cmsIT8GetPatchName(LCMSHANDLE hIT8, int nPatch, char* buffer); int cmsIT8SetTableByLabel(LCMSHANDLE hIT8, const char* cSet, const char* cField, const char* ExpectedType); void cmsIT8DefineDblFormat(LCMSHANDLE IT8, const char* Formatter); # 1342 "/usr/include/lcms.h" 3 4 void cmsLabEncoded2Float(LPcmsCIELab Lab, const WORD wLab[3]); void cmsLabEncoded2Float4(LPcmsCIELab Lab, const WORD wLab[3]); void cmsFloat2LabEncoded(WORD wLab[3], const cmsCIELab* Lab); void cmsFloat2LabEncoded4(WORD wLab[3], const cmsCIELab* Lab); void cmsXYZEncoded2Float(LPcmsCIEXYZ fxyz, const WORD XYZ[3]); void cmsFloat2XYZEncoded(WORD XYZ[3], const cmsCIEXYZ* fXYZ); LCMSBOOL _cmsAddTextTag(cmsHPROFILE hProfile, icTagSignature sig, const char* Text); LCMSBOOL _cmsAddXYZTag(cmsHPROFILE hProfile, icTagSignature sig, const cmsCIEXYZ* XYZ); LCMSBOOL _cmsAddLUTTag(cmsHPROFILE hProfile, icTagSignature sig, const void* lut); LCMSBOOL _cmsAddGammaTag(cmsHPROFILE hProfile, icTagSignature sig, LPGAMMATABLE TransferFunction); LCMSBOOL _cmsAddChromaticityTag(cmsHPROFILE hProfile, icTagSignature sig, LPcmsCIExyYTRIPLE Chrm); LCMSBOOL _cmsAddSequenceDescriptionTag(cmsHPROFILE hProfile, icTagSignature sig, LPcmsSEQ PSeq); LCMSBOOL _cmsAddNamedColorTag(cmsHPROFILE hProfile, icTagSignature sig, LPcmsNAMEDCOLORLIST nc); LCMSBOOL _cmsAddDateTimeTag(cmsHPROFILE hProfile, icTagSignature sig, struct tm *DateTime); LCMSBOOL _cmsAddColorantTableTag(cmsHPROFILE hProfile, icTagSignature sig, LPcmsNAMEDCOLORLIST nc); LCMSBOOL _cmsAddChromaticAdaptationTag(cmsHPROFILE hProfile, icTagSignature sig, const cmsCIEXYZ* mat); # 1370 "/usr/include/lcms.h" 3 4 static inline int _cmsQuickFloor(double val) { const double _lcms_double2fixmagic = 68719476736.0 * 1.5; union { double val; int halves[2]; } temp; temp.val = val + _lcms_double2fixmagic; return temp.halves[1] >> 16; } static inline WORD _cmsClampWord(int in) { if (in < 0) return 0; if (in > 0xFFFF) return 0xFFFFU; return (WORD) in; } static inline void* _cmsMalloc(size_t size) { if (size > ((size_t) 1024*1024*500)) return __null; if (size < 0) return __null; return (void*) malloc(size); } static inline void _cmsFree(void *Ptr) { if (Ptr) free(Ptr); } void cmsSignalError(int ErrorCode, const char *ErrorText, ...); typedef struct { icS15Fixed16Number a; icUInt16Number b; } _cmsTestAlign16; typedef struct { icS15Fixed16Number a; icUInt8Number b; } _cmsTestAlign8; typedef icInt32Number Fixed32; # 1461 "/usr/include/lcms.h" 3 4 Fixed32 FixedMul(Fixed32 a, Fixed32 b); Fixed32 FixedSquare(Fixed32 a); static inline Fixed32 ToFixedDomain(int a) { return a + ((a + 0x7fff) / 0xffff); } static inline int FromFixedDomain(Fixed32 a) { return a - ((a + 0x7fff) >> 16); } # 1477 "/usr/include/lcms.h" 3 4 Fixed32 FixedLERP(Fixed32 a, Fixed32 l, Fixed32 h); WORD FixedScale(WORD a, Fixed32 s); # 1489 "/usr/include/lcms.h" 3 4 typedef struct { Fixed32 n[3]; } WVEC3, * LPWVEC3; typedef struct { WVEC3 v[3]; } WMAT3, * LPWMAT3; void VEC3init(LPVEC3 r, double x, double y, double z); void VEC3initF(LPWVEC3 r, double x, double y, double z); void VEC3toFix(LPWVEC3 r, LPVEC3 v); void VEC3fromFix(LPVEC3 r, LPWVEC3 v); void VEC3scaleFix(LPWORD r, LPWVEC3 Scale); void VEC3swap(LPVEC3 a, LPVEC3 b); void VEC3divK(LPVEC3 r, LPVEC3 v, double d); void VEC3perK(LPVEC3 r, LPVEC3 v, double d); void VEC3minus(LPVEC3 r, LPVEC3 a, LPVEC3 b); void VEC3perComp(LPVEC3 r, LPVEC3 a, LPVEC3 b); LCMSBOOL VEC3equal(LPWVEC3 a, LPWVEC3 b, double Tolerance); LCMSBOOL VEC3equalF(LPVEC3 a, LPVEC3 b, double Tolerance); void VEC3scaleAndCut(LPWVEC3 r, LPVEC3 v, double d); void VEC3cross(LPVEC3 r, LPVEC3 u, LPVEC3 v); void VEC3saturate(LPVEC3 v); double VEC3distance(LPVEC3 a, LPVEC3 b); double VEC3length(LPVEC3 a); void MAT3identity(LPMAT3 a); void MAT3per(LPMAT3 r, LPMAT3 a, LPMAT3 b); void MAT3perK(LPMAT3 r, LPMAT3 v, double d); int MAT3inverse(LPMAT3 a, LPMAT3 b); LCMSBOOL MAT3solve(LPVEC3 x, LPMAT3 a, LPVEC3 b); double MAT3det(LPMAT3 m); void MAT3eval(LPVEC3 r, LPMAT3 a, LPVEC3 v); void MAT3toFix(LPWMAT3 r, LPMAT3 v); void MAT3fromFix(LPMAT3 r, LPWMAT3 v); void MAT3evalW(LPWVEC3 r, LPWMAT3 a, LPWVEC3 v); LCMSBOOL MAT3isIdentity(LPWMAT3 a, double Tolerance); void MAT3scaleAndCut(LPWMAT3 r, LPMAT3 v, double d); int cmsIsLinear(WORD Table[], int nEntries); struct _lcms_l16params_struc; typedef void (* _cms3DLERP)(WORD Input[], WORD Output[], WORD LutTable[], struct _lcms_l16params_struc* p); typedef struct _lcms_l8opt_struc { unsigned int X0[256], Y0[256], Z0[256]; WORD rx[256], ry[256], rz[256]; } L8PARAMS, * LPL8PARAMS; typedef struct _lcms_l16params_struc { int nSamples; int nInputs; int nOutputs; WORD Domain; int opta1, opta2; int opta3, opta4; int opta5, opta6; int opta7, opta8; _cms3DLERP Interp3D; LPL8PARAMS p8; } L16PARAMS, *LPL16PARAMS; void cmsCalcL16Params(int nSamples, LPL16PARAMS p); void cmsCalcCLUT16Params(int nSamples, int InputChan, int OutputChan, LPL16PARAMS p); void cmsCalcCLUT16ParamsEx(int nSamples, int InputChan, int OutputChan, LCMSBOOL lUseTetrahedral, LPL16PARAMS p); WORD cmsLinearInterpLUT16(WORD Value, WORD LutTable[], LPL16PARAMS p); Fixed32 cmsLinearInterpFixed(WORD Value1, WORD LutTable[], LPL16PARAMS p); WORD cmsReverseLinearInterpLUT16(WORD Value, WORD LutTable[], LPL16PARAMS p); void cmsTrilinearInterp16(WORD Input[], WORD Output[], WORD LutTable[], LPL16PARAMS p); void cmsTetrahedralInterp16(WORD Input[], WORD Output[], WORD LutTable[], LPL16PARAMS p); void cmsTetrahedralInterp8(WORD Input[], WORD Output[], WORD LutTable[], LPL16PARAMS p); # 1618 "/usr/include/lcms.h" 3 4 struct _lcms_LUT_struc { DWORD wFlags; WMAT3 Matrix; unsigned int InputChan; unsigned int OutputChan; unsigned int InputEntries; unsigned int OutputEntries; unsigned int cLutPoints; LPWORD L1[16]; LPWORD L2[16]; LPWORD T; unsigned int Tsize; L16PARAMS In16params; L16PARAMS Out16params; L16PARAMS CLut16params; int Intent; WMAT3 Mat3; WVEC3 Ofs3; LPWORD L3[16]; L16PARAMS L3params; unsigned int L3Entries; WMAT3 Mat4; WVEC3 Ofs4; LPWORD L4[16]; L16PARAMS L4params; unsigned int L4Entries; LCMSBOOL FixGrayAxes; LCMSGAMMAPARAMS LCurvesSeed[4][16]; }; LCMSBOOL _cmsSmoothEndpoints(LPWORD Table, int nEntries); unsigned int _cmsCrc32OfGammaTable(LPGAMMATABLE Table); LPSAMPLEDCURVE cmsAllocSampledCurve(int nItems); void cmsFreeSampledCurve(LPSAMPLEDCURVE p); LPSAMPLEDCURVE cmsDupSampledCurve(LPSAMPLEDCURVE p); LPSAMPLEDCURVE cmsConvertGammaToSampledCurve(LPGAMMATABLE Gamma, int nPoints); LPGAMMATABLE cmsConvertSampledCurveToGamma(LPSAMPLEDCURVE Sampled, double Max); void cmsEndpointsOfSampledCurve(LPSAMPLEDCURVE p, double* Min, double* Max); void cmsClampSampledCurve(LPSAMPLEDCURVE p, double Min, double Max); LCMSBOOL cmsSmoothSampledCurve(LPSAMPLEDCURVE Tab, double SmoothingLambda); void cmsRescaleSampledCurve(LPSAMPLEDCURVE p, double Min, double Max, int nPoints); LPSAMPLEDCURVE cmsJoinSampledCurves(LPSAMPLEDCURVE X, LPSAMPLEDCURVE Y, int nResultingPoints); # 1704 "/usr/include/lcms.h" 3 4 typedef struct { DWORD dwFlags; WMAT3 Matrix; L16PARAMS p16; LPWORD L[3]; L16PARAMS p2_16; LPWORD L2[3]; } MATSHAPER, * LPMATSHAPER; LPMATSHAPER cmsAllocMatShaper(LPMAT3 matrix, LPGAMMATABLE Shaper[], DWORD Behaviour); LPMATSHAPER cmsAllocMatShaper2(LPMAT3 matrix, LPGAMMATABLE In[], LPGAMMATABLE Out[], DWORD Behaviour); void cmsFreeMatShaper(LPMATSHAPER MatShaper); void cmsEvalMatShaper(LPMATSHAPER MatShaper, WORD In[], WORD Out[]); LCMSBOOL cmsReadICCMatrixRGB2XYZ(LPMAT3 r, cmsHPROFILE hProfile); LPMATSHAPER cmsBuildInputMatrixShaper(cmsHPROFILE InputProfile); LPMATSHAPER cmsBuildOutputMatrixShaper(cmsHPROFILE OutputProfile); LCMSBOOL cmsAdaptationMatrix(LPMAT3 r, LPMAT3 ConeMatrix, LPcmsCIEXYZ FromIll, LPcmsCIEXYZ ToIll); LCMSBOOL cmsAdaptMatrixToD50(LPMAT3 r, LPcmsCIExyY SourceWhitePt); LCMSBOOL cmsAdaptMatrixFromD50(LPMAT3 r, LPcmsCIExyY DestWhitePt); LCMSBOOL cmsReadChromaticAdaptationMatrix(LPMAT3 r, cmsHPROFILE hProfile); void cmsXYZ2LabEncoded(WORD XYZ[3], WORD Lab[3]); void cmsLab2XYZEncoded(WORD Lab[3], WORD XYZ[3]); void _cmsIdentifyWhitePoint(char *Buffer, LPcmsCIEXYZ WhitePt); WORD _cmsQuantizeVal(double i, int MaxSamples); LPcmsNAMEDCOLORLIST cmsAllocNamedColorList(int n); int cmsReadICCnamedColorList(cmsHTRANSFORM xform, cmsHPROFILE hProfile, icTagSignature sig); void cmsFreeNamedColorList(LPcmsNAMEDCOLORLIST List); LCMSBOOL cmsAppendNamedColor(cmsHTRANSFORM xform, const char* Name, WORD PCS[3], WORD Colorant[16]); # 1759 "/usr/include/lcms.h" 3 4 typedef struct _lcms_iccprofile_struct { void* stream; icProfileClassSignature DeviceClass; icColorSpaceSignature ColorSpace; icColorSpaceSignature PCS; icRenderingIntent RenderingIntent; icUInt32Number flags; icUInt32Number attributes; cmsCIEXYZ Illuminant; icUInt32Number Version; MAT3 ChromaticAdaptation; cmsCIEXYZ MediaWhitePoint; cmsCIEXYZ MediaBlackPoint; BYTE ProfileID[16]; icInt32Number TagCount; icTagSignature TagNames[100]; size_t TagSizes[100]; size_t TagOffsets[100]; LPVOID TagPtrs[100]; char PhysicalFile[(256)]; LCMSBOOL IsWrite; LCMSBOOL SaveAs8Bits; struct tm Created; size_t (* Read)(void *buffer, size_t size, size_t count, struct _lcms_iccprofile_struct* Icc); LCMSBOOL (* Seek)(struct _lcms_iccprofile_struct* Icc, size_t offset); LCMSBOOL (* Close)(struct _lcms_iccprofile_struct* Icc); size_t (* Tell)(struct _lcms_iccprofile_struct* Icc); LCMSBOOL (* Write)(struct _lcms_iccprofile_struct* Icc, size_t size, LPVOID Ptr); size_t UsedSpace; } LCMSICCPROFILE, * LPLCMSICCPROFILE; cmsHPROFILE _cmsCreateProfilePlaceholder(void); icInt32Number _cmsSearchTag(LPLCMSICCPROFILE Profile, icTagSignature sig, LCMSBOOL lSignalError); LPVOID _cmsInitTag(LPLCMSICCPROFILE Icc, icTagSignature sig, size_t size, const void* Init); LPLCMSICCPROFILE _cmsCreateProfileFromFilePlaceholder(const char* FileName); LPLCMSICCPROFILE _cmsCreateProfileFromMemPlaceholder(LPVOID MemPtr, DWORD dwSize); void _cmsSetSaveToDisk(LPLCMSICCPROFILE Icc, const char* FileName); void _cmsSetSaveToMemory(LPLCMSICCPROFILE Icc, LPVOID MemPtr, size_t dwSize); # 1850 "/usr/include/lcms.h" 3 4 struct _cmstransform_struct; typedef void (* _cmsCOLORCALLBACKFN)(struct _cmstransform_struct *Transform, LPVOID InputBuffer, LPVOID OutputBuffer, unsigned int Size); typedef void (* _cmsADJFN)(WORD In[], WORD Out[], LPWMAT3 m, LPWVEC3 b); typedef void (* _cmsTRANSFN)(struct _cmstransform_struct *Transform, WORD In[], WORD Out[]); typedef void (* _cmsCNVRT)(WORD In[], WORD Out[]); typedef LPBYTE (* _cmsFIXFN)(register struct _cmstransform_struct *info, register WORD ToUnroll[], register LPBYTE Buffer); typedef struct _cmstransform_struct { DWORD InputFormat, OutputFormat; DWORD StrideIn, StrideOut; int Intent, ProofIntent; int DoGamutCheck; cmsHPROFILE InputProfile; cmsHPROFILE OutputProfile; cmsHPROFILE PreviewProfile; icColorSpaceSignature EntryColorSpace; icColorSpaceSignature ExitColorSpace; DWORD dwOriginalFlags; WMAT3 m1, m2; WVEC3 of1, of2; _cmsCOLORCALLBACKFN xform; _cmsFIXFN FromInput; _cmsTRANSFN FromDevice; _cmsADJFN Stage1; _cmsADJFN Stage2; _cmsTRANSFN ToDevice; _cmsFIXFN ToOutput; LPLUT Device2PCS; LPLUT PCS2Device; LPLUT Gamut; LPLUT Preview; LPLUT DeviceLink; LPLUT GamutCheck; LPMATSHAPER InMatShaper; LPMATSHAPER OutMatShaper; LPMATSHAPER SmeltMatShaper; int Phase1, Phase2, Phase3; LPcmsNAMEDCOLORLIST NamedColorList; LCMSBOOL lInputV4Lab, lOutputV4Lab; WORD CacheIn[16]; WORD CacheOut[16]; double AdaptationState; LCMS_RWLOCK_T rwlock; } _cmsTRANSFORM, *_LPcmsTRANSFORM; _cmsFIXFN _cmsIdentifyInputFormat(_LPcmsTRANSFORM xform, DWORD dwInput); _cmsFIXFN _cmsIdentifyOutputFormat(_LPcmsTRANSFORM xform, DWORD dwOutput); # 1961 "/usr/include/lcms.h" 3 4 int cmsChooseCnvrt(int Absolute, int Phase1, LPcmsCIEXYZ BlackPointIn, LPcmsCIEXYZ WhitePointIn, LPcmsCIEXYZ IlluminantIn, LPMAT3 ChromaticAdaptationMatrixIn, int Phase2, LPcmsCIEXYZ BlackPointOut, LPcmsCIEXYZ WhitePointOut, LPcmsCIEXYZ IlluminantOut, LPMAT3 ChromaticAdaptationMatrixOut, int DoBPC, double AdaptationState, _cmsADJFN *fn1, LPWMAT3 wm, LPWVEC3 wof); LCMSBOOL _cmsEndPointsBySpace(icColorSpaceSignature Space, WORD **White, WORD **Black, int *nOutputs); WORD * _cmsWhiteBySpace(icColorSpaceSignature Space); WORD Clamp_L(Fixed32 in); WORD Clamp_ab(Fixed32 in); int cmsDetectBlackPoint(LPcmsCIEXYZ BlackPoint, cmsHPROFILE hProfile, int Intent, DWORD dwFlags); int _cmsReasonableGridpointsByColorspace(icColorSpaceSignature Colorspace, DWORD dwFlags); LPLUT _cmsPrecalculateDeviceLink(cmsHTRANSFORM h, DWORD dwFlags); LPLUT _cmsPrecalculateBlackPreservingDeviceLink(cmsHTRANSFORM hCMYK2CMYK, DWORD dwFlags); LPLUT _cmsPrecalculateGamutCheck(cmsHTRANSFORM h); LCMSBOOL _cmsFixWhiteMisalignment(_LPcmsTRANSFORM p); LPLUT _cmsBlessLUT8(LPLUT Lut); LPLUT _cmsComputeGamutLUT(cmsHPROFILE hProfile, int Intent); LPLUT _cmsComputeSoftProofLUT(cmsHPROFILE hProfile, int nIntent); void _cmsComputePrelinearizationTablesFromXFORM(cmsHTRANSFORM h[], int nTransforms, LPLUT Grid); LPGAMMATABLE _cmsBuildKToneCurve(cmsHTRANSFORM hCMYK2CMYK, int nPoints); # 2040 "/usr/include/lcms.h" 3 4 } # 79 "enblend.cc" 2 boost::mt19937 Twister; int Verbose = 1; unsigned int ExactLevels = 0; bool OneAtATime = true; bool Wraparound = false; bool GimpAssociatedAlphaHack = false; bool UseCIECAM = false; bool UseLZW = false; bool OutputSizeGiven = false; int OutputWidthCmdLine = 0; int OutputHeightCmdLine = 0; bool Checkpoint = false; int UseGPU = 0; int OptimizeMask = 1; int CoarseMask = 1; char *SaveMaskFileName = __null; char *LoadMaskFileName = __null; char *VisualizeMaskFileName = __null; unsigned int GDAKmax = 32; unsigned int DijkstraRadius = 25; unsigned int MaskVectorizeDistance = 0; sigset_t SigintMask; cmsHPROFILE InputProfile = __null; cmsHPROFILE XYZProfile = __null; cmsHTRANSFORM InputToXYZTransform = __null; cmsHTRANSFORM XYZToInputTransform = __null; cmsViewingConditions ViewingConditions; LCMSHANDLE CIECAMTransform = __null; # 1 "common.h" 1 # 43 "common.h" namespace enblend { enum Overlap {NoOverlap, PartialOverlap, CompleteOverlap}; } # 121 "enblend.cc" 2 # 1 "enblend.h" 1 # 24 "enblend.h" # 1 "../config.h" 1 # 25 "enblend.h" 2 # 34 "enblend.h" # 1 "numerictraits.h" 1 # 24 "numerictraits.h" # 1 "../config.h" 1 # 25 "numerictraits.h" 2 # 1 "../include/vigra/basicimage.hxx" 1 # 42 "../include/vigra/basicimage.hxx" # 1 "../include/vigra/utilities.hxx" 1 # 41 "../include/vigra/utilities.hxx" # 1 "../include/vigra/config.hxx" 1 # 191 "../include/vigra/config.hxx" namespace vigra { typedef std::exception StdException; } # 42 "../include/vigra/utilities.hxx" 2 # 1 "../include/vigra/error.hxx" 1 # 124 "../include/vigra/error.hxx" namespace vigra { class ContractViolation : public StdException { public: ContractViolation(char const * prefix, char const * message, char const * file, int line) { sprintf(what_, "\n%.30s\n%.900s\n(%.100s:%d)\n", prefix, message, file, line); } ContractViolation(char const * prefix, char const * message) { sprintf(what_, "\n%.30s\n%.900s\n", prefix, message); } virtual const char * what() const throw() { return what_; } private: enum { bufsize_ = 1100 }; char what_[bufsize_]; }; class PreconditionViolation : public ContractViolation { public: PreconditionViolation(char const * message, const char * file, int line) : ContractViolation("Precondition violation!", message, file, line) {} PreconditionViolation(char const * message) : ContractViolation("Precondition violation!", message) {} }; class PostconditionViolation : public ContractViolation { public: PostconditionViolation(char const * message, const char * file, int line) : ContractViolation("Postcondition violation!", message, file, line) {} PostconditionViolation(char const * message) : ContractViolation("Postcondition violation!", message) {} }; class InvariantViolation : public ContractViolation { public: InvariantViolation(char const * message, const char * file, int line) : ContractViolation("Invariant violation!", message, file, line) {} InvariantViolation(char const * message) : ContractViolation("Invariant violation!", message) {} }; # 258 "../include/vigra/error.hxx" inline void throw_invariant_error(bool predicate, char const * message) { if(!predicate) throw vigra::InvariantViolation(message); } inline void throw_precondition_error(bool predicate, char const * message) { if(!predicate) throw vigra::PreconditionViolation(message); } inline void throw_postcondition_error(bool predicate, char const * message) { if(!predicate) throw vigra::PostconditionViolation(message); } inline void throw_invariant_error(bool predicate, std::string message) { if(!predicate) throw vigra::InvariantViolation(message.c_str()); } inline void throw_precondition_error(bool predicate, std::string message) { if(!predicate) throw vigra::PreconditionViolation(message.c_str()); } inline void throw_postcondition_error(bool predicate, std::string message) { if(!predicate) throw vigra::PostconditionViolation(message.c_str()); } # 312 "../include/vigra/error.hxx" } # 43 "../include/vigra/utilities.hxx" 2 # 1 "../include/vigra/metaprogramming.hxx" 1 # 40 "../include/vigra/metaprogramming.hxx" # 1 "../include/vigra/config.hxx" 1 # 41 "../include/vigra/metaprogramming.hxx" 2 namespace vigra { template class MetaInt { public: enum { value = N }; }; struct VigraTrueType { enum { asBool = true }; }; struct VigraFalseType { enum { asBool = false }; }; # 80 "../include/vigra/metaprogramming.hxx" struct StridedArrayTag {}; # 95 "../include/vigra/metaprogramming.hxx" struct UnstridedArrayTag {}; template class TypeTraits { public: typedef VigraFalseType isConst; typedef VigraFalseType isPOD; typedef VigraFalseType isBuiltinType; }; template class TypeTraits : public TypeTraits { public: typedef VigraTrueType isConst; }; template class TypeTraits { public: typedef VigraFalseType isConst; typedef VigraTrueType isPOD; typedef VigraTrueType isBuiltinType; }; template class TypeTraits { public: typedef VigraFalseType isConst; typedef VigraTrueType isPOD; typedef VigraTrueType isBuiltinType; }; # 146 "../include/vigra/metaprogramming.hxx" template<> class TypeTraits { public: typedef VigraFalseType isConst; typedef VigraTrueType isPOD; typedef VigraTrueType isBuiltinType; }; template<> class TypeTraits { public: typedef VigraFalseType isConst; typedef VigraTrueType isPOD; typedef VigraTrueType isBuiltinType; }; template<> class TypeTraits { public: typedef VigraFalseType isConst; typedef VigraTrueType isPOD; typedef VigraTrueType isBuiltinType; }; template<> class TypeTraits { public: typedef VigraFalseType isConst; typedef VigraTrueType isPOD; typedef VigraTrueType isBuiltinType; }; template<> class TypeTraits { public: typedef VigraFalseType isConst; typedef VigraTrueType isPOD; typedef VigraTrueType isBuiltinType; }; template<> class TypeTraits { public: typedef VigraFalseType isConst; typedef VigraTrueType isPOD; typedef VigraTrueType isBuiltinType; }; template<> class TypeTraits { public: typedef VigraFalseType isConst; typedef VigraTrueType isPOD; typedef VigraTrueType isBuiltinType; }; template<> class TypeTraits { public: typedef VigraFalseType isConst; typedef VigraTrueType isPOD; typedef VigraTrueType isBuiltinType; }; template<> class TypeTraits { public: typedef VigraFalseType isConst; typedef VigraTrueType isPOD; typedef VigraTrueType isBuiltinType; }; template<> class TypeTraits { public: typedef VigraFalseType isConst; typedef VigraTrueType isPOD; typedef VigraTrueType isBuiltinType; }; template<> class TypeTraits { public: typedef VigraFalseType isConst; typedef VigraTrueType isPOD; typedef VigraTrueType isBuiltinType; }; template<> class TypeTraits { public: typedef VigraFalseType isConst; typedef VigraTrueType isPOD; typedef VigraTrueType isBuiltinType; }; template struct And; template <> struct And { typedef VigraFalseType result; static const bool boolResult = false; }; template <> struct And { typedef VigraFalseType result; static const bool boolResult = false; }; template <> struct And { typedef VigraFalseType result; static const bool boolResult = false; }; template <> struct And { typedef VigraTrueType result; static const bool boolResult = true; }; template struct Or; template <> struct Or { typedef VigraFalseType result; static const bool boolResult = false; }; template <> struct Or { typedef VigraTrueType result; static const bool boolResult = true; }; template <> struct Or { typedef VigraTrueType result; static const bool boolResult = true; }; template <> struct Or { typedef VigraTrueType result; static const bool boolResult = true; }; template struct If; template struct If { typedef TRUECASE type; }; template struct If { typedef FALSECASE type; }; template struct IfBool; template struct IfBool { typedef TRUECASE type; }; template struct IfBool { typedef FALSECASE type; }; template struct IsSameType { typedef VigraFalseType result; static const bool boolResult = false; }; template struct IsSameType { typedef VigraTrueType result; static const bool boolResult = true; }; template struct IsDerivedFrom { typedef char falseResult[1]; typedef char trueResult[2]; static falseResult * testIsDerivedFrom(...); static trueResult * testIsDerivedFrom(BASE const *); enum { resultSize = sizeof(*testIsDerivedFrom((DERIVED const *)0)) }; static const bool boolResult = (resultSize == 2); typedef typename IfBool::type result; }; } # 44 "../include/vigra/utilities.hxx" 2 # 1 "../include/vigra/tuple.hxx" 1 # 42 "../include/vigra/tuple.hxx" namespace vigra { # 97 "../include/vigra/tuple.hxx" using std::pair; template struct triple { typedef T1 first_type; typedef T2 second_type; typedef T3 third_type; T1 first; T2 second; T3 third; triple() {} triple(const T1& a, const T2& b, const T3& c) : first(a), second(b), third(c) {} }; template triple make_triple( T1 t1, T2 t2, T3 t3 ) { return triple( t1, t2, t3 ); } template struct tuple4 { typedef T1 first_type; typedef T2 second_type; typedef T3 third_type; typedef T4 fourth_type; T1 first; T2 second; T3 third; T4 fourth; tuple4() {} tuple4(const T1& a, const T2& b, const T3& c, const T4& d) : first(a), second(b), third(c), fourth(d) {} }; template tuple4 make_tuple4( T1 t1, T2 t2, T3 t3, T4 t4 ) { return tuple4( t1, t2, t3, t4 ); } template struct tuple5 { typedef T1 first_type; typedef T2 second_type; typedef T3 third_type; typedef T4 fourth_type; typedef T5 fifth_type; T1 first; T2 second; T3 third; T4 fourth; T5 fifth; tuple5() {} tuple5(const T1& a, const T2& b, const T3& c, const T4& d, const T5& e) : first(a), second(b), third(c), fourth(d), fifth(e) {} }; template tuple5 make_tuple5( T1 t1, T2 t2, T3 t3, T4 t4, T5 t5 ) { return tuple5( t1, t2, t3, t4, t5 ); } } # 45 "../include/vigra/utilities.hxx" 2 # 1 "../include/vigra/diff2d.hxx" 1 # 40 "../include/vigra/diff2d.hxx" # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cmath" 1 3 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cmath" 3 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cmath" 3 # 82 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cmath" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template _Tp __cmath_power(_Tp, unsigned int); inline double abs(double __x) { return __builtin_fabs(__x); } inline float abs(float __x) { return __builtin_fabsf(__x); } inline long double abs(long double __x) { return __builtin_fabsl(__x); } using ::acos; inline float acos(float __x) { return __builtin_acosf(__x); } inline long double acos(long double __x) { return __builtin_acosl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type acos(_Tp __x) { return __builtin_acos(__x); } using ::asin; inline float asin(float __x) { return __builtin_asinf(__x); } inline long double asin(long double __x) { return __builtin_asinl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type asin(_Tp __x) { return __builtin_asin(__x); } using ::atan; inline float atan(float __x) { return __builtin_atanf(__x); } inline long double atan(long double __x) { return __builtin_atanl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type atan(_Tp __x) { return __builtin_atan(__x); } using ::atan2; inline float atan2(float __y, float __x) { return __builtin_atan2f(__y, __x); } inline long double atan2(long double __y, long double __x) { return __builtin_atan2l(__y, __x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value && __is_integer<_Up>::__value, double>::__type atan2(_Tp __y, _Up __x) { return __builtin_atan2(__y, __x); } using ::ceil; inline float ceil(float __x) { return __builtin_ceilf(__x); } inline long double ceil(long double __x) { return __builtin_ceill(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type ceil(_Tp __x) { return __builtin_ceil(__x); } using ::cos; inline float cos(float __x) { return __builtin_cosf(__x); } inline long double cos(long double __x) { return __builtin_cosl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type cos(_Tp __x) { return __builtin_cos(__x); } using ::cosh; inline float cosh(float __x) { return __builtin_coshf(__x); } inline long double cosh(long double __x) { return __builtin_coshl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type cosh(_Tp __x) { return __builtin_cosh(__x); } using ::exp; inline float exp(float __x) { return __builtin_expf(__x); } inline long double exp(long double __x) { return __builtin_expl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type exp(_Tp __x) { return __builtin_exp(__x); } using ::fabs; inline float fabs(float __x) { return __builtin_fabsf(__x); } inline long double fabs(long double __x) { return __builtin_fabsl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type fabs(_Tp __x) { return __builtin_fabs(__x); } using ::floor; inline float floor(float __x) { return __builtin_floorf(__x); } inline long double floor(long double __x) { return __builtin_floorl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type floor(_Tp __x) { return __builtin_floor(__x); } using ::fmod; inline float fmod(float __x, float __y) { return __builtin_fmodf(__x, __y); } inline long double fmod(long double __x, long double __y) { return __builtin_fmodl(__x, __y); } using ::frexp; inline float frexp(float __x, int* __exp) { return __builtin_frexpf(__x, __exp); } inline long double frexp(long double __x, int* __exp) { return __builtin_frexpl(__x, __exp); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type frexp(_Tp __x, int* __exp) { return __builtin_frexp(__x, __exp); } using ::ldexp; inline float ldexp(float __x, int __exp) { return __builtin_ldexpf(__x, __exp); } inline long double ldexp(long double __x, int __exp) { return __builtin_ldexpl(__x, __exp); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type ldexp(_Tp __x, int __exp) { return __builtin_ldexp(__x, __exp); } using ::log; inline float log(float __x) { return __builtin_logf(__x); } inline long double log(long double __x) { return __builtin_logl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type log(_Tp __x) { return __builtin_log(__x); } using ::log10; inline float log10(float __x) { return __builtin_log10f(__x); } inline long double log10(long double __x) { return __builtin_log10l(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type log10(_Tp __x) { return __builtin_log10(__x); } using ::modf; inline float modf(float __x, float* __iptr) { return __builtin_modff(__x, __iptr); } inline long double modf(long double __x, long double* __iptr) { return __builtin_modfl(__x, __iptr); } template inline _Tp __pow_helper(_Tp __x, int __n) { return __n < 0 ? _Tp(1)/__cmath_power(__x, -__n) : __cmath_power(__x, __n); } using ::pow; inline float pow(float __x, float __y) { return __builtin_powf(__x, __y); } inline long double pow(long double __x, long double __y) { return __builtin_powl(__x, __y); } inline double pow(double __x, int __i) { return __builtin_powi(__x, __i); } inline float pow(float __x, int __n) { return __builtin_powif(__x, __n); } inline long double pow(long double __x, int __n) { return __builtin_powil(__x, __n); } using ::sin; inline float sin(float __x) { return __builtin_sinf(__x); } inline long double sin(long double __x) { return __builtin_sinl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type sin(_Tp __x) { return __builtin_sin(__x); } using ::sinh; inline float sinh(float __x) { return __builtin_sinhf(__x); } inline long double sinh(long double __x) { return __builtin_sinhl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type sinh(_Tp __x) { return __builtin_sinh(__x); } using ::sqrt; inline float sqrt(float __x) { return __builtin_sqrtf(__x); } inline long double sqrt(long double __x) { return __builtin_sqrtl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type sqrt(_Tp __x) { return __builtin_sqrt(__x); } using ::tan; inline float tan(float __x) { return __builtin_tanf(__x); } inline long double tan(long double __x) { return __builtin_tanl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type tan(_Tp __x) { return __builtin_tan(__x); } using ::tanh; inline float tanh(float __x) { return __builtin_tanhf(__x); } inline long double tanh(long double __x) { return __builtin_tanhl(__x); } template inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type tanh(_Tp __x) { return __builtin_tanh(__x); } } namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { template inline int __capture_fpclassify(_Tp __f) { return (sizeof (__f) == sizeof (float) ? __fpclassifyf (__f) : sizeof (__f) == sizeof (double) ? __fpclassify (__f) : __fpclassifyl (__f)); } template inline int __capture_isfinite(_Tp __f) { return (sizeof (__f) == sizeof (float) ? __finitef (__f) : sizeof (__f) == sizeof (double) ? __finite (__f) : __finitel (__f)); } template inline int __capture_isinf(_Tp __f) { return (sizeof (__f) == sizeof (float) ? __isinff (__f) : sizeof (__f) == sizeof (double) ? __isinf (__f) : __isinfl (__f)); } template inline int __capture_isnan(_Tp __f) { return (sizeof (__f) == sizeof (float) ? __isnanf (__f) : sizeof (__f) == sizeof (double) ? __isnan (__f) : __isnanl (__f)); } template inline int __capture_isnormal(_Tp __f) { return ((sizeof (__f) == sizeof (float) ? __fpclassifyf (__f) : sizeof (__f) == sizeof (double) ? __fpclassify (__f) : __fpclassifyl (__f)) == FP_NORMAL); } template inline int __capture_signbit(_Tp __f) { return (sizeof (__f) == sizeof (float) ? __signbitf (__f) : sizeof (__f) == sizeof (double) ? __signbit (__f) : __signbitl (__f)); } template inline int __capture_isgreater(_Tp __f1, _Tp __f2) { return __builtin_isgreater(__f1, __f2); } template inline int __capture_isgreaterequal(_Tp __f1, _Tp __f2) { return __builtin_isgreaterequal(__f1, __f2); } template inline int __capture_isless(_Tp __f1, _Tp __f2) { return __builtin_isless(__f1, __f2); } template inline int __capture_islessequal(_Tp __f1, _Tp __f2) { return __builtin_islessequal(__f1, __f2); } template inline int __capture_islessgreater(_Tp __f1, _Tp __f2) { return __builtin_islessgreater(__f1, __f2); } template inline int __capture_isunordered(_Tp __f1, _Tp __f2) { return __builtin_isunordered(__f1, __f2); } } # 535 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cmath" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template inline int fpclassify(_Tp __f) { return ::__gnu_cxx::__capture_fpclassify(__f); } template inline int isfinite(_Tp __f) { return ::__gnu_cxx::__capture_isfinite(__f); } template inline int isinf(_Tp __f) { return ::__gnu_cxx::__capture_isinf(__f); } template inline int isnan(_Tp __f) { return ::__gnu_cxx::__capture_isnan(__f); } template inline int isnormal(_Tp __f) { return ::__gnu_cxx::__capture_isnormal(__f); } template inline int signbit(_Tp __f) { return ::__gnu_cxx::__capture_signbit(__f); } template inline int isgreater(_Tp __f1, _Tp __f2) { return ::__gnu_cxx::__capture_isgreater(__f1, __f2); } template inline int isgreaterequal(_Tp __f1, _Tp __f2) { return ::__gnu_cxx::__capture_isgreaterequal(__f1, __f2); } template inline int isless(_Tp __f1, _Tp __f2) { return ::__gnu_cxx::__capture_isless(__f1, __f2); } template inline int islessequal(_Tp __f1, _Tp __f2) { return ::__gnu_cxx::__capture_islessequal(__f1, __f2); } template inline int islessgreater(_Tp __f1, _Tp __f2) { return ::__gnu_cxx::__capture_islessgreater(__f1, __f2); } template inline int isunordered(_Tp __f1, _Tp __f2) { return ::__gnu_cxx::__capture_isunordered(__f1, __f2); } } # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/cmath.tcc" 1 3 # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/cmath.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template inline _Tp __cmath_power(_Tp __x, unsigned int __n) { _Tp __y = __n % 2 ? __x : 1; while (__n >>= 1) { __x = __x * __x; if (__n % 2) __y = __y * __x; } return __y; } } # 598 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cmath" 2 3 # 41 "../include/vigra/diff2d.hxx" 2 # 1 "../include/vigra/iteratortags.hxx" 1 # 40 "../include/vigra/iteratortags.hxx" # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iterator" 1 3 # 63 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iterator" 3 # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iterator" 3 # 72 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iterator" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stream_iterator.h" 1 3 # 38 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stream_iterator.h" 3 # 39 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stream_iterator.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template, typename _Dist = ptrdiff_t> class istream_iterator : public iterator { public: typedef _CharT char_type; typedef _Traits traits_type; typedef basic_istream<_CharT, _Traits> istream_type; private: istream_type* _M_stream; _Tp _M_value; bool _M_ok; public: istream_iterator() : _M_stream(0), _M_value(), _M_ok(false) {} istream_iterator(istream_type& __s) : _M_stream(&__s) { _M_read(); } istream_iterator(const istream_iterator& __obj) : _M_stream(__obj._M_stream), _M_value(__obj._M_value), _M_ok(__obj._M_ok) { } const _Tp& operator*() const { ; return _M_value; } const _Tp* operator->() const { return &(operator*()); } istream_iterator& operator++() { ; _M_read(); return *this; } istream_iterator operator++(int) { ; istream_iterator __tmp = *this; _M_read(); return __tmp; } bool _M_equal(const istream_iterator& __x) const { return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); } private: void _M_read() { _M_ok = (_M_stream && *_M_stream) ? true : false; if (_M_ok) { *_M_stream >> _M_value; _M_ok = *_M_stream ? true : false; } } }; template inline bool operator==(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x, const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) { return __x._M_equal(__y); } template inline bool operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x, const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) { return !__x._M_equal(__y); } # 150 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stream_iterator.h" 3 template > class ostream_iterator : public iterator { public: typedef _CharT char_type; typedef _Traits traits_type; typedef basic_ostream<_CharT, _Traits> ostream_type; private: ostream_type* _M_stream; const _CharT* _M_string; public: ostream_iterator(ostream_type& __s) : _M_stream(&__s), _M_string(0) {} # 181 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stream_iterator.h" 3 ostream_iterator(ostream_type& __s, const _CharT* __c) : _M_stream(&__s), _M_string(__c) { } ostream_iterator(const ostream_iterator& __obj) : _M_stream(__obj._M_stream), _M_string(__obj._M_string) { } ostream_iterator& operator=(const _Tp& __value) { ; *_M_stream << __value; if (_M_string) *_M_stream << _M_string; return *this; } ostream_iterator& operator*() { return *this; } ostream_iterator& operator++() { return *this; } ostream_iterator& operator++(int) { return *this; } }; } # 73 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/iterator" 2 3 # 41 "../include/vigra/iteratortags.hxx" 2 struct image_traverser_tag {}; struct multi_dimensional_traverser_tag {}; struct forward_circulator_tag {}; struct bidirectional_circulator_tag {}; struct random_access_circulator_tag {}; # 44 "../include/vigra/diff2d.hxx" 2 # 1 "../include/vigra/iteratortraits.hxx" 1 # 41 "../include/vigra/iteratortraits.hxx" # 1 "../include/vigra/accessor.hxx" 1 # 41 "../include/vigra/accessor.hxx" # 1 "../include/vigra/numerictraits.hxx" 1 # 44 "../include/vigra/numerictraits.hxx" # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/limits.h" 1 3 4 # 45 "../include/vigra/numerictraits.hxx" 2 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cfloat" 1 3 # 48 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cfloat" 3 # 49 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cfloat" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/float.h" 1 3 4 # 51 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/cfloat" 2 3 # 46 "../include/vigra/numerictraits.hxx" 2 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/complex" 1 3 # 45 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/complex" 3 # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/complex" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 1 3 # 42 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 61 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3 template class basic_stringbuf : public basic_streambuf<_CharT, _Traits> { public: typedef _CharT char_type; typedef _Traits traits_type; typedef _Alloc allocator_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; typedef basic_streambuf __streambuf_type; typedef basic_string __string_type; typedef typename __string_type::size_type __size_type; protected: ios_base::openmode _M_mode; __string_type _M_string; public: # 99 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3 explicit basic_stringbuf(ios_base::openmode __mode = ios_base::in | ios_base::out) : __streambuf_type(), _M_mode(__mode), _M_string() { } # 112 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3 explicit basic_stringbuf(const __string_type& __str, ios_base::openmode __mode = ios_base::in | ios_base::out) : __streambuf_type(), _M_mode(), _M_string(__str.data(), __str.size()) { _M_stringbuf_init(__mode); } # 127 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3 __string_type str() const { __string_type __ret; if (this->pptr()) { if (this->pptr() > this->egptr()) __ret = __string_type(this->pbase(), this->pptr()); else __ret = __string_type(this->pbase(), this->egptr()); } else __ret = _M_string; return __ret; } # 151 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3 void str(const __string_type& __s) { _M_string.assign(__s.data(), __s.size()); _M_stringbuf_init(_M_mode); } protected: void _M_stringbuf_init(ios_base::openmode __mode) { _M_mode = __mode; __size_type __len = 0; if (_M_mode & (ios_base::ate | ios_base::app)) __len = _M_string.size(); _M_sync(const_cast(_M_string.data()), 0, __len); } virtual streamsize showmanyc() { streamsize __ret = -1; if (_M_mode & ios_base::in) { _M_update_egptr(); __ret = this->egptr() - this->gptr(); } return __ret; } virtual int_type underflow(); virtual int_type pbackfail(int_type __c = traits_type::eof()); virtual int_type overflow(int_type __c = traits_type::eof()); # 203 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3 virtual __streambuf_type* setbuf(char_type* __s, streamsize __n) { if (__s && __n >= 0) { _M_string.clear(); _M_sync(__s, __n, 0); } return this; } virtual pos_type seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode = ios_base::in | ios_base::out); virtual pos_type seekpos(pos_type __sp, ios_base::openmode __mode = ios_base::in | ios_base::out); void _M_sync(char_type* __base, __size_type __i, __size_type __o); void _M_update_egptr() { const bool __testin = _M_mode & ios_base::in; if (this->pptr() && this->pptr() > this->egptr()) if (__testin) this->setg(this->eback(), this->gptr(), this->pptr()); else this->setg(this->pptr(), this->pptr(), this->pptr()); } }; # 260 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3 template class basic_istringstream : public basic_istream<_CharT, _Traits> { public: typedef _CharT char_type; typedef _Traits traits_type; typedef _Alloc allocator_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; typedef basic_istream __istream_type; private: __stringbuf_type _M_stringbuf; public: # 298 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3 explicit basic_istringstream(ios_base::openmode __mode = ios_base::in) : __istream_type(), _M_stringbuf(__mode | ios_base::in) { this->init(&_M_stringbuf); } # 318 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3 explicit basic_istringstream(const __string_type& __str, ios_base::openmode __mode = ios_base::in) : __istream_type(), _M_stringbuf(__str, __mode | ios_base::in) { this->init(&_M_stringbuf); } ~basic_istringstream() { } # 340 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3 __stringbuf_type* rdbuf() const { return const_cast<__stringbuf_type*>(&_M_stringbuf); } __string_type str() const { return _M_stringbuf.str(); } void str(const __string_type& __s) { _M_stringbuf.str(__s); } }; # 373 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3 template class basic_ostringstream : public basic_ostream<_CharT, _Traits> { public: typedef _CharT char_type; typedef _Traits traits_type; typedef _Alloc allocator_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; typedef basic_ostream __ostream_type; private: __stringbuf_type _M_stringbuf; public: # 411 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3 explicit basic_ostringstream(ios_base::openmode __mode = ios_base::out) : __ostream_type(), _M_stringbuf(__mode | ios_base::out) { this->init(&_M_stringbuf); } # 431 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3 explicit basic_ostringstream(const __string_type& __str, ios_base::openmode __mode = ios_base::out) : __ostream_type(), _M_stringbuf(__str, __mode | ios_base::out) { this->init(&_M_stringbuf); } ~basic_ostringstream() { } # 453 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3 __stringbuf_type* rdbuf() const { return const_cast<__stringbuf_type*>(&_M_stringbuf); } __string_type str() const { return _M_stringbuf.str(); } void str(const __string_type& __s) { _M_stringbuf.str(__s); } }; # 486 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3 template class basic_stringstream : public basic_iostream<_CharT, _Traits> { public: typedef _CharT char_type; typedef _Traits traits_type; typedef _Alloc allocator_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; typedef basic_iostream __iostream_type; private: __stringbuf_type _M_stringbuf; public: # 522 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3 explicit basic_stringstream(ios_base::openmode __m = ios_base::out | ios_base::in) : __iostream_type(), _M_stringbuf(__m) { this->init(&_M_stringbuf); } # 540 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3 explicit basic_stringstream(const __string_type& __str, ios_base::openmode __m = ios_base::out | ios_base::in) : __iostream_type(), _M_stringbuf(__str, __m) { this->init(&_M_stringbuf); } ~basic_stringstream() { } # 562 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 3 __stringbuf_type* rdbuf() const { return const_cast<__stringbuf_type*>(&_M_stringbuf); } __string_type str() const { return _M_stringbuf.str(); } void str(const __string_type& __s) { _M_stringbuf.str(__s); } }; } # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/sstream.tcc" 1 3 # 43 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/sstream.tcc" 3 # 44 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/sstream.tcc" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 1 3 # 46 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/sstream.tcc" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type basic_stringbuf<_CharT, _Traits, _Alloc>:: pbackfail(int_type __c) { int_type __ret = traits_type::eof(); if (this->eback() < this->gptr()) { const bool __testeof = traits_type::eq_int_type(__c, __ret); if (!__testeof) { const bool __testeq = traits_type::eq(traits_type:: to_char_type(__c), this->gptr()[-1]); const bool __testout = this->_M_mode & ios_base::out; if (__testeq || __testout) { this->gbump(-1); if (!__testeq) *this->gptr() = traits_type::to_char_type(__c); __ret = __c; } } else { this->gbump(-1); __ret = traits_type::not_eof(__c); } } return __ret; } template typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type basic_stringbuf<_CharT, _Traits, _Alloc>:: overflow(int_type __c) { const bool __testout = this->_M_mode & ios_base::out; if (__builtin_expect(!__testout, false)) return traits_type::eof(); const bool __testeof = traits_type::eq_int_type(__c, traits_type::eof()); if (__builtin_expect(__testeof, false)) return traits_type::not_eof(__c); const __size_type __capacity = _M_string.capacity(); const __size_type __max_size = _M_string.max_size(); const bool __testput = this->pptr() < this->epptr(); if (__builtin_expect(!__testput && __capacity == __max_size, false)) return traits_type::eof(); const char_type __conv = traits_type::to_char_type(__c); if (!__testput) { # 116 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/sstream.tcc" 3 const __size_type __opt_len = std::max(__size_type(2 * __capacity), __size_type(512)); const __size_type __len = std::min(__opt_len, __max_size); __string_type __tmp; __tmp.reserve(__len); if (this->pbase()) __tmp.assign(this->pbase(), this->epptr() - this->pbase()); __tmp.push_back(__conv); _M_string.swap(__tmp); _M_sync(const_cast(_M_string.data()), this->gptr() - this->eback(), this->pptr() - this->pbase()); } else *this->pptr() = __conv; this->pbump(1); return __c; } template typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type basic_stringbuf<_CharT, _Traits, _Alloc>:: underflow() { int_type __ret = traits_type::eof(); const bool __testin = this->_M_mode & ios_base::in; if (__testin) { _M_update_egptr(); if (this->gptr() < this->egptr()) __ret = traits_type::to_int_type(*this->gptr()); } return __ret; } template typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type basic_stringbuf<_CharT, _Traits, _Alloc>:: seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode) { pos_type __ret = pos_type(off_type(-1)); bool __testin = (ios_base::in & this->_M_mode & __mode) != 0; bool __testout = (ios_base::out & this->_M_mode & __mode) != 0; const bool __testboth = __testin && __testout && __way != ios_base::cur; __testin &= !(__mode & ios_base::out); __testout &= !(__mode & ios_base::in); const char_type* __beg = __testin ? this->eback() : this->pbase(); if ((__beg || !__off) && (__testin || __testout || __testboth)) { _M_update_egptr(); off_type __newoffi = __off; off_type __newoffo = __newoffi; if (__way == ios_base::cur) { __newoffi += this->gptr() - __beg; __newoffo += this->pptr() - __beg; } else if (__way == ios_base::end) __newoffo = __newoffi += this->egptr() - __beg; if ((__testin || __testboth) && __newoffi >= 0 && this->egptr() - __beg >= __newoffi) { this->gbump((__beg + __newoffi) - this->gptr()); __ret = pos_type(__newoffi); } if ((__testout || __testboth) && __newoffo >= 0 && this->egptr() - __beg >= __newoffo) { this->pbump((__beg + __newoffo) - this->pptr()); __ret = pos_type(__newoffo); } } return __ret; } template typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type basic_stringbuf<_CharT, _Traits, _Alloc>:: seekpos(pos_type __sp, ios_base::openmode __mode) { pos_type __ret = pos_type(off_type(-1)); const bool __testin = (ios_base::in & this->_M_mode & __mode) != 0; const bool __testout = (ios_base::out & this->_M_mode & __mode) != 0; const char_type* __beg = __testin ? this->eback() : this->pbase(); if ((__beg || !off_type(__sp)) && (__testin || __testout)) { _M_update_egptr(); const off_type __pos(__sp); const bool __testpos = (0 <= __pos && __pos <= this->egptr() - __beg); if (__testpos) { if (__testin) this->gbump((__beg + __pos) - this->gptr()); if (__testout) this->pbump((__beg + __pos) - this->pptr()); __ret = __sp; } } return __ret; } template void basic_stringbuf<_CharT, _Traits, _Alloc>:: _M_sync(char_type* __base, __size_type __i, __size_type __o) { const bool __testin = _M_mode & ios_base::in; const bool __testout = _M_mode & ios_base::out; char_type* __endg = __base + _M_string.size(); char_type* __endp = __base + _M_string.capacity(); if (__base != _M_string.data()) { __endg += __i; __i = 0; __endp = __endg; } if (__testin) this->setg(__base, __base + __i, __endg); if (__testout) { this->setp(__base, __endp); this->pbump(__o); if (!__testin) this->setg(__endg, __endg, __endg); } } extern template class basic_stringbuf; extern template class basic_istringstream; extern template class basic_ostringstream; extern template class basic_stringstream; extern template class basic_stringbuf; extern template class basic_istringstream; extern template class basic_ostringstream; extern template class basic_stringstream; } # 589 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/sstream" 2 3 # 51 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/complex" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template class complex; template<> class complex; template<> class complex; template<> class complex; template _Tp abs(const complex<_Tp>&); template _Tp arg(const complex<_Tp>&); template _Tp norm(const complex<_Tp>&); template complex<_Tp> conj(const complex<_Tp>&); template complex<_Tp> polar(const _Tp&, const _Tp& = 0); template complex<_Tp> cos(const complex<_Tp>&); template complex<_Tp> cosh(const complex<_Tp>&); template complex<_Tp> exp(const complex<_Tp>&); template complex<_Tp> log(const complex<_Tp>&); template complex<_Tp> log10(const complex<_Tp>&); template complex<_Tp> pow(const complex<_Tp>&, int); template complex<_Tp> pow(const complex<_Tp>&, const _Tp&); template complex<_Tp> pow(const complex<_Tp>&, const complex<_Tp>&); template complex<_Tp> pow(const _Tp&, const complex<_Tp>&); template complex<_Tp> sin(const complex<_Tp>&); template complex<_Tp> sinh(const complex<_Tp>&); template complex<_Tp> sqrt(const complex<_Tp>&); template complex<_Tp> tan(const complex<_Tp>&); template complex<_Tp> tanh(const complex<_Tp>&); # 114 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/complex" 3 template struct complex { typedef _Tp value_type; complex(const _Tp& = _Tp(), const _Tp & = _Tp()); template complex(const complex<_Up>&); _Tp& real(); const _Tp& real() const; _Tp& imag(); const _Tp& imag() const; complex<_Tp>& operator=(const _Tp&); complex<_Tp>& operator+=(const _Tp&); complex<_Tp>& operator-=(const _Tp&); complex<_Tp>& operator*=(const _Tp&); complex<_Tp>& operator/=(const _Tp&); template complex<_Tp>& operator=(const complex<_Up>&); template complex<_Tp>& operator+=(const complex<_Up>&); template complex<_Tp>& operator-=(const complex<_Up>&); template complex<_Tp>& operator*=(const complex<_Up>&); template complex<_Tp>& operator/=(const complex<_Up>&); const complex& __rep() const; private: _Tp _M_real; _Tp _M_imag; }; template inline _Tp& complex<_Tp>::real() { return _M_real; } template inline const _Tp& complex<_Tp>::real() const { return _M_real; } template inline _Tp& complex<_Tp>::imag() { return _M_imag; } template inline const _Tp& complex<_Tp>::imag() const { return _M_imag; } template inline complex<_Tp>::complex(const _Tp& __r, const _Tp& __i) : _M_real(__r), _M_imag(__i) { } template template inline complex<_Tp>::complex(const complex<_Up>& __z) : _M_real(__z.real()), _M_imag(__z.imag()) { } template complex<_Tp>& complex<_Tp>::operator=(const _Tp& __t) { _M_real = __t; _M_imag = _Tp(); return *this; } template inline complex<_Tp>& complex<_Tp>::operator+=(const _Tp& __t) { _M_real += __t; return *this; } template inline complex<_Tp>& complex<_Tp>::operator-=(const _Tp& __t) { _M_real -= __t; return *this; } template complex<_Tp>& complex<_Tp>::operator*=(const _Tp& __t) { _M_real *= __t; _M_imag *= __t; return *this; } template complex<_Tp>& complex<_Tp>::operator/=(const _Tp& __t) { _M_real /= __t; _M_imag /= __t; return *this; } template template complex<_Tp>& complex<_Tp>::operator=(const complex<_Up>& __z) { _M_real = __z.real(); _M_imag = __z.imag(); return *this; } template template complex<_Tp>& complex<_Tp>::operator+=(const complex<_Up>& __z) { _M_real += __z.real(); _M_imag += __z.imag(); return *this; } template template complex<_Tp>& complex<_Tp>::operator-=(const complex<_Up>& __z) { _M_real -= __z.real(); _M_imag -= __z.imag(); return *this; } template template complex<_Tp>& complex<_Tp>::operator*=(const complex<_Up>& __z) { const _Tp __r = _M_real * __z.real() - _M_imag * __z.imag(); _M_imag = _M_real * __z.imag() + _M_imag * __z.real(); _M_real = __r; return *this; } template template complex<_Tp>& complex<_Tp>::operator/=(const complex<_Up>& __z) { const _Tp __r = _M_real * __z.real() + _M_imag * __z.imag(); const _Tp __n = std::norm(__z); _M_imag = (_M_imag * __z.real() - _M_real * __z.imag()) / __n; _M_real = __r / __n; return *this; } template inline const complex<_Tp>& complex<_Tp>::__rep() const { return *this; } template inline complex<_Tp> operator+(const complex<_Tp>& __x, const complex<_Tp>& __y) { complex<_Tp> __r = __x; __r += __y; return __r; } template inline complex<_Tp> operator+(const complex<_Tp>& __x, const _Tp& __y) { complex<_Tp> __r = __x; __r.real() += __y; return __r; } template inline complex<_Tp> operator+(const _Tp& __x, const complex<_Tp>& __y) { complex<_Tp> __r = __y; __r.real() += __x; return __r; } template inline complex<_Tp> operator-(const complex<_Tp>& __x, const complex<_Tp>& __y) { complex<_Tp> __r = __x; __r -= __y; return __r; } template inline complex<_Tp> operator-(const complex<_Tp>& __x, const _Tp& __y) { complex<_Tp> __r = __x; __r.real() -= __y; return __r; } template inline complex<_Tp> operator-(const _Tp& __x, const complex<_Tp>& __y) { complex<_Tp> __r(__x, -__y.imag()); __r.real() -= __y.real(); return __r; } template inline complex<_Tp> operator*(const complex<_Tp>& __x, const complex<_Tp>& __y) { complex<_Tp> __r = __x; __r *= __y; return __r; } template inline complex<_Tp> operator*(const complex<_Tp>& __x, const _Tp& __y) { complex<_Tp> __r = __x; __r *= __y; return __r; } template inline complex<_Tp> operator*(const _Tp& __x, const complex<_Tp>& __y) { complex<_Tp> __r = __y; __r *= __x; return __r; } template inline complex<_Tp> operator/(const complex<_Tp>& __x, const complex<_Tp>& __y) { complex<_Tp> __r = __x; __r /= __y; return __r; } template inline complex<_Tp> operator/(const complex<_Tp>& __x, const _Tp& __y) { complex<_Tp> __r = __x; __r /= __y; return __r; } template inline complex<_Tp> operator/(const _Tp& __x, const complex<_Tp>& __y) { complex<_Tp> __r = __x; __r /= __y; return __r; } template inline complex<_Tp> operator+(const complex<_Tp>& __x) { return __x; } template inline complex<_Tp> operator-(const complex<_Tp>& __x) { return complex<_Tp>(-__x.real(), -__x.imag()); } template inline bool operator==(const complex<_Tp>& __x, const complex<_Tp>& __y) { return __x.real() == __y.real() && __x.imag() == __y.imag(); } template inline bool operator==(const complex<_Tp>& __x, const _Tp& __y) { return __x.real() == __y && __x.imag() == _Tp(); } template inline bool operator==(const _Tp& __x, const complex<_Tp>& __y) { return __x == __y.real() && _Tp() == __y.imag(); } template inline bool operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y) { return __x.real() != __y.real() || __x.imag() != __y.imag(); } template inline bool operator!=(const complex<_Tp>& __x, const _Tp& __y) { return __x.real() != __y || __x.imag() != _Tp(); } template inline bool operator!=(const _Tp& __x, const complex<_Tp>& __y) { return __x != __y.real() || _Tp() != __y.imag(); } template basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x) { _Tp __re_x, __im_x; _CharT __ch; __is >> __ch; if (__ch == '(') { __is >> __re_x >> __ch; if (__ch == ',') { __is >> __im_x >> __ch; if (__ch == ')') __x = complex<_Tp>(__re_x, __im_x); else __is.setstate(ios_base::failbit); } else if (__ch == ')') __x = __re_x; else __is.setstate(ios_base::failbit); } else { __is.putback(__ch); __is >> __re_x; __x = __re_x; } return __is; } template basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x) { basic_ostringstream<_CharT, _Traits> __s; __s.flags(__os.flags()); __s.imbue(__os.getloc()); __s.precision(__os.precision()); __s << '(' << __x.real() << ',' << __x.imag() << ')'; return __os << __s.str(); } template inline _Tp& real(complex<_Tp>& __z) { return __z.real(); } template inline const _Tp& real(const complex<_Tp>& __z) { return __z.real(); } template inline _Tp& imag(complex<_Tp>& __z) { return __z.imag(); } template inline const _Tp& imag(const complex<_Tp>& __z) { return __z.imag(); } template inline _Tp __complex_abs(const complex<_Tp>& __z) { _Tp __x = __z.real(); _Tp __y = __z.imag(); const _Tp __s = std::max(abs(__x), abs(__y)); if (__s == _Tp()) return __s; __x /= __s; __y /= __s; return __s * sqrt(__x * __x + __y * __y); } inline float __complex_abs(__complex__ float __z) { return __builtin_cabsf(__z); } inline double __complex_abs(__complex__ double __z) { return __builtin_cabs(__z); } inline long double __complex_abs(const __complex__ long double& __z) { return __builtin_cabsl(__z); } template inline _Tp abs(const complex<_Tp>& __z) { return __complex_abs(__z.__rep()); } # 586 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/complex" 3 template inline _Tp __complex_arg(const complex<_Tp>& __z) { return atan2(__z.imag(), __z.real()); } inline float __complex_arg(__complex__ float __z) { return __builtin_cargf(__z); } inline double __complex_arg(__complex__ double __z) { return __builtin_carg(__z); } inline long double __complex_arg(const __complex__ long double& __z) { return __builtin_cargl(__z); } template inline _Tp arg(const complex<_Tp>& __z) { return __complex_arg(__z.__rep()); } # 616 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/complex" 3 template struct _Norm_helper { template static inline _Tp _S_do_it(const complex<_Tp>& __z) { const _Tp __x = __z.real(); const _Tp __y = __z.imag(); return __x * __x + __y * __y; } }; template<> struct _Norm_helper { template static inline _Tp _S_do_it(const complex<_Tp>& __z) { _Tp __res = std::abs(__z); return __res * __res; } }; template inline _Tp norm(const complex<_Tp>& __z) { return _Norm_helper<__is_floating<_Tp>::__value && !1>::_S_do_it(__z); } template inline complex<_Tp> polar(const _Tp& __rho, const _Tp& __theta) { return complex<_Tp>(__rho * cos(__theta), __rho * sin(__theta)); } template inline complex<_Tp> conj(const complex<_Tp>& __z) { return complex<_Tp>(__z.real(), -__z.imag()); } template inline complex<_Tp> __complex_cos(const complex<_Tp>& __z) { const _Tp __x = __z.real(); const _Tp __y = __z.imag(); return complex<_Tp>(cos(__x) * cosh(__y), -sin(__x) * sinh(__y)); } inline __complex__ float __complex_cos(__complex__ float __z) { return __builtin_ccosf(__z); } inline __complex__ double __complex_cos(__complex__ double __z) { return __builtin_ccos(__z); } inline __complex__ long double __complex_cos(const __complex__ long double& __z) { return __builtin_ccosl(__z); } template inline complex<_Tp> cos(const complex<_Tp>& __z) { return __complex_cos(__z.__rep()); } template inline complex<_Tp> __complex_cosh(const complex<_Tp>& __z) { const _Tp __x = __z.real(); const _Tp __y = __z.imag(); return complex<_Tp>(cosh(__x) * cos(__y), sinh(__x) * sin(__y)); } inline __complex__ float __complex_cosh(__complex__ float __z) { return __builtin_ccoshf(__z); } inline __complex__ double __complex_cosh(__complex__ double __z) { return __builtin_ccosh(__z); } inline __complex__ long double __complex_cosh(const __complex__ long double& __z) { return __builtin_ccoshl(__z); } template inline complex<_Tp> cosh(const complex<_Tp>& __z) { return __complex_cosh(__z.__rep()); } template inline complex<_Tp> __complex_exp(const complex<_Tp>& __z) { return std::polar(exp(__z.real()), __z.imag()); } inline __complex__ float __complex_exp(__complex__ float __z) { return __builtin_cexpf(__z); } inline __complex__ double __complex_exp(__complex__ double __z) { return __builtin_cexp(__z); } inline __complex__ long double __complex_exp(const __complex__ long double& __z) { return __builtin_cexpl(__z); } template inline complex<_Tp> exp(const complex<_Tp>& __z) { return __complex_exp(__z.__rep()); } # 747 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/complex" 3 template inline complex<_Tp> __complex_log(const complex<_Tp>& __z) { return complex<_Tp>(log(std::abs(__z)), std::arg(__z)); } inline __complex__ float __complex_log(__complex__ float __z) { return __builtin_clogf(__z); } inline __complex__ double __complex_log(__complex__ double __z) { return __builtin_clog(__z); } inline __complex__ long double __complex_log(const __complex__ long double& __z) { return __builtin_clogl(__z); } template inline complex<_Tp> log(const complex<_Tp>& __z) { return __complex_log(__z.__rep()); } template inline complex<_Tp> log10(const complex<_Tp>& __z) { return std::log(__z) / log(_Tp(10.0)); } template inline complex<_Tp> __complex_sin(const complex<_Tp>& __z) { const _Tp __x = __z.real(); const _Tp __y = __z.imag(); return complex<_Tp>(sin(__x) * cosh(__y), cos(__x) * sinh(__y)); } inline __complex__ float __complex_sin(__complex__ float __z) { return __builtin_csinf(__z); } inline __complex__ double __complex_sin(__complex__ double __z) { return __builtin_csin(__z); } inline __complex__ long double __complex_sin(const __complex__ long double& __z) { return __builtin_csinl(__z); } template inline complex<_Tp> sin(const complex<_Tp>& __z) { return __complex_sin(__z.__rep()); } template inline complex<_Tp> __complex_sinh(const complex<_Tp>& __z) { const _Tp __x = __z.real(); const _Tp __y = __z.imag(); return complex<_Tp>(sinh(__x) * cos(__y), cosh(__x) * sin(__y)); } inline __complex__ float __complex_sinh(__complex__ float __z) { return __builtin_csinhf(__z); } inline __complex__ double __complex_sinh(__complex__ double __z) { return __builtin_csinh(__z); } inline __complex__ long double __complex_sinh(const __complex__ long double& __z) { return __builtin_csinhl(__z); } template inline complex<_Tp> sinh(const complex<_Tp>& __z) { return __complex_sinh(__z.__rep()); } # 839 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/complex" 3 template complex<_Tp> __complex_sqrt(const complex<_Tp>& __z) { _Tp __x = __z.real(); _Tp __y = __z.imag(); if (__x == _Tp()) { _Tp __t = sqrt(abs(__y) / 2); return complex<_Tp>(__t, __y < _Tp() ? -__t : __t); } else { _Tp __t = sqrt(2 * (std::abs(__z) + abs(__x))); _Tp __u = __t / 2; return __x > _Tp() ? complex<_Tp>(__u, __y / __t) : complex<_Tp>(abs(__y) / __t, __y < _Tp() ? -__u : __u); } } inline __complex__ float __complex_sqrt(__complex__ float __z) { return __builtin_csqrtf(__z); } inline __complex__ double __complex_sqrt(__complex__ double __z) { return __builtin_csqrt(__z); } inline __complex__ long double __complex_sqrt(const __complex__ long double& __z) { return __builtin_csqrtl(__z); } template inline complex<_Tp> sqrt(const complex<_Tp>& __z) { return __complex_sqrt(__z.__rep()); } # 883 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/complex" 3 template inline complex<_Tp> __complex_tan(const complex<_Tp>& __z) { return std::sin(__z) / std::cos(__z); } inline __complex__ float __complex_tan(__complex__ float __z) { return __builtin_ctanf(__z); } inline __complex__ double __complex_tan(__complex__ double __z) { return __builtin_ctan(__z); } inline __complex__ long double __complex_tan(const __complex__ long double& __z) { return __builtin_ctanl(__z); } template inline complex<_Tp> tan(const complex<_Tp>& __z) { return __complex_tan(__z.__rep()); } # 911 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/complex" 3 template inline complex<_Tp> __complex_tanh(const complex<_Tp>& __z) { return std::sinh(__z) / std::cosh(__z); } inline __complex__ float __complex_tanh(__complex__ float __z) { return __builtin_ctanhf(__z); } inline __complex__ double __complex_tanh(__complex__ double __z) { return __builtin_ctanh(__z); } inline __complex__ long double __complex_tanh(const __complex__ long double& __z) { return __builtin_ctanhl(__z); } template inline complex<_Tp> tanh(const complex<_Tp>& __z) { return __complex_tanh(__z.__rep()); } # 940 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/complex" 3 template inline complex<_Tp> pow(const complex<_Tp>& __z, int __n) { return std::__pow_helper(__z, __n); } template complex<_Tp> pow(const complex<_Tp>& __x, const _Tp& __y) { if (__x.imag() == _Tp() && __x.real() > _Tp()) return pow(__x.real(), __y); complex<_Tp> __t = std::log(__x); return std::polar(exp(__y * __t.real()), __y * __t.imag()); } template inline complex<_Tp> __complex_pow(const complex<_Tp>& __x, const complex<_Tp>& __y) { return __x == _Tp() ? _Tp() : std::exp(__y * std::log(__x)); } inline __complex__ float __complex_pow(__complex__ float __x, __complex__ float __y) { return __builtin_cpowf(__x, __y); } inline __complex__ double __complex_pow(__complex__ double __x, __complex__ double __y) { return __builtin_cpow(__x, __y); } inline __complex__ long double __complex_pow(const __complex__ long double& __x, const __complex__ long double& __y) { return __builtin_cpowl(__x, __y); } template inline complex<_Tp> pow(const complex<_Tp>& __x, const complex<_Tp>& __y) { return __complex_pow(__x.__rep(), __y.__rep()); } template inline complex<_Tp> pow(const _Tp& __x, const complex<_Tp>& __y) { return __x > _Tp() ? std::polar(pow(__x, __y.real()), __y.imag() * log(__x)) : std::pow(complex<_Tp>(__x, _Tp()), __y); } template<> struct complex { typedef float value_type; typedef __complex__ float _ComplexT; complex(_ComplexT __z) : _M_value(__z) { } complex(float = 0.0f, float = 0.0f); explicit complex(const complex&); explicit complex(const complex&); float& real(); const float& real() const; float& imag(); const float& imag() const; complex& operator=(float); complex& operator+=(float); complex& operator-=(float); complex& operator*=(float); complex& operator/=(float); template complex&operator=(const complex<_Tp>&); template complex& operator+=(const complex<_Tp>&); template complex& operator-=(const complex<_Tp>&); template complex& operator*=(const complex<_Tp>&); template complex&operator/=(const complex<_Tp>&); const _ComplexT& __rep() const { return _M_value; } private: _ComplexT _M_value; }; inline float& complex::real() { return __real__ _M_value; } inline const float& complex::real() const { return __real__ _M_value; } inline float& complex::imag() { return __imag__ _M_value; } inline const float& complex::imag() const { return __imag__ _M_value; } inline complex::complex(float r, float i) { __real__ _M_value = r; __imag__ _M_value = i; } inline complex& complex::operator=(float __f) { __real__ _M_value = __f; __imag__ _M_value = 0.0f; return *this; } inline complex& complex::operator+=(float __f) { __real__ _M_value += __f; return *this; } inline complex& complex::operator-=(float __f) { __real__ _M_value -= __f; return *this; } inline complex& complex::operator*=(float __f) { _M_value *= __f; return *this; } inline complex& complex::operator/=(float __f) { _M_value /= __f; return *this; } template inline complex& complex::operator=(const complex<_Tp>& __z) { __real__ _M_value = __z.real(); __imag__ _M_value = __z.imag(); return *this; } template inline complex& complex::operator+=(const complex<_Tp>& __z) { __real__ _M_value += __z.real(); __imag__ _M_value += __z.imag(); return *this; } template inline complex& complex::operator-=(const complex<_Tp>& __z) { __real__ _M_value -= __z.real(); __imag__ _M_value -= __z.imag(); return *this; } template inline complex& complex::operator*=(const complex<_Tp>& __z) { _ComplexT __t; __real__ __t = __z.real(); __imag__ __t = __z.imag(); _M_value *= __t; return *this; } template inline complex& complex::operator/=(const complex<_Tp>& __z) { _ComplexT __t; __real__ __t = __z.real(); __imag__ __t = __z.imag(); _M_value /= __t; return *this; } template<> struct complex { typedef double value_type; typedef __complex__ double _ComplexT; complex(_ComplexT __z) : _M_value(__z) { } complex(double = 0.0, double = 0.0); complex(const complex&); explicit complex(const complex&); double& real(); const double& real() const; double& imag(); const double& imag() const; complex& operator=(double); complex& operator+=(double); complex& operator-=(double); complex& operator*=(double); complex& operator/=(double); template complex& operator=(const complex<_Tp>&); template complex& operator+=(const complex<_Tp>&); template complex& operator-=(const complex<_Tp>&); template complex& operator*=(const complex<_Tp>&); template complex& operator/=(const complex<_Tp>&); const _ComplexT& __rep() const { return _M_value; } private: _ComplexT _M_value; }; inline double& complex::real() { return __real__ _M_value; } inline const double& complex::real() const { return __real__ _M_value; } inline double& complex::imag() { return __imag__ _M_value; } inline const double& complex::imag() const { return __imag__ _M_value; } inline complex::complex(double __r, double __i) { __real__ _M_value = __r; __imag__ _M_value = __i; } inline complex& complex::operator=(double __d) { __real__ _M_value = __d; __imag__ _M_value = 0.0; return *this; } inline complex& complex::operator+=(double __d) { __real__ _M_value += __d; return *this; } inline complex& complex::operator-=(double __d) { __real__ _M_value -= __d; return *this; } inline complex& complex::operator*=(double __d) { _M_value *= __d; return *this; } inline complex& complex::operator/=(double __d) { _M_value /= __d; return *this; } template inline complex& complex::operator=(const complex<_Tp>& __z) { __real__ _M_value = __z.real(); __imag__ _M_value = __z.imag(); return *this; } template inline complex& complex::operator+=(const complex<_Tp>& __z) { __real__ _M_value += __z.real(); __imag__ _M_value += __z.imag(); return *this; } template inline complex& complex::operator-=(const complex<_Tp>& __z) { __real__ _M_value -= __z.real(); __imag__ _M_value -= __z.imag(); return *this; } template inline complex& complex::operator*=(const complex<_Tp>& __z) { _ComplexT __t; __real__ __t = __z.real(); __imag__ __t = __z.imag(); _M_value *= __t; return *this; } template inline complex& complex::operator/=(const complex<_Tp>& __z) { _ComplexT __t; __real__ __t = __z.real(); __imag__ __t = __z.imag(); _M_value /= __t; return *this; } template<> struct complex { typedef long double value_type; typedef __complex__ long double _ComplexT; complex(_ComplexT __z) : _M_value(__z) { } complex(long double = 0.0L, long double = 0.0L); complex(const complex&); complex(const complex&); long double& real(); const long double& real() const; long double& imag(); const long double& imag() const; complex& operator= (long double); complex& operator+= (long double); complex& operator-= (long double); complex& operator*= (long double); complex& operator/= (long double); template complex& operator=(const complex<_Tp>&); template complex& operator+=(const complex<_Tp>&); template complex& operator-=(const complex<_Tp>&); template complex& operator*=(const complex<_Tp>&); template complex& operator/=(const complex<_Tp>&); const _ComplexT& __rep() const { return _M_value; } private: _ComplexT _M_value; }; inline complex::complex(long double __r, long double __i) { __real__ _M_value = __r; __imag__ _M_value = __i; } inline long double& complex::real() { return __real__ _M_value; } inline const long double& complex::real() const { return __real__ _M_value; } inline long double& complex::imag() { return __imag__ _M_value; } inline const long double& complex::imag() const { return __imag__ _M_value; } inline complex& complex::operator=(long double __r) { __real__ _M_value = __r; __imag__ _M_value = 0.0L; return *this; } inline complex& complex::operator+=(long double __r) { __real__ _M_value += __r; return *this; } inline complex& complex::operator-=(long double __r) { __real__ _M_value -= __r; return *this; } inline complex& complex::operator*=(long double __r) { _M_value *= __r; return *this; } inline complex& complex::operator/=(long double __r) { _M_value /= __r; return *this; } template inline complex& complex::operator=(const complex<_Tp>& __z) { __real__ _M_value = __z.real(); __imag__ _M_value = __z.imag(); return *this; } template inline complex& complex::operator+=(const complex<_Tp>& __z) { __real__ _M_value += __z.real(); __imag__ _M_value += __z.imag(); return *this; } template inline complex& complex::operator-=(const complex<_Tp>& __z) { __real__ _M_value -= __z.real(); __imag__ _M_value -= __z.imag(); return *this; } template inline complex& complex::operator*=(const complex<_Tp>& __z) { _ComplexT __t; __real__ __t = __z.real(); __imag__ __t = __z.imag(); _M_value *= __t; return *this; } template inline complex& complex::operator/=(const complex<_Tp>& __z) { _ComplexT __t; __real__ __t = __z.real(); __imag__ __t = __z.imag(); _M_value /= __t; return *this; } inline complex::complex(const complex& __z) : _M_value(__z.__rep()) { } inline complex::complex(const complex& __z) : _M_value(__z.__rep()) { } inline complex::complex(const complex& __z) : _M_value(__z.__rep()) { } inline complex::complex(const complex& __z) : _M_value(__z.__rep()) { } inline complex::complex(const complex& __z) : _M_value(__z.__rep()) { } inline complex::complex(const complex& __z) : _M_value(__z.__rep()) { } } # 47 "../include/vigra/numerictraits.hxx" 2 # 1 "../include/vigra/sized_int.hxx" 1 # 41 "../include/vigra/sized_int.hxx" # 1 "../include/vigra/metaprogramming.hxx" 1 # 42 "../include/vigra/sized_int.hxx" 2 namespace vigra { class Int_type_not_supported_on_this_platform {}; namespace detail { template struct IntTypeList { enum { size = sizeof(T)*8 }; typedef T type; typedef NEXT next; }; template struct SelectIntegerType { typedef typename IfBool<(SIZE == LIST::size), typename LIST::type, typename SelectIntegerType::type >::type type; }; template struct SelectIntegerType { typedef Int_type_not_supported_on_this_platform type; }; template struct SelectBiggestIntegerType { enum { cursize = LIST::size, nextsize = SelectBiggestIntegerType::size, size = (cursize < nextsize) ? nextsize : cursize }; typedef typename IfBool<(cursize < nextsize), typename SelectBiggestIntegerType::type, typename LIST::type>::type type; }; template<> struct SelectBiggestIntegerType { enum { size = 0 }; typedef Int_type_not_supported_on_this_platform type; }; typedef IntTypeList > > > > SignedIntTypes; typedef IntTypeList > > > > UnsignedIntTypes; } # 123 "../include/vigra/sized_int.hxx" typedef detail::SelectIntegerType<8, detail::SignedIntTypes>::type Int8; typedef detail::SelectIntegerType<16, detail::SignedIntTypes>::type Int16; typedef detail::SelectIntegerType<32, detail::SignedIntTypes>::type Int32; typedef detail::SelectIntegerType<64, detail::SignedIntTypes>::type Int64; typedef detail::SelectIntegerType<8, detail::UnsignedIntTypes>::type UInt8; typedef detail::SelectIntegerType<16, detail::UnsignedIntTypes>::type UInt16; typedef detail::SelectIntegerType<32, detail::UnsignedIntTypes>::type UInt32; typedef detail::SelectIntegerType<64, detail::UnsignedIntTypes>::type UInt64; typedef detail::SelectBiggestIntegerType::type IntBiggest; typedef detail::SelectBiggestIntegerType::type UIntBiggest; # 162 "../include/vigra/sized_int.hxx" } # 49 "../include/vigra/numerictraits.hxx" 2 # 482 "../include/vigra/numerictraits.hxx" namespace vigra { struct Error_NumericTraits_not_specialized_for_this_case { }; struct Error_NumericTraits_char_is_not_a_numeric_type__use_signed_char_or_unsigned_char { }; template struct NumericTraits { typedef Error_NumericTraits_not_specialized_for_this_case Type; typedef Error_NumericTraits_not_specialized_for_this_case Promote; typedef Error_NumericTraits_not_specialized_for_this_case RealPromote; typedef Error_NumericTraits_not_specialized_for_this_case ComplexPromote; typedef Error_NumericTraits_not_specialized_for_this_case ValueType; typedef Error_NumericTraits_not_specialized_for_this_case isScalar; typedef Error_NumericTraits_not_specialized_for_this_case isIntegral; typedef Error_NumericTraits_not_specialized_for_this_case isSigned; typedef Error_NumericTraits_not_specialized_for_this_case isOrdered; typedef Error_NumericTraits_not_specialized_for_this_case isComplex; }; template<> struct NumericTraits { typedef Error_NumericTraits_char_is_not_a_numeric_type__use_signed_char_or_unsigned_char Type; typedef Error_NumericTraits_char_is_not_a_numeric_type__use_signed_char_or_unsigned_char Promote; typedef Error_NumericTraits_char_is_not_a_numeric_type__use_signed_char_or_unsigned_char RealPromote; typedef Error_NumericTraits_char_is_not_a_numeric_type__use_signed_char_or_unsigned_char ComplexPromote; typedef Error_NumericTraits_char_is_not_a_numeric_type__use_signed_char_or_unsigned_char ValueType; typedef Error_NumericTraits_char_is_not_a_numeric_type__use_signed_char_or_unsigned_char isScalar; typedef Error_NumericTraits_char_is_not_a_numeric_type__use_signed_char_or_unsigned_char isIntegral; typedef Error_NumericTraits_char_is_not_a_numeric_type__use_signed_char_or_unsigned_char isSigned; typedef Error_NumericTraits_char_is_not_a_numeric_type__use_signed_char_or_unsigned_char isOrdered; typedef Error_NumericTraits_char_is_not_a_numeric_type__use_signed_char_or_unsigned_char isComplex; }; template<> struct NumericTraits { typedef bool Type; typedef int Promote; typedef double RealPromote; typedef std::complex ComplexPromote; typedef Type ValueType; typedef VigraTrueType isIntegral; typedef VigraTrueType isScalar; typedef VigraFalseType isSigned; typedef VigraTrueType isOrdered; typedef VigraFalseType isComplex; static bool zero() { return false; } static bool one() { return true; } static bool nonZero() { return true; } static bool min() { return false; } static bool max() { return true; } static const bool minConst = false; static const bool maxConst = true; static Promote toPromote(bool v) { return v ? 1 : 0; } static RealPromote toRealPromote(bool v) { return v ? 1.0 : 0.0; } static bool fromPromote(Promote v) { return (v == 0) ? false : true; } static bool fromRealPromote(RealPromote v) { return (v == 0.0) ? false : true; } }; template<> struct NumericTraits { typedef signed char Type; typedef int Promote; typedef double RealPromote; typedef std::complex ComplexPromote; typedef Type ValueType; typedef VigraTrueType isIntegral; typedef VigraTrueType isScalar; typedef VigraTrueType isSigned; typedef VigraTrueType isOrdered; typedef VigraFalseType isComplex; static signed char zero() { return 0; } static signed char one() { return 1; } static signed char nonZero() { return 1; } static signed char min() { return (-127 - 1); } static signed char max() { return 127; } static const signed char minConst = (-127 - 1); static const signed char maxConst = (-127 - 1); static Promote toPromote(signed char v) { return v; } static RealPromote toRealPromote(signed char v) { return v; } static signed char fromPromote(Promote v) { return ((v < (-127 - 1)) ? (-127 - 1) : (v > 127) ? 127 : v); } static signed char fromRealPromote(RealPromote v) { return (v < (RealPromote)(-127 - 1)) ? (-127 - 1) : (v > (RealPromote)127) ? 127 : static_cast(lrint(v)); } }; template<> struct NumericTraits { typedef unsigned char Type; typedef int Promote; typedef double RealPromote; typedef std::complex ComplexPromote; typedef Type ValueType; typedef VigraTrueType isIntegral; typedef VigraTrueType isScalar; typedef VigraFalseType isSigned; typedef VigraTrueType isOrdered; typedef VigraFalseType isComplex; static unsigned char zero() { return 0; } static unsigned char one() { return 1; } static unsigned char nonZero() { return 1; } static unsigned char min() { return 0; } static unsigned char max() { return (127 * 2 + 1); } static const unsigned char minConst = 0; static const unsigned char maxConst = (127 * 2 + 1); static Promote toPromote(unsigned char v) { return v; } static RealPromote toRealPromote(unsigned char v) { return v; } static unsigned char fromPromote(Promote const & v) { return ((v < 0) ? 0 : (v > (127 * 2 + 1)) ? (127 * 2 + 1) : v); } static unsigned char fromRealPromote(RealPromote const & v) { return (v < 0.0) ? 0 : (v > (RealPromote)(127 * 2 + 1)) ? (127 * 2 + 1) : static_cast(lrint(v)); } }; template<> struct NumericTraits { typedef short int Type; typedef int Promote; typedef double RealPromote; typedef std::complex ComplexPromote; typedef Type ValueType; typedef VigraTrueType isIntegral; typedef VigraTrueType isScalar; typedef VigraTrueType isSigned; typedef VigraTrueType isOrdered; typedef VigraFalseType isComplex; static short int zero() { return 0; } static short int one() { return 1; } static short int nonZero() { return 1; } static short int min() { return (-32767 - 1); } static short int max() { return 32767; } static const short int minConst = (-32767 - 1); static const short int maxConst = 32767; static Promote toPromote(short int v) { return v; } static RealPromote toRealPromote(short int v) { return v; } static short int fromPromote(Promote v) { return ((v < (-32767 - 1)) ? (-32767 - 1) : (v > 32767) ? 32767 : v); } static short int fromRealPromote(RealPromote v) { return (v < (RealPromote)(-32767 - 1)) ? (-32767 - 1) : (v > (RealPromote)32767) ? 32767 : static_cast(lrint(v)); } }; template<> struct NumericTraits { typedef short unsigned int Type; typedef int Promote; typedef double RealPromote; typedef std::complex ComplexPromote; typedef Type ValueType; typedef VigraTrueType isIntegral; typedef VigraTrueType isScalar; typedef VigraFalseType isSigned; typedef VigraTrueType isOrdered; typedef VigraFalseType isComplex; static short unsigned int zero() { return 0; } static short unsigned int one() { return 1; } static short unsigned int nonZero() { return 1; } static short unsigned int min() { return 0; } static short unsigned int max() { return (32767 * 2 + 1); } static const short unsigned int minConst = 0; static const short unsigned int maxConst = (32767 * 2 + 1); static Promote toPromote(short unsigned int v) { return v; } static RealPromote toRealPromote(short unsigned int v) { return v; } static short unsigned int fromPromote(Promote v) { return ((v < 0) ? 0 : (v > (32767 * 2 + 1)) ? (32767 * 2 + 1) : v); } static short unsigned int fromRealPromote(RealPromote v) { return (v < 0.0) ? 0 : (v > (RealPromote)(32767 * 2 + 1)) ? (32767 * 2 + 1) : static_cast(lrint(v)); } }; template<> struct NumericTraits { typedef int Type; typedef int Promote; typedef double RealPromote; typedef std::complex ComplexPromote; typedef Type ValueType; typedef VigraTrueType isIntegral; typedef VigraTrueType isScalar; typedef VigraTrueType isSigned; typedef VigraTrueType isOrdered; typedef VigraFalseType isComplex; static int zero() { return 0; } static int one() { return 1; } static int nonZero() { return 1; } static int min() { return (-2147483647 - 1); } static int max() { return 2147483647; } static const int minConst = (-2147483647 - 1); static const int maxConst = 2147483647; static Promote toPromote(int v) { return v; } static RealPromote toRealPromote(int v) { return v; } static int fromPromote(Promote v) { return v; } static int fromRealPromote(RealPromote v) { return (v < (RealPromote)(-2147483647 - 1)) ? (-2147483647 - 1) : (v > (RealPromote)2147483647) ? 2147483647 : static_cast(lrint(v)); } }; template<> struct NumericTraits { typedef unsigned int Type; typedef unsigned int Promote; typedef double RealPromote; typedef std::complex ComplexPromote; typedef Type ValueType; typedef VigraTrueType isIntegral; typedef VigraTrueType isScalar; typedef VigraFalseType isSigned; typedef VigraTrueType isOrdered; typedef VigraFalseType isComplex; static unsigned int zero() { return 0; } static unsigned int one() { return 1; } static unsigned int nonZero() { return 1; } static unsigned int min() { return 0; } static unsigned int max() { return (2147483647 * 2U + 1U); } static const unsigned int minConst = 0; static const unsigned int maxConst = (2147483647 * 2U + 1U); static Promote toPromote(unsigned int v) { return v; } static RealPromote toRealPromote(unsigned int v) { return v; } static unsigned int fromPromote(Promote v) { return v; } static unsigned int fromRealPromote(RealPromote v) { return (v < 0.0) ? 0 : (v > (RealPromote)(2147483647 * 2U + 1U)) ? (2147483647 * 2U + 1U) : static_cast(llrint(v)); } }; template<> struct NumericTraits { typedef long Type; typedef long Promote; typedef double RealPromote; typedef std::complex ComplexPromote; typedef Type ValueType; typedef VigraTrueType isIntegral; typedef VigraTrueType isScalar; typedef VigraTrueType isSigned; typedef VigraTrueType isOrdered; typedef VigraFalseType isComplex; static long zero() { return 0; } static long one() { return 1; } static long nonZero() { return 1; } static long min() { return (-2147483647L - 1L); } static long max() { return 2147483647L; } static const long minConst = (-2147483647L - 1L); static const long maxConst = 2147483647L; static Promote toPromote(long v) { return v; } static RealPromote toRealPromote(long v) { return v; } static long fromPromote(Promote v) { return v; } static long fromRealPromote(RealPromote v) { return (v < (RealPromote)(-2147483647L - 1L)) ? (-2147483647L - 1L) : (v > (RealPromote)2147483647L) ? 2147483647L : static_cast(lrint(v)); } }; template<> struct NumericTraits { typedef unsigned long Type; typedef unsigned long Promote; typedef double RealPromote; typedef std::complex ComplexPromote; typedef Type ValueType; typedef VigraTrueType isIntegral; typedef VigraTrueType isScalar; typedef VigraFalseType isSigned; typedef VigraTrueType isOrdered; typedef VigraFalseType isComplex; static unsigned long zero() { return 0; } static unsigned long one() { return 1; } static unsigned long nonZero() { return 1; } static unsigned long min() { return 0; } static unsigned long max() { return (2147483647L * 2UL + 1UL); } static const unsigned long minConst = 0; static const unsigned long maxConst = (2147483647L * 2UL + 1UL); static Promote toPromote(unsigned long v) { return v; } static RealPromote toRealPromote(unsigned long v) { return v; } static unsigned long fromPromote(Promote v) { return v; } static unsigned long fromRealPromote(RealPromote v) { return (v < 0.0) ? 0 : (v > (RealPromote)(2147483647L * 2UL + 1UL)) ? (2147483647L * 2UL + 1UL) : static_cast(llrint(v)); } }; # 1018 "../include/vigra/numerictraits.hxx" template<> struct NumericTraits { typedef float Type; typedef float Promote; typedef float RealPromote; typedef std::complex ComplexPromote; typedef Type ValueType; typedef VigraFalseType isIntegral; typedef VigraTrueType isScalar; typedef VigraTrueType isSigned; typedef VigraTrueType isOrdered; typedef VigraFalseType isComplex; static float zero() { return 0.0; } static float one() { return 1.0; } static float nonZero() { return 1.0; } static float epsilon() { return 1.19209290e-7F; } static float smallestPositive() { return 1.17549435e-38F; } static float min() { return -3.40282347e+38F; } static float max() { return 3.40282347e+38F; } static Promote toPromote(float v) { return v; } static RealPromote toRealPromote(float v) { return v; } static float fromPromote(Promote v) { return v; } static float fromRealPromote(RealPromote v) { return v; } }; template<> struct NumericTraits { typedef double Type; typedef double Promote; typedef double RealPromote; typedef std::complex ComplexPromote; typedef Type ValueType; typedef VigraFalseType isIntegral; typedef VigraTrueType isScalar; typedef VigraTrueType isSigned; typedef VigraTrueType isOrdered; typedef VigraFalseType isComplex; static double zero() { return 0.0; } static double one() { return 1.0; } static double nonZero() { return 1.0; } static double epsilon() { return 2.2204460492503131e-16; } static double smallestPositive() { return 2.2250738585072014e-308; } static double min() { return -1.7976931348623157e+308; } static double max() { return 1.7976931348623157e+308; } static Promote toPromote(double v) { return v; } static RealPromote toRealPromote(double v) { return v; } static double fromPromote(Promote v) { return v; } static double fromRealPromote(RealPromote v) { return v; } }; template<> struct NumericTraits { typedef long double Type; typedef long double Promote; typedef long double RealPromote; typedef std::complex ComplexPromote; typedef Type ValueType; typedef VigraFalseType isIntegral; typedef VigraTrueType isScalar; typedef VigraTrueType isSigned; typedef VigraTrueType isOrdered; typedef VigraFalseType isComplex; static long double zero() { return 0.0; } static long double one() { return 1.0; } static long double nonZero() { return 1.0; } static long double epsilon() { return 4.94065645841246544176568792868221e-324L; } static long double smallestPositive() { return 2.00416836000897277799610805135016e-292L; } static long double min() { return -1.79769313486231580793728971405301e+308L; } static long double max() { return 1.79769313486231580793728971405301e+308L; } static Promote toPromote(long double v) { return v; } static RealPromote toRealPromote(long double v) { return v; } static long double fromPromote(Promote v) { return v; } static long double fromRealPromote(RealPromote v) { return v; } }; template struct NumericTraits > { typedef std::complex Type; typedef std::complex::Promote> Promote; typedef std::complex::RealPromote> RealPromote; typedef std::complex ComplexPromote; typedef T ValueType; typedef VigraFalseType isIntegral; typedef VigraFalseType isScalar; typedef typename NumericTraits::isSigned isSigned; typedef VigraFalseType isOrdered; typedef VigraTrueType isComplex; static Type zero() { return Type(0.0); } static Type one() { return Type(1.0); } static Type nonZero() { return one(); } static Type epsilon() { return Type(NumericTraits::epsilon()); } static Type smallestPositive() { return Type(NumericTraits::smallestPositive()); } static Promote toPromote(Type const & v) { return v; } static Type fromPromote(Promote const & v) { return v; } static Type fromRealPromote(RealPromote v) { return Type(v); } }; # 1141 "../include/vigra/numerictraits.hxx" template struct SquareRootTraits { typedef T Type; typedef typename NumericTraits::RealPromote SquareRootResult; typedef typename NumericTraits::RealPromote SquareRootArgument; }; # 1156 "../include/vigra/numerictraits.hxx" struct Error_NormTraits_not_specialized_for_this_case { }; template struct NormTraits { typedef T Type; typedef typename T::SquaredNormType SquaredNormType; typedef typename SquareRootTraits::SquareRootResult NormType; }; # 1173 "../include/vigra/numerictraits.hxx" template <> struct NormTraits { typedef bool Type; typedef NumericTraits::Promote SquaredNormType; typedef bool NormType; }; template <> struct NormTraits { typedef signed char Type; typedef NumericTraits::Promote SquaredNormType; typedef signed char NormType; }; template <> struct NormTraits { typedef unsigned char Type; typedef NumericTraits::Promote SquaredNormType; typedef unsigned char NormType; }; template <> struct NormTraits { typedef short Type; typedef NumericTraits::Promote SquaredNormType; typedef short NormType; }; template <> struct NormTraits { typedef unsigned short Type; typedef NumericTraits::Promote SquaredNormType; typedef unsigned short NormType; }; template <> struct NormTraits { typedef int Type; typedef NumericTraits::Promote SquaredNormType; typedef int NormType; }; template <> struct NormTraits { typedef unsigned int Type; typedef NumericTraits::Promote SquaredNormType; typedef unsigned int NormType; }; template <> struct NormTraits { typedef long Type; typedef NumericTraits::Promote SquaredNormType; typedef long NormType; }; template <> struct NormTraits { typedef unsigned long Type; typedef NumericTraits::Promote SquaredNormType; typedef unsigned long NormType; }; template <> struct NormTraits { typedef float Type; typedef NumericTraits::Promote SquaredNormType; typedef float NormType; }; template <> struct NormTraits { typedef double Type; typedef NumericTraits::Promote SquaredNormType; typedef double NormType; }; template <> struct NormTraits { typedef long double Type; typedef NumericTraits::Promote SquaredNormType; typedef long double NormType; }; template struct NormTraits > { typedef std::complex Type; typedef typename NormTraits::SquaredNormType SquaredNormType; typedef typename SquareRootTraits::SquareRootResult NormType; }; # 1209 "../include/vigra/numerictraits.hxx" struct Error_PromoteTraits_not_specialized_for_this_case { }; template struct PromoteTraits { typedef Error_PromoteTraits_not_specialized_for_this_case Promote; }; template<> struct PromoteTraits { typedef int Promote; static Promote toPromote(signed char v) { return v; } }; template<> struct PromoteTraits { typedef int Promote; static Promote toPromote(signed char v) { return v; } static Promote toPromote(unsigned char v) { return v; } }; template<> struct PromoteTraits { typedef int Promote; static Promote toPromote(signed char v) { return v; } static Promote toPromote(short int v) { return v; } }; template<> struct PromoteTraits { typedef unsigned int Promote; static Promote toPromote(signed char v) { return v; } static Promote toPromote(short unsigned int v) { return v; } }; template<> struct PromoteTraits { typedef int Promote; static Promote toPromote(signed char v) { return v; } static Promote toPromote(int v) { return v; } }; template<> struct PromoteTraits { typedef unsigned int Promote; static Promote toPromote(signed char v) { return v; } static Promote toPromote(unsigned int v) { return v; } }; template<> struct PromoteTraits { typedef long Promote; static Promote toPromote(signed char v) { return v; } static Promote toPromote(long v) { return v; } }; template<> struct PromoteTraits { typedef unsigned long Promote; static Promote toPromote(signed char v) { return v; } static Promote toPromote(unsigned long v) { return v; } }; template<> struct PromoteTraits { typedef float Promote; static Promote toPromote(signed char v) { return v; } static Promote toPromote(float v) { return v; } }; template<> struct PromoteTraits { typedef double Promote; static Promote toPromote(signed char v) { return v; } static Promote toPromote(double v) { return v; } }; template<> struct PromoteTraits { typedef long double Promote; static Promote toPromote(signed char v) { return v; } static Promote toPromote(long double v) { return v; } }; template<> struct PromoteTraits { typedef int Promote; static Promote toPromote(unsigned char v) { return v; } static Promote toPromote(signed char v) { return v; } }; template<> struct PromoteTraits { typedef int Promote; static Promote toPromote(unsigned char v) { return v; } }; template<> struct PromoteTraits { typedef int Promote; static Promote toPromote(unsigned char v) { return v; } static Promote toPromote(short int v) { return v; } }; template<> struct PromoteTraits { typedef unsigned int Promote; static Promote toPromote(unsigned char v) { return v; } static Promote toPromote(short unsigned int v) { return v; } }; template<> struct PromoteTraits { typedef int Promote; static Promote toPromote(unsigned char v) { return v; } static Promote toPromote(int v) { return v; } }; template<> struct PromoteTraits { typedef unsigned int Promote; static Promote toPromote(unsigned char v) { return v; } static Promote toPromote(unsigned int v) { return v; } }; template<> struct PromoteTraits { typedef long Promote; static Promote toPromote(unsigned char v) { return v; } static Promote toPromote(long v) { return v; } }; template<> struct PromoteTraits { typedef unsigned long Promote; static Promote toPromote(unsigned char v) { return v; } static Promote toPromote(unsigned long v) { return v; } }; template<> struct PromoteTraits { typedef float Promote; static Promote toPromote(unsigned char v) { return v; } static Promote toPromote(float v) { return v; } }; template<> struct PromoteTraits { typedef double Promote; static Promote toPromote(unsigned char v) { return v; } static Promote toPromote(double v) { return v; } }; template<> struct PromoteTraits { typedef long double Promote; static Promote toPromote(unsigned char v) { return v; } static Promote toPromote(long double v) { return v; } }; template<> struct PromoteTraits { typedef int Promote; static Promote toPromote(short int v) { return v; } static Promote toPromote(signed char v) { return v; } }; template<> struct PromoteTraits { typedef int Promote; static Promote toPromote(short int v) { return v; } static Promote toPromote(unsigned char v) { return v; } }; template<> struct PromoteTraits { typedef int Promote; static Promote toPromote(short int v) { return v; } }; template<> struct PromoteTraits { typedef unsigned int Promote; static Promote toPromote(short int v) { return v; } static Promote toPromote(short unsigned int v) { return v; } }; template<> struct PromoteTraits { typedef int Promote; static Promote toPromote(short int v) { return v; } static Promote toPromote(int v) { return v; } }; template<> struct PromoteTraits { typedef unsigned int Promote; static Promote toPromote(short int v) { return v; } static Promote toPromote(unsigned int v) { return v; } }; template<> struct PromoteTraits { typedef long Promote; static Promote toPromote(short int v) { return v; } static Promote toPromote(long v) { return v; } }; template<> struct PromoteTraits { typedef unsigned long Promote; static Promote toPromote(short int v) { return v; } static Promote toPromote(unsigned long v) { return v; } }; template<> struct PromoteTraits { typedef float Promote; static Promote toPromote(short int v) { return v; } static Promote toPromote(float v) { return v; } }; template<> struct PromoteTraits { typedef double Promote; static Promote toPromote(short int v) { return v; } static Promote toPromote(double v) { return v; } }; template<> struct PromoteTraits { typedef long double Promote; static Promote toPromote(short int v) { return v; } static Promote toPromote(long double v) { return v; } }; template<> struct PromoteTraits { typedef unsigned int Promote; static Promote toPromote(short unsigned int v) { return v; } static Promote toPromote(signed char v) { return v; } }; template<> struct PromoteTraits { typedef unsigned int Promote; static Promote toPromote(short unsigned int v) { return v; } static Promote toPromote(unsigned char v) { return v; } }; template<> struct PromoteTraits { typedef unsigned int Promote; static Promote toPromote(short unsigned int v) { return v; } static Promote toPromote(short int v) { return v; } }; template<> struct PromoteTraits { typedef unsigned int Promote; static Promote toPromote(short unsigned int v) { return v; } }; template<> struct PromoteTraits { typedef unsigned int Promote; static Promote toPromote(short unsigned int v) { return v; } static Promote toPromote(int v) { return v; } }; template<> struct PromoteTraits { typedef unsigned int Promote; static Promote toPromote(short unsigned int v) { return v; } static Promote toPromote(unsigned int v) { return v; } }; template<> struct PromoteTraits { typedef long Promote; static Promote toPromote(short unsigned int v) { return v; } static Promote toPromote(long v) { return v; } }; template<> struct PromoteTraits { typedef unsigned long Promote; static Promote toPromote(short unsigned int v) { return v; } static Promote toPromote(unsigned long v) { return v; } }; template<> struct PromoteTraits { typedef float Promote; static Promote toPromote(short unsigned int v) { return v; } static Promote toPromote(float v) { return v; } }; template<> struct PromoteTraits { typedef double Promote; static Promote toPromote(short unsigned int v) { return v; } static Promote toPromote(double v) { return v; } }; template<> struct PromoteTraits { typedef long double Promote; static Promote toPromote(short unsigned int v) { return v; } static Promote toPromote(long double v) { return v; } }; template<> struct PromoteTraits { typedef int Promote; static Promote toPromote(int v) { return v; } static Promote toPromote(signed char v) { return v; } }; template<> struct PromoteTraits { typedef int Promote; static Promote toPromote(int v) { return v; } static Promote toPromote(unsigned char v) { return v; } }; template<> struct PromoteTraits { typedef int Promote; static Promote toPromote(int v) { return v; } static Promote toPromote(short int v) { return v; } }; template<> struct PromoteTraits { typedef unsigned int Promote; static Promote toPromote(int v) { return v; } static Promote toPromote(short unsigned int v) { return v; } }; template<> struct PromoteTraits { typedef int Promote; static Promote toPromote(int v) { return v; } }; template<> struct PromoteTraits { typedef unsigned int Promote; static Promote toPromote(int v) { return v; } static Promote toPromote(unsigned int v) { return v; } }; template<> struct PromoteTraits { typedef long Promote; static Promote toPromote(int v) { return v; } static Promote toPromote(long v) { return v; } }; template<> struct PromoteTraits { typedef unsigned long Promote; static Promote toPromote(int v) { return v; } static Promote toPromote(unsigned long v) { return v; } }; template<> struct PromoteTraits { typedef float Promote; static Promote toPromote(int v) { return static_cast(v); } static Promote toPromote(float v) { return v; } }; template<> struct PromoteTraits { typedef double Promote; static Promote toPromote(int v) { return v; } static Promote toPromote(double v) { return v; } }; template<> struct PromoteTraits { typedef long double Promote; static Promote toPromote(int v) { return v; } static Promote toPromote(long double v) { return v; } }; template<> struct PromoteTraits { typedef unsigned int Promote; static Promote toPromote(unsigned int v) { return v; } static Promote toPromote(signed char v) { return v; } }; template<> struct PromoteTraits { typedef unsigned int Promote; static Promote toPromote(unsigned int v) { return v; } static Promote toPromote(unsigned char v) { return v; } }; template<> struct PromoteTraits { typedef unsigned int Promote; static Promote toPromote(unsigned int v) { return v; } static Promote toPromote(short int v) { return v; } }; template<> struct PromoteTraits { typedef unsigned int Promote; static Promote toPromote(unsigned int v) { return v; } static Promote toPromote(short unsigned int v) { return v; } }; template<> struct PromoteTraits { typedef unsigned int Promote; static Promote toPromote(unsigned int v) { return v; } static Promote toPromote(int v) { return v; } }; template<> struct PromoteTraits { typedef unsigned int Promote; static Promote toPromote(unsigned int v) { return v; } }; template<> struct PromoteTraits { typedef long Promote; static Promote toPromote(unsigned int v) { return v; } static Promote toPromote(long v) { return v; } }; template<> struct PromoteTraits { typedef unsigned long Promote; static Promote toPromote(unsigned int v) { return v; } static Promote toPromote(unsigned long v) { return v; } }; template<> struct PromoteTraits { typedef float Promote; static Promote toPromote(unsigned int v) { return static_cast(v); } static Promote toPromote(float v) { return v; } }; template<> struct PromoteTraits { typedef double Promote; static Promote toPromote(unsigned int v) { return v; } static Promote toPromote(double v) { return v; } }; template<> struct PromoteTraits { typedef long double Promote; static Promote toPromote(unsigned int v) { return v; } static Promote toPromote(long double v) { return v; } }; template<> struct PromoteTraits { typedef long Promote; static Promote toPromote(long v) { return v; } static Promote toPromote(signed char v) { return v; } }; template<> struct PromoteTraits { typedef long Promote; static Promote toPromote(long v) { return v; } static Promote toPromote(unsigned char v) { return v; } }; template<> struct PromoteTraits { typedef long Promote; static Promote toPromote(long v) { return v; } static Promote toPromote(short int v) { return v; } }; template<> struct PromoteTraits { typedef long Promote; static Promote toPromote(long v) { return v; } static Promote toPromote(short unsigned int v) { return v; } }; template<> struct PromoteTraits { typedef long Promote; static Promote toPromote(long v) { return v; } static Promote toPromote(int v) { return v; } }; template<> struct PromoteTraits { typedef long Promote; static Promote toPromote(long v) { return v; } static Promote toPromote(unsigned int v) { return v; } }; template<> struct PromoteTraits { typedef long Promote; static Promote toPromote(long v) { return v; } }; template<> struct PromoteTraits { typedef unsigned long Promote; static Promote toPromote(long v) { return v; } static Promote toPromote(unsigned long v) { return v; } }; template<> struct PromoteTraits { typedef float Promote; static Promote toPromote(long v) { return static_cast(v); } static Promote toPromote(float v) { return v; } }; template<> struct PromoteTraits { typedef double Promote; static Promote toPromote(long v) { return v; } static Promote toPromote(double v) { return v; } }; template<> struct PromoteTraits { typedef long double Promote; static Promote toPromote(long v) { return v; } static Promote toPromote(long double v) { return v; } }; template<> struct PromoteTraits { typedef unsigned long Promote; static Promote toPromote(unsigned long v) { return v; } static Promote toPromote(signed char v) { return v; } }; template<> struct PromoteTraits { typedef unsigned long Promote; static Promote toPromote(unsigned long v) { return v; } static Promote toPromote(unsigned char v) { return v; } }; template<> struct PromoteTraits { typedef unsigned long Promote; static Promote toPromote(unsigned long v) { return v; } static Promote toPromote(short int v) { return v; } }; template<> struct PromoteTraits { typedef unsigned long Promote; static Promote toPromote(unsigned long v) { return v; } static Promote toPromote(short unsigned int v) { return v; } }; template<> struct PromoteTraits { typedef unsigned long Promote; static Promote toPromote(unsigned long v) { return v; } static Promote toPromote(int v) { return v; } }; template<> struct PromoteTraits { typedef unsigned long Promote; static Promote toPromote(unsigned long v) { return v; } static Promote toPromote(unsigned int v) { return v; } }; template<> struct PromoteTraits { typedef unsigned long Promote; static Promote toPromote(unsigned long v) { return v; } static Promote toPromote(long v) { return v; } }; template<> struct PromoteTraits { typedef unsigned long Promote; static Promote toPromote(unsigned long v) { return v; } }; template<> struct PromoteTraits { typedef float Promote; static Promote toPromote(unsigned long v) { return static_cast(v); } static Promote toPromote(float v) { return v; } }; template<> struct PromoteTraits { typedef double Promote; static Promote toPromote(unsigned long v) { return v; } static Promote toPromote(double v) { return v; } }; template<> struct PromoteTraits { typedef long double Promote; static Promote toPromote(unsigned long v) { return v; } static Promote toPromote(long double v) { return v; } }; template<> struct PromoteTraits { typedef float Promote; static Promote toPromote(float v) { return v; } static Promote toPromote(signed char v) { return v; } }; template<> struct PromoteTraits { typedef float Promote; static Promote toPromote(float v) { return v; } static Promote toPromote(unsigned char v) { return v; } }; template<> struct PromoteTraits { typedef float Promote; static Promote toPromote(float v) { return v; } static Promote toPromote(short int v) { return v; } }; template<> struct PromoteTraits { typedef float Promote; static Promote toPromote(float v) { return v; } static Promote toPromote(short unsigned int v) { return v; } }; template<> struct PromoteTraits { typedef float Promote; static Promote toPromote(float v) { return v; } static Promote toPromote(int v) { return static_cast(v); } }; template<> struct PromoteTraits { typedef float Promote; static Promote toPromote(float v) { return v; } static Promote toPromote(unsigned int v) { return static_cast(v); } }; template<> struct PromoteTraits { typedef float Promote; static Promote toPromote(float v) { return v; } static Promote toPromote(long v) { return static_cast(v); } }; template<> struct PromoteTraits { typedef float Promote; static Promote toPromote(float v) { return v; } static Promote toPromote(unsigned long v) { return static_cast(v); } }; template<> struct PromoteTraits { typedef float Promote; static Promote toPromote(float v) { return v; } }; template<> struct PromoteTraits { typedef double Promote; static Promote toPromote(float v) { return v; } static Promote toPromote(double v) { return v; } }; template<> struct PromoteTraits { typedef long double Promote; static Promote toPromote(float v) { return v; } static Promote toPromote(long double v) { return v; } }; template<> struct PromoteTraits { typedef double Promote; static Promote toPromote(double v) { return v; } static Promote toPromote(signed char v) { return v; } }; template<> struct PromoteTraits { typedef double Promote; static Promote toPromote(double v) { return v; } static Promote toPromote(unsigned char v) { return v; } }; template<> struct PromoteTraits { typedef double Promote; static Promote toPromote(double v) { return v; } static Promote toPromote(short int v) { return v; } }; template<> struct PromoteTraits { typedef double Promote; static Promote toPromote(double v) { return v; } static Promote toPromote(short unsigned int v) { return v; } }; template<> struct PromoteTraits { typedef double Promote; static Promote toPromote(double v) { return v; } static Promote toPromote(int v) { return v; } }; template<> struct PromoteTraits { typedef double Promote; static Promote toPromote(double v) { return v; } static Promote toPromote(unsigned int v) { return v; } }; template<> struct PromoteTraits { typedef double Promote; static Promote toPromote(double v) { return v; } static Promote toPromote(long v) { return v; } }; template<> struct PromoteTraits { typedef double Promote; static Promote toPromote(double v) { return v; } static Promote toPromote(unsigned long v) { return v; } }; template<> struct PromoteTraits { typedef double Promote; static Promote toPromote(double v) { return v; } static Promote toPromote(float v) { return v; } }; template<> struct PromoteTraits { typedef double Promote; static Promote toPromote(double v) { return v; } }; template<> struct PromoteTraits { typedef long double Promote; static Promote toPromote(double v) { return v; } static Promote toPromote(long double v) { return v; } }; template<> struct PromoteTraits { typedef long double Promote; static Promote toPromote(long double v) { return v; } static Promote toPromote(signed char v) { return v; } }; template<> struct PromoteTraits { typedef long double Promote; static Promote toPromote(long double v) { return v; } static Promote toPromote(unsigned char v) { return v; } }; template<> struct PromoteTraits { typedef long double Promote; static Promote toPromote(long double v) { return v; } static Promote toPromote(short int v) { return v; } }; template<> struct PromoteTraits { typedef long double Promote; static Promote toPromote(long double v) { return v; } static Promote toPromote(short unsigned int v) { return v; } }; template<> struct PromoteTraits { typedef long double Promote; static Promote toPromote(long double v) { return v; } static Promote toPromote(int v) { return v; } }; template<> struct PromoteTraits { typedef long double Promote; static Promote toPromote(long double v) { return v; } static Promote toPromote(unsigned int v) { return v; } }; template<> struct PromoteTraits { typedef long double Promote; static Promote toPromote(long double v) { return v; } static Promote toPromote(long v) { return v; } }; template<> struct PromoteTraits { typedef long double Promote; static Promote toPromote(long double v) { return v; } static Promote toPromote(unsigned long v) { return v; } }; template<> struct PromoteTraits { typedef long double Promote; static Promote toPromote(long double v) { return v; } static Promote toPromote(float v) { return v; } }; template<> struct PromoteTraits { typedef long double Promote; static Promote toPromote(long double v) { return v; } static Promote toPromote(double v) { return v; } }; template<> struct PromoteTraits { typedef long double Promote; static Promote toPromote(long double v) { return v; } }; template struct PromoteTraits, std::complex > { typedef std::complex::Promote> Promote; static Promote toPromote(std::complex const & v) { return v; } }; template struct PromoteTraits, std::complex > { typedef std::complex::Promote> Promote; static Promote toPromote(std::complex const & v) { return v; } static Promote toPromote(std::complex const & v) { return v; } }; template struct PromoteTraits, T2 > { typedef std::complex::Promote> Promote; static Promote toPromote(std::complex const & v) { return v; } static Promote toPromote(T2 const & v) { return Promote(v); } }; template struct PromoteTraits > { typedef std::complex::Promote> Promote; static Promote toPromote(T1 const & v) { return Promote(v); } static Promote toPromote(std::complex const & v) { return v; } }; namespace detail { template struct RequiresExplicitCast { template static U const & cast(U const & v) { return v; } }; # 2261 "../include/vigra/numerictraits.hxx" template <> struct RequiresExplicitCast { static signed char cast(float v) { return NumericTraits::fromRealPromote(v); } static signed char cast(double v) { return NumericTraits::fromRealPromote(v); } static signed char cast(signed char v) { return v; } template static signed char cast(U v) { return static_cast(v); } }; template <> struct RequiresExplicitCast { static unsigned char cast(float v) { return NumericTraits::fromRealPromote(v); } static unsigned char cast(double v) { return NumericTraits::fromRealPromote(v); } static unsigned char cast(unsigned char v) { return v; } template static unsigned char cast(U v) { return static_cast(v); } }; template <> struct RequiresExplicitCast { static short cast(float v) { return NumericTraits::fromRealPromote(v); } static short cast(double v) { return NumericTraits::fromRealPromote(v); } static short cast(short v) { return v; } template static short cast(U v) { return static_cast(v); } }; template <> struct RequiresExplicitCast { static unsigned short cast(float v) { return NumericTraits::fromRealPromote(v); } static unsigned short cast(double v) { return NumericTraits::fromRealPromote(v); } static unsigned short cast(unsigned short v) { return v; } template static unsigned short cast(U v) { return static_cast(v); } }; template <> struct RequiresExplicitCast { static int cast(float v) { return NumericTraits::fromRealPromote(v); } static int cast(double v) { return NumericTraits::fromRealPromote(v); } static int cast(int v) { return v; } template static int cast(U v) { return static_cast(v); } }; template <> struct RequiresExplicitCast { static unsigned int cast(float v) { return NumericTraits::fromRealPromote(v); } static unsigned int cast(double v) { return NumericTraits::fromRealPromote(v); } static unsigned int cast(unsigned int v) { return v; } template static unsigned int cast(U v) { return static_cast(v); } }; template <> struct RequiresExplicitCast { static long cast(float v) { return NumericTraits::fromRealPromote(v); } static long cast(double v) { return NumericTraits::fromRealPromote(v); } static long cast(long v) { return v; } template static long cast(U v) { return static_cast(v); } }; template <> struct RequiresExplicitCast { static unsigned long cast(float v) { return NumericTraits::fromRealPromote(v); } static unsigned long cast(double v) { return NumericTraits::fromRealPromote(v); } static unsigned long cast(unsigned long v) { return v; } template static unsigned long cast(U v) { return static_cast(v); } }; template <> struct RequiresExplicitCast { template static U cast(U v) { return v; } }; template <> struct RequiresExplicitCast { template static U cast(U v) { return v; } }; } } # 42 "../include/vigra/accessor.hxx" 2 namespace vigra { # 149 "../include/vigra/accessor.hxx" template class StandardAccessor { public: typedef VALUETYPE value_type; template VALUETYPE const & operator()(ITERATOR const & i) const { return *i; } VALUETYPE const & operator()(VALUETYPE const * i) const { return *i; } template VALUETYPE const & operator()(ITERATOR const & i, DIFFERENCE const & diff) const { return i[diff]; } template void set(V const & value, ITERATOR const & i) const { *i = detail::RequiresExplicitCast::cast(value); } template void set(V const & value, ITERATOR & i) const { *i = detail::RequiresExplicitCast::cast(value); } template void set(V const & value, ITERATOR const & i, DIFFERENCE const & diff) const { i[diff]= detail::RequiresExplicitCast::cast(value); } }; # 214 "../include/vigra/accessor.hxx" template class StandardValueAccessor { public: typedef VALUETYPE value_type; template VALUETYPE operator()(ITERATOR const & i) const { return detail::RequiresExplicitCast::cast(*i); } template VALUETYPE operator()(ITERATOR const & i, DIFFERENCE const & diff) const { return detail::RequiresExplicitCast::cast(i[diff]); } template void set(V value, ITERATOR const & i) const { *i = detail::RequiresExplicitCast::cast(value); } template void set(V value, ITERATOR & i) const { *i = detail::RequiresExplicitCast::cast(value); } template void set(V value, ITERATOR const & i, DIFFERENCE const & diff) const { i[diff]= detail::RequiresExplicitCast::cast(value); } }; # 285 "../include/vigra/accessor.hxx" template class StandardConstAccessor { public: typedef VALUETYPE value_type; template VALUETYPE const & operator()(ITERATOR const & i) const { return *i; } template VALUETYPE const & operator()(ITERATOR const & i, DIFFERENCE const & diff) const { return i[diff]; } }; # 323 "../include/vigra/accessor.hxx" template class StandardConstValueAccessor { public: typedef VALUETYPE value_type; template VALUETYPE operator()(ITERATOR const & i) const { return detail::RequiresExplicitCast::cast(*i); } template VALUETYPE operator()(ITERATOR const & i, DIFFERENCE const & diff) const { return detail::RequiresExplicitCast::cast(i[diff]); } }; # 381 "../include/vigra/accessor.hxx" template class VectorComponentAccessor { int index_; public: typedef typename VECTORTYPE::value_type value_type; VectorComponentAccessor(int index) : index_(index) {} template value_type const & operator()(ITERATOR const & i) const { return (*i)[index_]; } template value_type const & operator()(ITERATOR const & i, DIFFERENCE const & diff) const { return i[diff][index_]; } template void set(V const & value, ITERATOR const & i) const { (*i)[index_] = detail::RequiresExplicitCast::cast(value); } template void set(V const & value, ITERATOR const & i, DIFFERENCE const & diff) const { i[diff][index_]= detail::RequiresExplicitCast::cast(value); } void setIndex(int i) { index_ = i; } }; # 465 "../include/vigra/accessor.hxx" template class VectorComponentValueAccessor { int index_; public: typedef typename VECTORTYPE::value_type value_type; VectorComponentValueAccessor(int index) : index_(index) {} template value_type operator()(ITERATOR const & i) const { return detail::RequiresExplicitCast::cast((*i)[index_]); } template value_type operator()(ITERATOR const & i, DIFFERENCE const & diff) const { return detail::RequiresExplicitCast::cast(i[diff][index_]); } template void set(V value, ITERATOR const & i) const { (*i)[index_] = detail::RequiresExplicitCast::cast(value); } template void set(V value, ITERATOR const & i, DIFFERENCE const & diff) const { i[diff][index_]= detail::RequiresExplicitCast::cast(value); } void setIndex(int i) { index_ = i; } }; # 555 "../include/vigra/accessor.hxx" template class VectorElementAccessor { int index_; ACCESSOR a_; public: typedef typename ACCESSOR::component_type value_type; VectorElementAccessor(int index, ACCESSOR a = ACCESSOR()) : index_(index), a_(a) {} template value_type const & operator()(ITERATOR const & i) const { return a_.getComponent(i, index_); } template value_type const & operator()(ITERATOR const & i, DIFFERENCE const & diff) const { return a_.getComponent(i, diff, index_); } template void set(V const & value, ITERATOR const & i) const { a_.setComponent(detail::RequiresExplicitCast::cast(value), i, index_); } template void set(V const & value, ITERATOR const & i, DIFFERENCE const & diff) const { a_.setComponent(detail::RequiresExplicitCast::cast(value), i, diff, index_); } void setIndex(int i) { index_ = i; } }; # 648 "../include/vigra/accessor.hxx" template class SequenceAccessor : public StandardAccessor { public: typedef typename SEQUENCE::value_type component_type; typedef typename If::isConst, typename SEQUENCE::const_iterator, typename SEQUENCE::iterator>::type iterator; # 671 "../include/vigra/accessor.hxx" template iterator begin(ITERATOR const & i) const { return (*i).begin(); } template iterator end(ITERATOR const & i) const { return (*i).end(); } template iterator begin(ITERATOR const & i, DIFFERENCE const & diff) const { return i[diff].begin(); } template iterator end(ITERATOR const & i, DIFFERENCE const & diff) const { return i[diff].end(); } template unsigned int size(ITERATOR const & i) const { return (*i).size(); } template unsigned int size(ITERATOR const & i, DIFFERENCE const & diff) const { return i[diff].size(); } }; # 787 "../include/vigra/accessor.hxx" template class VectorAccessor : public SequenceAccessor { public: typedef typename VECTOR::value_type component_type; template component_type const & getComponent(ITERATOR const & i, int idx) const { return (*i)[idx]; } template void setComponent(V const & value, ITERATOR const & i, int idx) const { (*i)[idx] = detail::RequiresExplicitCast::cast(value); } template component_type const & getComponent(ITERATOR const & i, DIFFERENCE const & diff, int idx) const { return i[diff][idx]; } template void setComponent(V const & value, ITERATOR const & i, DIFFERENCE const & diff, int idx) const { i[diff][idx] = detail::RequiresExplicitCast::cast(value); } }; # 882 "../include/vigra/accessor.hxx" template class MultiImageAccessor2 { public: typedef pair value_type; MultiImageAccessor2(Iter1 i1, Acc1 a1, Iter2 i2, Acc2 a2) : i1_(i1), a1_(a1), i2_(i2), a2_(a2) {} template value_type operator()(DIFFERENCE const & d) const { return std::make_pair(a1_(i1_, d), a2_(i2_, d)); } template value_type operator()(DIFFERENCE1 d1, DIFFERENCE2 const & d2) const { d1 += d2; return std::make_pair(a1_(i1_, d1), a2_(i2_, d1)); } private: Iter1 i1_; Acc1 a1_; Iter2 i2_; Acc2 a2_; }; template struct AccessorTraits { typedef StandardAccessor default_accessor; typedef StandardConstAccessor default_const_accessor; }; # 939 "../include/vigra/accessor.hxx" template <> struct AccessorTraits { typedef StandardValueAccessor default_accessor; typedef StandardConstValueAccessor default_const_accessor; }; template <> struct AccessorTraits { typedef StandardValueAccessor default_accessor; typedef StandardConstValueAccessor default_const_accessor; }; template <> struct AccessorTraits { typedef StandardValueAccessor default_accessor; typedef StandardConstValueAccessor default_const_accessor; }; template <> struct AccessorTraits { typedef StandardValueAccessor default_accessor; typedef StandardConstValueAccessor default_const_accessor; }; template <> struct AccessorTraits { typedef StandardValueAccessor default_accessor; typedef StandardConstValueAccessor default_const_accessor; }; template <> struct AccessorTraits { typedef StandardValueAccessor default_accessor; typedef StandardConstValueAccessor default_const_accessor; }; template <> struct AccessorTraits { typedef StandardValueAccessor default_accessor; typedef StandardConstValueAccessor default_const_accessor; }; template <> struct AccessorTraits { typedef StandardValueAccessor default_accessor; typedef StandardConstValueAccessor default_const_accessor; }; template <> struct AccessorTraits { typedef StandardValueAccessor default_accessor; typedef StandardConstValueAccessor default_const_accessor; }; template <> struct AccessorTraits { typedef StandardValueAccessor default_accessor; typedef StandardConstValueAccessor default_const_accessor; }; template class RGBValue; template class RGBAccessor; template class TinyVector; template struct AccessorTraits > { typedef RGBAccessor > default_accessor; typedef RGBAccessor > default_const_accessor; }; template struct AccessorTraits > { typedef VectorAccessor > default_accessor; typedef VectorAccessor > default_const_accessor; }; # 1033 "../include/vigra/accessor.hxx" } # 42 "../include/vigra/iteratortraits.hxx" 2 # 1 "../include/vigra/imageiteratoradapter.hxx" 1 # 43 "../include/vigra/imageiteratoradapter.hxx" namespace vigra { # 77 "../include/vigra/imageiteratoradapter.hxx" template class ColumnIterator : private IMAGE_ITERATOR { public: typedef typename IMAGE_ITERATOR::value_type value_type; typedef typename IMAGE_ITERATOR::value_type PixelType; typedef typename IMAGE_ITERATOR::reference reference; typedef typename IMAGE_ITERATOR::index_reference index_reference; typedef typename IMAGE_ITERATOR::pointer pointer; typedef typename IMAGE_ITERATOR::difference_type::MoveY difference_type; typedef std::random_access_iterator_tag iterator_category; typedef IMAGE_ITERATOR Adaptee; ColumnIterator(IMAGE_ITERATOR const & i) : IMAGE_ITERATOR(i) {} ColumnIterator & operator=(ColumnIterator const & i) { IMAGE_ITERATOR::operator=(i); return *this; } ColumnIterator & operator=(IMAGE_ITERATOR const & i) { IMAGE_ITERATOR::operator=(i); return *this; } ColumnIterator & operator++() { ++(this->y); return *this; } ColumnIterator operator++(int) { ColumnIterator ret(*this); (this->y)++; return ret; } ColumnIterator & operator--() { --(this->y); return *this; } ColumnIterator operator--(int) { ColumnIterator ret(*this); (this->y)--; return ret; } ColumnIterator & operator+=(int d) { this->y += d; return *this; } ColumnIterator & operator-=(int d) { this->y -= d; return *this; } ColumnIterator operator+(int d) const { IMAGE_ITERATOR ret(*this); ret.y += d; return ColumnIterator(ret); } ColumnIterator operator-(int d) const { IMAGE_ITERATOR ret(*this); ret.y -= d; return ColumnIterator(ret); } int operator-(ColumnIterator const & c) const { return this->y - c.y; } bool operator==(ColumnIterator const & c) const { return IMAGE_ITERATOR::operator==(c); } bool operator!=(ColumnIterator const & c) const { return IMAGE_ITERATOR::operator!=(c); } bool operator<(ColumnIterator const & c) const { return this->y < c.y; } reference operator*() const { return IMAGE_ITERATOR::operator*(); } index_reference operator[](int d) const { return IMAGE_ITERATOR::operator()(0, d); } pointer operator->() const { return IMAGE_ITERATOR::operator->(); } Adaptee & adaptee() const { return (Adaptee &)*this; } }; # 283 "../include/vigra/imageiteratoradapter.hxx" template class RowIterator : private IMAGE_ITERATOR { public: typedef typename IMAGE_ITERATOR::value_type value_type; typedef typename IMAGE_ITERATOR::value_type PixelType; typedef typename IMAGE_ITERATOR::reference reference; typedef typename IMAGE_ITERATOR::index_reference index_reference; typedef typename IMAGE_ITERATOR::pointer pointer; typedef typename IMAGE_ITERATOR::difference_type::MoveY difference_type; typedef std::random_access_iterator_tag iterator_category; typedef IMAGE_ITERATOR Adaptee; RowIterator(IMAGE_ITERATOR const & i) : IMAGE_ITERATOR(i) {} RowIterator & operator=(RowIterator const & i) { IMAGE_ITERATOR::operator=(i); return *this; } RowIterator & operator=(IMAGE_ITERATOR const & i) { IMAGE_ITERATOR::operator=(i); return *this; } RowIterator & operator++() { ++(this->x); return *this; } RowIterator operator++(int) { RowIterator ret(*this); (this->x)++; return ret; } RowIterator & operator--() { --(this->x); return *this; } RowIterator operator--(int) { RowIterator ret(*this); (this->x)--; return ret; } RowIterator & operator+=(int d) { this->x += d; return *this; } RowIterator & operator-=(int d) { this->x -= d; return *this; } RowIterator operator+(int d) const { IMAGE_ITERATOR ret(*this); ret.x += d; return RowIterator(ret); } RowIterator operator-(int d) const { IMAGE_ITERATOR ret(*this); ret.x -= d; return RowIterator(ret); } int operator-(RowIterator const & c) const { return this->x - c.x; } bool operator==(RowIterator const & c) const { return IMAGE_ITERATOR::operator==(c); } bool operator!=(RowIterator const & c) const { return IMAGE_ITERATOR::operator!=(c); } bool operator<(RowIterator const & c) const { return this->x < c.x; } reference operator*() const { return IMAGE_ITERATOR::operator*(); } index_reference operator[](int d) const { return IMAGE_ITERATOR::operator()(d, 0); } pointer operator->() const { return IMAGE_ITERATOR::operator->(); } Adaptee & adaptee() const { return (Adaptee &)*this; } }; # 482 "../include/vigra/imageiteratoradapter.hxx" template class LineIterator : private IMAGE_ITERATOR { public: typedef typename IMAGE_ITERATOR::value_type value_type; typedef typename IMAGE_ITERATOR::value_type PixelType; typedef typename IMAGE_ITERATOR::reference reference; typedef typename IMAGE_ITERATOR::pointer pointer; typedef std::forward_iterator_tag iterator_category; typedef IMAGE_ITERATOR Adaptee; LineIterator(IMAGE_ITERATOR const & start, IMAGE_ITERATOR const & end) : IMAGE_ITERATOR(start) { # 528 "../include/vigra/imageiteratoradapter.hxx" dy_ = end.y - start.y; dx_ = end.x - start.x; stepy_ = (dy_ < 0) ? -1 : 1; dy_ = std::abs(dy_) << 1; stepx_ = (dx_ < 0) ? -1 : 1; dx_ = std::abs(dx_) << 1; fraction_ = (dx_ > dy_) ? (dy_ - (dx_ >> 1)) : (dx_ - (dy_ >> 1)); # 557 "../include/vigra/imageiteratoradapter.hxx" } LineIterator & operator++() { # 583 "../include/vigra/imageiteratoradapter.hxx" if (dx_ > dy_) { if (fraction_ >= 0) { this->y += stepy_; fraction_ -= dx_; } this->x += stepx_; fraction_ += dy_; } else { if (fraction_ >= 0) { this->x += stepx_; fraction_ -= dy_; } this->y += stepy_; fraction_ += dx_; } return *this; } LineIterator operator++(int) { LineIterator ret(*this); operator++(); return ret; } bool operator==(LineIterator const & c) const { return IMAGE_ITERATOR::operator==(c); } bool operator==(IMAGE_ITERATOR const & c) const { return IMAGE_ITERATOR::operator==(c); } bool operator!=(LineIterator const & c) const { return IMAGE_ITERATOR::operator!=(c); } bool operator!=(IMAGE_ITERATOR const & c) const { return IMAGE_ITERATOR::operator!=(c); } reference operator*() const { return IMAGE_ITERATOR::operator*(); } pointer operator->() const { return IMAGE_ITERATOR::operator->(); } Adaptee & adaptee() const { return (Adaptee &)*this; } private: int dx_, dy_, fraction_, stepx_, stepy_; }; } # 43 "../include/vigra/iteratortraits.hxx" 2 namespace vigra { # 108 "../include/vigra/iteratortraits.hxx" template struct IteratorTraits { typedef T Iterator; typedef Iterator iterator; typedef typename iterator::iterator_category iterator_category; typedef typename iterator::value_type value_type; typedef typename iterator::reference reference; typedef typename iterator::index_reference index_reference; typedef typename iterator::pointer pointer; typedef typename iterator::difference_type difference_type; typedef typename iterator::row_iterator row_iterator; typedef typename iterator::column_iterator column_iterator; typedef typename AccessorTraits::default_accessor DefaultAccessor; typedef DefaultAccessor default_accessor; typedef VigraFalseType hasConstantStrides; }; template struct IteratorTraitsBase { typedef T Iterator; typedef Iterator iterator; typedef typename iterator::iterator_category iterator_category; typedef typename iterator::value_type value_type; typedef typename iterator::reference reference; typedef typename iterator::index_reference index_reference; typedef typename iterator::pointer pointer; typedef typename iterator::difference_type difference_type; typedef typename iterator::row_iterator row_iterator; typedef typename iterator::column_iterator column_iterator; }; # 555 "../include/vigra/iteratortraits.hxx" template inline triple srcIterRange(Iterator const & upperleft, Iterator const & lowerright, Accessor a) { return triple(upperleft, lowerright, a); } template inline pair srcIter(Iterator const & upperleft, Accessor a) { return pair(upperleft, a); } template inline pair maskIter(Iterator const & upperleft, Accessor a) { return pair(upperleft, a); } template inline pair destIter(Iterator const & upperleft, Accessor a) { return pair(upperleft, a); } template inline triple destIterRange(Iterator const & upperleft, Iterator const & lowerright, Accessor a) { return triple(upperleft, lowerright, a); } template inline pair::DefaultAccessor> srcIter(Iterator const & upperleft) { return pair::DefaultAccessor>( upperleft, typename IteratorTraits::DefaultAccessor()); } template inline triple::DefaultAccessor> srcIterRange(Iterator const & upperleft, Iterator const & lowerright) { return triple::DefaultAccessor>( upperleft, lowerright, typename IteratorTraits::DefaultAccessor()); } template inline pair::DefaultAccessor> maskIter(Iterator const & upperleft) { return pair::DefaultAccessor>( upperleft, typename IteratorTraits::DefaultAccessor()); } template inline pair::DefaultAccessor> destIter(Iterator const & upperleft) { return pair::DefaultAccessor>( upperleft, typename IteratorTraits::DefaultAccessor()); } template inline triple::DefaultAccessor> destIterRange(Iterator const & upperleft, Iterator const & lowerright) { return triple::DefaultAccessor>( upperleft, lowerright, typename IteratorTraits::DefaultAccessor()); } } # 45 "../include/vigra/diff2d.hxx" 2 # 1 "../include/vigra/iteratoradapter.hxx" 1 # 41 "../include/vigra/iteratoradapter.hxx" namespace vigra { # 148 "../include/vigra/iteratoradapter.hxx" template class IteratorAdaptor { public: typedef typename Policy::BaseType BaseType; typedef typename Policy::value_type value_type; typedef typename Policy::difference_type difference_type; typedef typename Policy::reference reference; typedef typename Policy::index_reference index_reference; typedef typename Policy::pointer pointer; typedef typename Policy::iterator_category iterator_category; IteratorAdaptor() : adaptee_() {} explicit IteratorAdaptor(BaseType const & o) : adaptee_(o) { Policy::initialize(adaptee_); } IteratorAdaptor(IteratorAdaptor const & o) : adaptee_(o.adaptee_) {} IteratorAdaptor & operator=(BaseType const & o) { if(this != &o) { adaptee_ = o; Policy::initialize(adaptee_); } return *this; } IteratorAdaptor & operator=(IteratorAdaptor const & o) { if(this != &o) adaptee_ = o.adaptee_; return *this; } IteratorAdaptor & operator+=(difference_type d) { Policy::advance(adaptee_, d); return *this; } IteratorAdaptor operator+(difference_type d) const { return IteratorAdaptor(*this) += d; } IteratorAdaptor & operator-=(difference_type d) { Policy::advance(adaptee_, -d); return *this; } IteratorAdaptor operator-(difference_type d) const { return IteratorAdaptor(*this) -= d; } IteratorAdaptor & operator++() { Policy::increment(adaptee_); return *this; } IteratorAdaptor operator++(int) { IteratorAdaptor res(*this); Policy::increment(adaptee_); return res; } IteratorAdaptor & operator--() { Policy::decrement(adaptee_); return *this; } IteratorAdaptor operator--(int) { IteratorAdaptor res(*this); Policy::decrement(adaptee_); return res; } bool operator==(IteratorAdaptor const & o) const { return Policy::equal(adaptee_, o.adaptee_); } bool operator!=(IteratorAdaptor const & o) const { return !Policy::equal(adaptee_, o.adaptee_); } bool operator<(IteratorAdaptor const & o) const { return Policy::less(adaptee_, o.adaptee_); } bool operator<=(IteratorAdaptor const & o) const { return !Policy::less(o.adaptee_, adaptee_); } bool operator>(IteratorAdaptor const & o) const { return Policy::less(o.adaptee_, adaptee_); } bool operator>=(IteratorAdaptor const & o) const { return !Policy::less(adaptee_, o.adaptee_); } difference_type operator-(IteratorAdaptor const & o) const { return Policy::difference(adaptee_, o.adaptee_); } reference operator*() const { return Policy::dereference(adaptee_); } index_reference operator[](difference_type d) const { return Policy::dereference(adaptee_, d); } pointer operator->() const { return &Policy::dereference(adaptee_); } protected: BaseType adaptee_; }; } # 46 "../include/vigra/diff2d.hxx" 2 namespace vigra { template class Diff2DConstRowIteratorPolicy { public: typedef Diff BaseType; typedef Diff value_type; typedef typename Diff::MoveX difference_type; typedef Diff const & reference; typedef Diff index_reference; typedef Diff const * pointer; typedef std::random_access_iterator_tag iterator_category; static void initialize(BaseType &) {} static reference dereference(BaseType const & d) { return d; } static index_reference dereference(BaseType d, difference_type n) { d.x += n; return d; } static bool equal(BaseType const & d1, BaseType const & d2) { return d1.x == d2.x; } static bool less(BaseType const & d1, BaseType const & d2) { return d1.x < d2.x; } static difference_type difference(BaseType const & d1, BaseType const & d2) { return d1.x - d2.x; } static void increment(BaseType & d) { ++d.x; } static void decrement(BaseType & d) { --d.x; } static void advance(BaseType & d, difference_type n) { d.x += n; } }; template class Diff2DConstColumnIteratorPolicy { public: typedef Diff BaseType; typedef Diff value_type; typedef typename Diff::MoveY difference_type; typedef Diff const & reference; typedef Diff index_reference; typedef Diff const * pointer; typedef std::random_access_iterator_tag iterator_category; static void initialize(BaseType & ) {} static reference dereference(BaseType const & d) { return d; } static index_reference dereference(BaseType d, difference_type n) { d.y += n; return d; } static bool equal(BaseType const & d1, BaseType const & d2) { return d1.y == d2.y; } static bool less(BaseType const & d1, BaseType const & d2) { return d1.y < d2.y; } static difference_type difference(BaseType const & d1, BaseType const & d2) { return d1.y - d2.y; } static void increment(BaseType & d) { ++d.y; } static void decrement(BaseType & d) { --d.y; } static void advance(BaseType & d, difference_type n) { d.y += n; } }; # 184 "../include/vigra/diff2d.hxx" class Diff2D { public: typedef Diff2D PixelType; typedef Diff2D value_type; typedef Diff2D const & reference; typedef Diff2D index_reference; typedef Diff2D const * pointer; typedef Diff2D difference_type; typedef image_traverser_tag iterator_category; typedef IteratorAdaptor > row_iterator; typedef IteratorAdaptor > column_iterator; typedef int MoveX; typedef int MoveY; Diff2D() : x(0), y(0) {} Diff2D(int ax, int ay) : x(ax), y(ay) {} Diff2D(Diff2D const & v) : x(v.x), y(v.y) {} Diff2D & operator=(Diff2D const & v) { if(this != &v) { x = v.x; y = v.y; } return *this; } Diff2D operator-() const { return Diff2D(-x, -y); } Diff2D & operator+=(Diff2D const & offset) { x += offset.x; y += offset.y; return *this; } Diff2D & operator-=(Diff2D const & offset) { x -= offset.x; y -= offset.y; return *this; } Diff2D & operator*=(int factor) { x *= factor; y *= factor; return *this; } Diff2D & operator*=(double factor) { x = (int)(x * factor); y = (int)(y * factor); return *this; } Diff2D & operator/=(int factor) { x /= factor; y /= factor; return *this; } Diff2D & operator/=(double factor) { x = (int)(x / factor); y = (int)(y / factor); return *this; } Diff2D operator*(int factor) const { return Diff2D(x * factor, y * factor); } Diff2D operator*(double factor) const { return Diff2D((int)(x * factor), (int)(y * factor)); } Diff2D operator/(int factor) const { return Diff2D(x / factor, y / factor); } Diff2D operator/(double factor) const { return Diff2D((int)(x / factor), (int)(y / factor)); } int squaredMagnitude() const { return x*x + y*y; } double magnitude() const { return std::sqrt((double)squaredMagnitude()); } bool operator==(Diff2D const & r) const { return (x == r.x) && (y == r.y); } bool operator!=(Diff2D const & r) const { return (x != r.x) || (y != r.y); } int x; int y; reference operator*() const { return *this; } index_reference operator()(int const & dx, int const & dy) const { return Diff2D(x + dx, y + dy); } index_reference operator[](Diff2D const & offset) const { return Diff2D(x + offset.x, y + offset.y); } int operator[](int index) const { return (&x)[index]; } pointer operator->() const { return this; } row_iterator rowIterator() const { return row_iterator(*this); } column_iterator columnIterator() const { return column_iterator(*this); } }; template <> struct IteratorTraits { typedef Diff2D Iterator; typedef Iterator iterator; typedef Iterator const_iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor DefaultAccessor; typedef StandardConstValueAccessor default_accessor; typedef VigraTrueType hasConstantStrides; }; # 482 "../include/vigra/diff2d.hxx" class Size2D : public Diff2D { public: Size2D() {} Size2D(int width, int height) : Diff2D(width, height) {} Size2D(Size2D const & v) : Diff2D(v) {} explicit Size2D(Diff2D const & v) : Diff2D(v) {} int width() const { return x; } int height() const { return y; } void setWidth(int w) { x = w; } void setHeight(int h) { y = h; } int area() const { return width()*height(); } Size2D & operator=(Diff2D const & v) { return static_cast(Diff2D::operator=(v)); } Size2D operator-() const { return Size2D(-x, -y); } Size2D & operator+=(Diff2D const & offset) { return static_cast(Diff2D::operator+=(offset)); } Size2D & operator-=(Diff2D const & offset) { return static_cast(Diff2D::operator-=(offset)); } }; # 592 "../include/vigra/diff2d.hxx" class Point2D : public Diff2D { public: typedef Point2D PixelType; typedef Point2D value_type; typedef Point2D const & reference; typedef Point2D index_reference; typedef Point2D const * pointer; Point2D() {} Point2D(int x, int y) : Diff2D(x, y) {} Point2D(Point2D const & v) : Diff2D(v) {} explicit Point2D(Diff2D const & v) : Diff2D(v) {} int px() const { return x; } int py() const { return y; } Point2D & operator=(Diff2D const & v) { return static_cast(Diff2D::operator=(v)); } Point2D operator-() const { return Point2D(-x, -y); } Point2D & operator+=(Diff2D const & offset) { return static_cast(Diff2D::operator+=(offset)); } Point2D & operator-=(Diff2D const & offset) { return static_cast(Diff2D::operator-=(offset)); } reference operator*() const { return *this; } index_reference operator()(int const & dx, int const & dy) const { return Point2D(x + dx, y + dy); } index_reference operator[](Diff2D const & offset) const { return Point2D(x + offset.x, y + offset.y); } pointer operator->() const { return this; } }; inline Diff2D operator-(Diff2D const &a, Diff2D const &b) { return Diff2D(a.x - b.x, a.y - b.y); } inline Size2D operator-(Size2D const & s, Diff2D const &offset) { return Size2D(s.x - offset.x, s.y - offset.y); } inline Point2D operator-(Point2D const & s, Diff2D const & offset) { return Point2D(s.x - offset.x, s.y - offset.y); } inline Size2D operator-(Point2D const & s, Point2D const & p) { return Size2D(s.x - p.x, s.y - p.y); } inline Diff2D operator+(Diff2D const &a, Diff2D const &b) { return Diff2D(a.x + b.x, a.y + b.y); } inline Size2D operator+(Size2D const &a, Diff2D const &b) { return Size2D(a.x + b.x, a.y + b.y); } inline Point2D operator+(Point2D const &a, Diff2D const &b) { return Point2D(a.x + b.x, a.y + b.y); } inline Point2D operator+(Size2D const & s, Point2D const & p) { return Point2D(s.x + p.x, s.y + p.y); } inline Point2D operator*(Point2D l, double r) { l *= r; return l; } inline Point2D operator*(double l, Point2D r) { r *= l; return r; } inline Size2D operator*(Size2D l, double r) { l *= r; return l; } inline Size2D operator*(double l, Size2D r) { r *= l; return r; } inline Point2D operator/(Point2D l, double r) { l /= r; return l; } inline Size2D operator/(Size2D l, double r) { l /= r; return l; } inline Point2D operator*(Point2D l, int r) { l *= r; return l; } inline Point2D operator*(int l, Point2D r) { r *= l; return r; } inline Size2D operator*(Size2D l, int r) { l *= r; return l; } inline Size2D operator*(int l, Size2D r) { r *= l; return r; } inline Point2D operator/(Point2D l, int r) { l /= r; return l; } inline Size2D operator/(Size2D l, int r) { l /= r; return l; } # 872 "../include/vigra/diff2d.hxx" class Rect2D { Point2D upperLeft_, lowerRight_; public: Rect2D() {} Rect2D(Point2D const &upperLeft, Point2D const &lowerRight) : upperLeft_(upperLeft), lowerRight_(lowerRight) {} Rect2D(int left, int top, int right, int bottom) : upperLeft_(left, top), lowerRight_(right, bottom) {} Rect2D(Point2D const &upperLeft, Size2D const &size) : upperLeft_(upperLeft), lowerRight_(upperLeft + size) {} explicit Rect2D(Size2D const &size) : lowerRight_(Point2D(size)) {} Point2D const & upperLeft() const { return upperLeft_; } Point2D const & lowerRight() const { return lowerRight_; } void setUpperLeft(Point2D const &ul) { upperLeft_ = ul; } void setLowerRight(Point2D const &lr) { lowerRight_ = lr; } void moveTo(Point2D const &newUpperLeft) { lowerRight_ += newUpperLeft - upperLeft_; upperLeft_ = newUpperLeft; } void moveTo(int left, int top) { moveTo(Point2D(left, top)); } void moveBy(Diff2D const &offset) { upperLeft_ += offset; lowerRight_ += offset; } void moveBy(int xOffset, int yOffset) { moveBy(Diff2D(xOffset, yOffset)); } int left() const { return upperLeft_.x; } int top() const { return upperLeft_.y; } int right() const { return lowerRight_.x; } int bottom() const { return lowerRight_.y; } int width() const { return lowerRight_.x - upperLeft_.x; } int height() const { return lowerRight_.y - upperLeft_.y; } long long area() const { return isEmpty() ? 0LL : (long long)width()*(long long)height(); } Size2D size() const { return lowerRight_ - upperLeft_; } void setSize(Size2D const &size) { lowerRight_ = upperLeft_ + size; } void setSize(int width, int height) { lowerRight_ = upperLeft_ + Size2D(width, height); } void addSize(Size2D const &offset) { lowerRight_ += offset; } void addBorder(int borderWidth) { upperLeft_ += Diff2D(-borderWidth, -borderWidth); lowerRight_ += Diff2D(borderWidth, borderWidth); } # 1080 "../include/vigra/diff2d.hxx" void addBorder(int borderWidth, int borderHeight) { upperLeft_ += Diff2D(-borderWidth, -borderHeight); lowerRight_ += Diff2D(borderWidth, borderHeight); } bool operator==(Rect2D const &r) const { return (upperLeft_ == r.upperLeft_) && (lowerRight_ == r.lowerRight_); } bool operator!=(Rect2D const &r) const { return (upperLeft_ != r.upperLeft_) || (lowerRight_ != r.lowerRight_); } # 1105 "../include/vigra/diff2d.hxx" bool isEmpty() const { return ((lowerRight_.x <= upperLeft_.x) || (lowerRight_.y <= upperLeft_.y)); } bool contains(Point2D const &p) const { return ((upperLeft_.x <= p.x) && (upperLeft_.y <= p.y) && (p.x < lowerRight_.x) && (p.y < lowerRight_.y)); } bool contains(Rect2D const &r) const { return r.isEmpty() || contains(r.upperLeft()) && contains(r.lowerRight()-Diff2D(1,1)); } bool intersects(Rect2D const &r) const { return ((r.upperLeft_.x < lowerRight_.x) && (upperLeft_.x < r.lowerRight_.x) && (r.upperLeft_.y < lowerRight_.y) && (upperLeft_.y < r.lowerRight_.y)) && !r.isEmpty(); } Rect2D &operator|=(Point2D const &p) { if(isEmpty()) { upperLeft_ = p; lowerRight_ = p + Diff2D(1, 1); } else { if(p.x < upperLeft_.x) upperLeft_.x = p.x; if(p.y < upperLeft_.y) upperLeft_.y = p.y; if(lowerRight_.x <= p.x) lowerRight_.x = p.x + 1; if(lowerRight_.y <= p.y) lowerRight_.y = p.y + 1; } return *this; } Rect2D operator|(Point2D const &p) const { Rect2D result(*this); result |= p; return result; } Rect2D &operator|=(Rect2D const &r) { if(r.isEmpty()) return *this; if(isEmpty()) return operator=(r); if(r.upperLeft_.x < upperLeft_.x) upperLeft_.x = r.upperLeft_.x; if(r.upperLeft_.y < upperLeft_.y) upperLeft_.y = r.upperLeft_.y; if(lowerRight_.x < r.lowerRight_.x) lowerRight_.x = r.lowerRight_.x; if(lowerRight_.y < r.lowerRight_.y) lowerRight_.y = r.lowerRight_.y; return *this; } Rect2D operator|(Rect2D const &r) const { Rect2D result(*this); result |= r; return result; } Rect2D &operator&=(Point2D const &p) { if(contains(p)) { upperLeft_ = p; lowerRight_ = p + Diff2D(1, 1); } else lowerRight_ = upperLeft_; return *this; } Rect2D operator&(Point2D const &p) const { Rect2D result(*this); result &= p; return result; } Rect2D &operator&=(Rect2D const &r) { if(isEmpty()) return *this; if(r.isEmpty()) return operator=(r); if(upperLeft_.x < r.upperLeft_.x) upperLeft_.x = r.upperLeft_.x; if(upperLeft_.y < r.upperLeft_.y) upperLeft_.y = r.upperLeft_.y; if(r.lowerRight_.x < lowerRight_.x) lowerRight_.x = r.lowerRight_.x; if(r.lowerRight_.y < lowerRight_.y) lowerRight_.y = r.lowerRight_.y; return *this; } Rect2D operator&(Rect2D const &r) const { Rect2D result(*this); result &= r; return result; } template vigra::triple apply(vigra::triple image) const { return vigra::make_triple(image.first + upperLeft_, image.first + lowerRight_, image.third); } # 1307 "../include/vigra/diff2d.hxx" template std::pair apply(std::pair image) const { return std::make_pair(image.first + upperLeft_, image.second); } }; # 1324 "../include/vigra/diff2d.hxx" class Dist2D { public: Dist2D(int the_width, int the_height) : width(the_width), height(the_height) {} Dist2D(Dist2D const & s) : width(s.width), height(s.height) {} Dist2D & operator=(Dist2D const & s) { if(this != &s) { width = s.width; height = s.height; } return *this; } Dist2D & operator+=(Dist2D const & s) { width += s.width; height += s.height; return *this; } Dist2D operator+(Dist2D const & s) const { Dist2D ret(*this); ret += s; return ret; } operator Diff2D() { return Diff2D(width, height); } int width; int height; }; inline std::ostream & operator<<(std::ostream & o, vigra::Diff2D const & d) { o << '(' << d.x << ", " << d.y << ')'; return o; } inline std::ostream &operator <<(std::ostream &s, vigra::Size2D const &d) { s << '(' << d.x << 'x' << d.y << ')'; return s; } inline std::ostream &operator <<(std::ostream &s, vigra::Rect2D const &r) { s << "[" << r.upperLeft() << " to " << r.lowerRight() << " = " << r.size() << "]"; return s; } } # 46 "../include/vigra/utilities.hxx" 2 # 1 "../include/vigra/mathutil.hxx" 1 # 73 "../include/vigra/mathutil.hxx" namespace vigra { # 97 "../include/vigra/mathutil.hxx" template double erf(T x) { double t = 1.0/(1.0+0.5*std::fabs(x)); double ans = t*std::exp(-x*x-1.26551223+t*(1.00002368+t*(0.37409196+ t*(0.09678418+t*(-0.18628806+t*(0.27886807+ t*(-1.13520398+t*(1.48851587+t*(-0.82215223+ t*0.17087277))))))))); if (x >= 0.0) return 1.0 - ans; else return ans - 1.0; } # 119 "../include/vigra/mathutil.hxx" using std::pow; using std::floor; using std::ceil; using std::abs; inline bool abs(bool t) { return t; } inline unsigned char abs(unsigned char t) { return t; } inline unsigned short abs(unsigned short t) { return t; } inline unsigned int abs(unsigned int t) { return t; } inline unsigned long abs(unsigned long t) { return t; } inline unsigned long long abs(unsigned long long t) { return t; } inline signed char abs(signed char t) { return t < 0 ? -t : t; } inline signed short abs(signed short t) { return t < 0 ? -t : t; } # 157 "../include/vigra/mathutil.hxx" inline float round(float t) { return t >= 0.0 ? floor(t + 0.5) : ceil(t - 0.5); } inline double round(double t) { return t >= 0.0 ? floor(t + 0.5) : ceil(t - 0.5); } inline long double round(long double t) { return t >= 0.0 ? floor(t + 0.5) : ceil(t - 0.5); } # 185 "../include/vigra/mathutil.hxx" template inline typename NumericTraits::Promote sq(T t) { return t*t; } namespace detail { template class IntSquareRoot { public: static int sqq_table[]; static UInt32 exec(UInt32 v); }; template int IntSquareRoot::sqq_table[] = { 0, 16, 22, 27, 32, 35, 39, 42, 45, 48, 50, 53, 55, 57, 59, 61, 64, 65, 67, 69, 71, 73, 75, 76, 78, 80, 81, 83, 84, 86, 87, 89, 90, 91, 93, 94, 96, 97, 98, 99, 101, 102, 103, 104, 106, 107, 108, 109, 110, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 128, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 144, 145, 146, 147, 148, 149, 150, 150, 151, 152, 153, 154, 155, 155, 156, 157, 158, 159, 160, 160, 161, 162, 163, 163, 164, 165, 166, 167, 167, 168, 169, 170, 170, 171, 172, 173, 173, 174, 175, 176, 176, 177, 178, 178, 179, 180, 181, 181, 182, 183, 183, 184, 185, 185, 186, 187, 187, 188, 189, 189, 190, 191, 192, 192, 193, 193, 194, 195, 195, 196, 197, 197, 198, 199, 199, 200, 201, 201, 202, 203, 203, 204, 204, 205, 206, 206, 207, 208, 208, 209, 209, 210, 211, 211, 212, 212, 213, 214, 214, 215, 215, 216, 217, 217, 218, 218, 219, 219, 220, 221, 221, 222, 222, 223, 224, 224, 225, 225, 226, 226, 227, 227, 228, 229, 229, 230, 230, 231, 231, 232, 232, 233, 234, 234, 235, 235, 236, 236, 237, 237, 238, 238, 239, 240, 240, 241, 241, 242, 242, 243, 243, 244, 244, 245, 245, 246, 246, 247, 247, 248, 248, 249, 249, 250, 250, 251, 251, 252, 252, 253, 253, 254, 254, 255 }; template UInt32 IntSquareRoot::exec(UInt32 x) { UInt32 xn; if (x >= 0x10000) if (x >= 0x1000000) if (x >= 0x10000000) if (x >= 0x40000000) { if (x >= (UInt32)65535*(UInt32)65535) return 65535; xn = sqq_table[x>>24] << 8; } else xn = sqq_table[x>>22] << 7; else if (x >= 0x4000000) xn = sqq_table[x>>20] << 6; else xn = sqq_table[x>>18] << 5; else { if (x >= 0x100000) if (x >= 0x400000) xn = sqq_table[x>>16] << 4; else xn = sqq_table[x>>14] << 3; else if (x >= 0x40000) xn = sqq_table[x>>12] << 2; else xn = sqq_table[x>>10] << 1; goto nr1; } else if (x >= 0x100) { if (x >= 0x1000) if (x >= 0x4000) xn = (sqq_table[x>>8] >> 0) + 1; else xn = (sqq_table[x>>6] >> 1) + 1; else if (x >= 0x400) xn = (sqq_table[x>>4] >> 2) + 1; else xn = (sqq_table[x>>2] >> 3) + 1; goto adj; } else return sqq_table[x] >> 4; xn = (xn + 1 + x / xn) / 2; nr1: xn = (xn + 1 + x / xn) / 2; adj: if (xn * xn > x) xn--; return xn; } } using std::sqrt; # 298 "../include/vigra/mathutil.hxx" inline Int32 sqrti(Int32 v) { if(v < 0) throw std::domain_error("sqrti(Int32): negative argument."); return (Int32)detail::IntSquareRoot::exec((UInt32)v); } # 312 "../include/vigra/mathutil.hxx" inline UInt32 sqrti(UInt32 v) { return detail::IntSquareRoot::exec(v); } # 339 "../include/vigra/mathutil.hxx" using ::hypot; namespace detail { template T ellipticRD(T x, T y, T z) { double f = 1.0, s = 0.0, X, Y, Z, m; while(true) { m = (x + y + 3.0*z) / 5.0; X = 1.0 - x/m; Y = 1.0 - y/m; Z = 1.0 - z/m; if(std::max(std::max(std::fabs(X), std::fabs(Y)), std::fabs(Z)) < 0.01) break; double l = std::sqrt(x*y) + std::sqrt(x*z) + std::sqrt(y*z); s += f / (std::sqrt(z)*(z + l)); f /= 4.0; x = (x + l)/4.0; y = (y + l)/4.0; z = (z + l)/4.0; } double a = X*Y; double b = sq(Z); double c = a - b; double d = a - 6.0*b; double e = d + 2.0*c; return 3.0*s + f*(1.0+d*(-3.0/14.0+d*9.0/88.0-Z*e*4.5/26.0) +Z*(e/6.0+Z*(-c*9.0/22.0+a*Z*3.0/26.0))) / std::pow(m,1.5); } template T ellipticRF(T x, T y, T z) { double X, Y, Z, m; while(true) { m = (x + y + z) / 3.0; X = 1.0 - x/m; Y = 1.0 - y/m; Z = 1.0 - z/m; if(std::max(std::max(std::fabs(X), std::fabs(Y)), std::fabs(Z)) < 0.01) break; double l = std::sqrt(x*y) + std::sqrt(x*z) + std::sqrt(y*z); x = (x + l)/4.0; y = (y + l)/4.0; z = (z + l)/4.0; } double d = X*Y - sq(Z); double p = X*Y*Z; return (1.0 - d/10.0 + p/14.0 + sq(d)/24.0 - d*p*3.0/44.0) / std::sqrt(m); } } # 411 "../include/vigra/mathutil.hxx" inline double ellipticIntegralF(double x, double k) { double c2 = sq(std::cos(x)); double s = std::sin(x); return s*detail::ellipticRF(c2, 1.0 - sq(k*s), 1.0); } # 432 "../include/vigra/mathutil.hxx" inline double ellipticIntegralE(double x, double k) { double c2 = sq(std::cos(x)); double s = std::sin(x); k = sq(k*s); return s*(detail::ellipticRF(c2, 1.0-k, 1.0) - k/3.0*detail::ellipticRD(c2, 1.0-k, 1.0)); } # 447 "../include/vigra/mathutil.hxx" template T sign(T t) { return t > NumericTraits::zero() ? NumericTraits::one() : t < NumericTraits::zero() ? -NumericTraits::one() : NumericTraits::zero(); } # 464 "../include/vigra/mathutil.hxx" template T1 sign(T1 t1, T2 t2) { return t2 >= NumericTraits::zero() ? abs(t1) : -abs(t1); } inline NormTraits::SquaredNormType squaredNorm(bool t) { return sq(t); } inline NormTraits::NormType norm(bool t) { return abs(t); } inline NormTraits::SquaredNormType squaredNorm(signed char t) { return sq(t); } inline NormTraits::NormType norm(signed char t) { return abs(t); } inline NormTraits::SquaredNormType squaredNorm(unsigned char t) { return sq(t); } inline NormTraits::NormType norm(unsigned char t) { return abs(t); } inline NormTraits::SquaredNormType squaredNorm(short t) { return sq(t); } inline NormTraits::NormType norm(short t) { return abs(t); } inline NormTraits::SquaredNormType squaredNorm(unsigned short t) { return sq(t); } inline NormTraits::NormType norm(unsigned short t) { return abs(t); } inline NormTraits::SquaredNormType squaredNorm(int t) { return sq(t); } inline NormTraits::NormType norm(int t) { return abs(t); } inline NormTraits::SquaredNormType squaredNorm(unsigned int t) { return sq(t); } inline NormTraits::NormType norm(unsigned int t) { return abs(t); } inline NormTraits::SquaredNormType squaredNorm(long t) { return sq(t); } inline NormTraits::NormType norm(long t) { return abs(t); } inline NormTraits::SquaredNormType squaredNorm(unsigned long t) { return sq(t); } inline NormTraits::NormType norm(unsigned long t) { return abs(t); } inline NormTraits::SquaredNormType squaredNorm(float t) { return sq(t); } inline NormTraits::NormType norm(float t) { return abs(t); } inline NormTraits::SquaredNormType squaredNorm(double t) { return sq(t); } inline NormTraits::NormType norm(double t) { return abs(t); } inline NormTraits::SquaredNormType squaredNorm(long double t) { return sq(t); } inline NormTraits::NormType norm(long double t) { return abs(t); } template inline typename NormTraits >::SquaredNormType squaredNorm(std::complex const & t) { return sq(t.real()) + sq(t.imag()); } # 518 "../include/vigra/mathutil.hxx" template inline typename NormTraits::NormType norm(T const & t) { typedef typename NormTraits::SquaredNormType SNT; return sqrt(static_cast::SquareRootArgument>(squaredNorm(t))); } namespace detail { template inline FPT safeFloatDivision( FPT f1, FPT f2 ) { return f2 < NumericTraits::one() && f1 > f2 * NumericTraits::max() ? NumericTraits::max() : (f2 > NumericTraits::one() && f1 < f2 * NumericTraits::smallestPositive()) || f1 == NumericTraits::zero() ? NumericTraits::zero() : f1/f2; } } # 553 "../include/vigra/mathutil.hxx" template bool closeAtTolerance(T1 l, T2 r, typename PromoteTraits::Promote epsilon) { typedef typename PromoteTraits::Promote T; if(l == 0.0) return std::fabs(r) <= epsilon; if(r == 0.0) return std::fabs(l) <= epsilon; T diff = std::fabs( l - r ); T d1 = detail::safeFloatDivision( diff, std::fabs( r ) ); T d2 = detail::safeFloatDivision( diff, std::fabs( l ) ); return (d1 <= epsilon && d2 <= epsilon); } template bool closeAtTolerance(T1 l, T2 r) { typedef typename PromoteTraits::Promote T; return closeAtTolerance(l, r, 2.0 * NumericTraits::epsilon()); } } # 47 "../include/vigra/utilities.hxx" 2 # 43 "../include/vigra/basicimage.hxx" 2 namespace vigra { template class LineBasedColumnIteratorPolicy { public: typedef IMAGEITERATOR ImageIterator; typedef typename IMAGEITERATOR::LineStartIterator LineStartIterator; typedef typename IMAGEITERATOR::value_type value_type; typedef typename IMAGEITERATOR::difference_type::MoveY difference_type; typedef typename IMAGEITERATOR::reference reference; typedef typename IMAGEITERATOR::index_reference index_reference; typedef typename IMAGEITERATOR::pointer pointer; typedef std::random_access_iterator_tag iterator_category; struct BaseType { explicit BaseType(LineStartIterator c = LineStartIterator(), difference_type o = 0) : line_start_(c), offset_(o) {} LineStartIterator line_start_; difference_type offset_; }; static void initialize(BaseType &) {} static reference dereference(BaseType const & d) { return const_cast(*(*d.line_start_ + d.offset_)); } static index_reference dereference(BaseType const & d, difference_type n) { return const_cast(*(d.line_start_[n] + d.offset_)); } static bool equal(BaseType const & d1, BaseType const & d2) { return d1.line_start_ == d2.line_start_; } static bool less(BaseType const & d1, BaseType const & d2) { return d1.line_start_ < d2.line_start_; } static difference_type difference(BaseType const & d1, BaseType const & d2) { return d1.line_start_ - d2.line_start_; } static void increment(BaseType & d) { ++d.line_start_; } static void decrement(BaseType & d) { --d.line_start_; } static void advance(BaseType & d, difference_type n) { d.line_start_ += n; } }; # 115 "../include/vigra/basicimage.hxx" template class BasicImageIteratorBase { public: typedef BasicImageIteratorBase self_type; typedef LINESTARTITERATOR LineStartIterator; typedef PIXELTYPE value_type; typedef PIXELTYPE PixelType; typedef REFERENCE reference; typedef REFERENCE index_reference; typedef POINTER pointer; typedef Diff2D difference_type; typedef image_traverser_tag iterator_category; typedef POINTER row_iterator; typedef IteratorAdaptor > column_iterator; typedef int MoveX; typedef LINESTARTITERATOR MoveY; MoveX x; MoveY y; IMAGEITERATOR & operator+=(difference_type const & s) { x += s.x; y += s.y; return static_cast(*this); } IMAGEITERATOR & operator-=(difference_type const & s) { x -= s.x; y -= s.y; return static_cast(*this); } IMAGEITERATOR operator+(difference_type const & s) const { IMAGEITERATOR ret(static_cast(*this)); ret += s; return ret; } IMAGEITERATOR operator-(difference_type const & s) const { IMAGEITERATOR ret(static_cast(*this)); ret -= s; return ret; } difference_type operator-(BasicImageIteratorBase const & rhs) const { return difference_type(x - rhs.x, y - rhs.y); } bool operator==(BasicImageIteratorBase const & rhs) const { return (x == rhs.x) && (y == rhs.y); } bool operator!=(BasicImageIteratorBase const & rhs) const { return (x != rhs.x) || (y != rhs.y); } reference operator*() const { return *(*y + x ); } pointer operator->() const { return *y + x; } index_reference operator[](difference_type const & d) const { return *(*(y + d.y) + x + d.x); } index_reference operator()(int dx, int dy) const { return *(*(y + dy) + x + dx); } pointer operator[](int dy) const { return y[dy] + x; } row_iterator rowIterator() const { return *y + x; } column_iterator columnIterator() const { typedef typename column_iterator::BaseType Iter; return column_iterator(Iter(y, x)); } protected: BasicImageIteratorBase(LINESTARTITERATOR const & line) : x(0), y(line) {} BasicImageIteratorBase(int ix, LINESTARTITERATOR const & line) : x(ix), y(line) {} BasicImageIteratorBase() : x(0), y(0) {} }; # 251 "../include/vigra/basicimage.hxx" template class BasicImageIterator : public BasicImageIteratorBase, PIXELTYPE, PIXELTYPE &, PIXELTYPE *, ITERATOR> { public: typedef BasicImageIteratorBase Base; BasicImageIterator(ITERATOR line) : Base(line) {} BasicImageIterator() : Base() {} }; # 283 "../include/vigra/basicimage.hxx" template class ConstBasicImageIterator : public BasicImageIteratorBase, PIXELTYPE, PIXELTYPE const &, PIXELTYPE const *, ITERATOR> { public: typedef BasicImageIteratorBase Base; ConstBasicImageIterator(ITERATOR line) : Base(line) {} ConstBasicImageIterator(BasicImageIterator const & rhs) : Base(rhs.x, rhs.y) {} ConstBasicImageIterator() : Base() {} ConstBasicImageIterator & operator=(BasicImageIterator const & rhs) { Base::x = rhs.x; Base::y = rhs.y; return *this; } }; # 325 "../include/vigra/basicimage.hxx" template struct IteratorTraits > : public IteratorTraitsBase > { typedef BasicImageIterator mutable_iterator; typedef ConstBasicImageIterator const_iterator; typedef typename AccessorTraits::default_accessor DefaultAccessor; typedef DefaultAccessor default_accessor; typedef VigraTrueType hasConstantStrides; }; template struct IteratorTraits > : public IteratorTraitsBase > { typedef BasicImageIterator mutable_iterator; typedef ConstBasicImageIterator const_iterator; typedef typename AccessorTraits::default_const_accessor DefaultAccessor; typedef DefaultAccessor default_accessor; typedef VigraTrueType hasConstantStrides; }; # 463 "../include/vigra/basicimage.hxx" template > class BasicImage { public: typedef PIXELTYPE value_type; typedef PIXELTYPE PixelType; typedef PIXELTYPE & reference; typedef PIXELTYPE const & const_reference; typedef PIXELTYPE * pointer; typedef PIXELTYPE const * const_pointer; typedef PIXELTYPE * iterator; typedef PIXELTYPE * ScanOrderIterator; typedef PIXELTYPE const * const_iterator; typedef PIXELTYPE const * ConstScanOrderIterator; typedef BasicImageIterator traverser; typedef BasicImageIterator Iterator; typedef ConstBasicImageIterator const_traverser; typedef ConstBasicImageIterator ConstIterator; typedef typename traverser::row_iterator row_iterator; typedef typename const_traverser::row_iterator const_row_iterator; typedef typename traverser::column_iterator column_iterator; typedef typename const_traverser::column_iterator const_column_iterator; typedef Diff2D difference_type; typedef Size2D size_type; typedef typename IteratorTraits::DefaultAccessor Accessor; typedef typename IteratorTraits::DefaultAccessor ConstAccessor; typedef Alloc allocator_type; typedef Alloc Allocator; typedef typename Alloc::template rebind::other LineAllocator; BasicImage() : data_(0), width_(0), height_(0) {} explicit BasicImage(Alloc const & alloc) : data_(0), width_(0), height_(0), allocator_(alloc), pallocator_(alloc) {} BasicImage(int width, int height, Alloc const & alloc = Alloc()) : data_(0), width_(0), height_(0), allocator_(alloc), pallocator_(alloc) { vigra::throw_precondition_error(((width >= 0) && (height >= 0)), "BasicImage::BasicImage(int width, int height): " "width and height must be >= 0.\n"); resize(width, height, value_type()); } explicit BasicImage(difference_type const & size, Alloc const & alloc = Alloc()) : data_(0), width_(0), height_(0), allocator_(alloc), pallocator_(alloc) { vigra::throw_precondition_error(((size.x >= 0) && (size.y >= 0)), "BasicImage::BasicImage(Diff2D size): " "size.x and size.y must be >= 0.\n"); resize(size.x, size.y, value_type()); } BasicImage(int width, int height, value_type const & d, Alloc const & alloc = Alloc()) : data_(0), width_(0), height_(0), allocator_(alloc), pallocator_(alloc) { vigra::throw_precondition_error(((width >= 0) && (height >= 0)), "BasicImage::BasicImage(int width, int height, value_type const & ): " "width and height must be >= 0.\n"); resize(width, height, d); } explicit BasicImage(difference_type const & size, value_type const & d, Alloc const & alloc = Alloc()) : data_(0), width_(0), height_(0), allocator_(alloc), pallocator_(alloc) { vigra::throw_precondition_error(((size.x >= 0) && (size.y >= 0)), "BasicImage::BasicImage(Diff2D const & size, value_type const & v): " "size.x and size.y must be >= 0.\n"); resize(size.x, size.y, d); } BasicImage(int width, int height, const_pointer d, Alloc const & alloc = Alloc()) : data_(0), width_(0), height_(0), allocator_(alloc), pallocator_(alloc) { vigra::throw_precondition_error(((width >= 0) && (height >= 0)), "BasicImage::BasicImage(int width, int height, const_pointer ): " "width and height must be >= 0.\n"); resizeCopy(width, height, d); } explicit BasicImage(difference_type const & size, const_pointer d, Alloc const & alloc = Alloc()) : data_(0), width_(0), height_(0), allocator_(alloc), pallocator_(alloc) { vigra::throw_precondition_error(((size.x >= 0) && (size.y >= 0)), "BasicImage::BasicImage(Diff2D const & size, const_pointer): " "size.x and size.y must be >= 0.\n"); resizeCopy(size.x, size.y, d); } BasicImage(const BasicImage & rhs) : data_(0), width_(0), height_(0), allocator_(rhs.allocator_), pallocator_(rhs.pallocator_) { resizeCopy(rhs); } ~BasicImage() { deallocate(); } BasicImage & operator=(const BasicImage & rhs); BasicImage & operator=(value_type pixel); BasicImage & init(value_type const & pixel); void resize(int width, int height) { if(width != width_ || height != height_) resize(width, height, value_type()); } void resize(difference_type const & size) { if(size.x != width_ || size.y != height_) { resize(size.x, size.y, value_type()); } } void resize(int width, int height, value_type const & d); void resizeCopy(int width, int height, const_pointer data); void resizeCopy(const BasicImage & rhs) { resizeCopy(rhs.width(), rhs.height(), rhs.data_); } void swap( BasicImage & rhs ); int width() const { return width_; } int height() const { return height_; } size_type size() const { return size_type(width(), height()); } bool isInside(difference_type const & d) const { return d.x >= 0 && d.y >= 0 && d.x < width() && d.y < height(); } reference operator[](difference_type const & d) { return lines_[d.y][d.x]; } const_reference operator[](difference_type const & d) const { return lines_[d.y][d.x]; } reference operator()(int dx, int dy) { return lines_[dy][dx]; } const_reference operator()(int dx, int dy) const { return lines_[dy][dx]; } pointer operator[](int dy) { return lines_[dy]; } const_pointer operator[](int dy) const { return lines_[dy]; } traverser upperLeft() { ; return traverser(lines_); } traverser lowerRight() { ; return upperLeft() + size(); } const_traverser upperLeft() const { ; return const_traverser(const_cast(lines_)); } const_traverser lowerRight() const { ; return upperLeft() + size(); } iterator begin() { ; return data_; } iterator end() { ; return data_ + width() * height(); } const_iterator begin() const { ; return data_; } const_iterator end() const { ; return data_ + width() * height(); } row_iterator rowBegin(int y) { return lines_[y]; } row_iterator rowEnd(int y) { return rowBegin(y) + width(); } const_row_iterator rowBegin(int y) const { return lines_[y]; } const_row_iterator rowEnd(int y) const { return rowBegin(y) + width(); } column_iterator columnBegin(int x) { typedef typename column_iterator::BaseType Iter; return column_iterator(Iter(lines_, x)); } column_iterator columnEnd(int x) { return columnBegin(x) + height(); } const_column_iterator columnBegin(int x) const { typedef typename const_column_iterator::BaseType Iter; return const_column_iterator(Iter(lines_, x)); } const_column_iterator columnEnd(int x) const { return columnBegin(x) + height(); } const_pointer data() const { return data_; } Accessor accessor() { return Accessor(); } ConstAccessor accessor() const { return ConstAccessor(); } private: void deallocate(); value_type ** initLineStartArray(value_type * data, int width, int height); PIXELTYPE * data_; PIXELTYPE ** lines_; int width_, height_; Alloc allocator_; LineAllocator pallocator_; }; template BasicImage & BasicImage::operator=(const BasicImage & rhs) { if(this != &rhs) { if((width() != rhs.width()) || (height() != rhs.height())) { resizeCopy(rhs); } else { ConstScanOrderIterator is = rhs.begin(); ConstScanOrderIterator iend = rhs.end(); ScanOrderIterator id = begin(); for(; is != iend; ++is, ++id) *id = *is; } } return *this; } template BasicImage & BasicImage::operator=(value_type pixel) { ScanOrderIterator i = begin(); ScanOrderIterator iend = end(); for(; i != iend; ++i) *i = pixel; return *this; } template BasicImage & BasicImage::init(value_type const & pixel) { ScanOrderIterator i = begin(); ScanOrderIterator iend = end(); for(; i != iend; ++i) *i = pixel; return *this; } template void BasicImage::resize(int width, int height, value_type const & d) { vigra::throw_precondition_error(((width >= 0) && (height >= 0)), "BasicImage::resize(int width, int height, value_type const &): " "width and height must be >= 0.\n"); if (width_ != width || height_ != height) { value_type * newdata = 0; value_type ** newlines = 0; if(width*height > 0) { if (width*height != width_*height_) { newdata = allocator_.allocate(width*height); std::uninitialized_fill_n(newdata, width*height, d); newlines = initLineStartArray(newdata, width, height); deallocate(); } else { newdata = data_; std::fill_n(newdata, width*height, d); newlines = initLineStartArray(newdata, width, height); pallocator_.deallocate(lines_, height_); } } else { deallocate(); } data_ = newdata; lines_ = newlines; width_ = width; height_ = height; } else if(width*height > 0) { std::fill_n(data_, width*height, d); } } template void BasicImage::resizeCopy(int width, int height, const_pointer data) { int newsize = width*height; if (width_ != width || height_ != height) { value_type * newdata = 0; value_type ** newlines = 0; if(newsize > 0) { if (newsize != width_*height_) { newdata = allocator_.allocate(newsize); std::uninitialized_copy(data, data + newsize, newdata); newlines = initLineStartArray(newdata, width, height); deallocate(); } else { newdata = data_; std::copy(data, data + newsize, newdata); newlines = initLineStartArray(newdata, width, height); pallocator_.deallocate(lines_, height_); } } else { deallocate(); } data_ = newdata; lines_ = newlines; width_ = width; height_ = height; } else if(newsize > 0) { std::copy(data, data + newsize, data_); } } template void BasicImage::swap( BasicImage& rhs ) { if (&rhs!=this) { std::swap( data_, rhs.data_ ); std::swap( lines_, rhs.lines_ ); std::swap( width_, rhs.width_ ); std::swap( height_, rhs.height_ ); } } template void BasicImage::deallocate() { if(data_) { ScanOrderIterator i = begin(); ScanOrderIterator iend = end(); for(; i != iend; ++i) (*i).~PIXELTYPE(); allocator_.deallocate(data_, width()*height()); pallocator_.deallocate(lines_, height_); } } template PIXELTYPE ** BasicImage::initLineStartArray(value_type * data, int width, int height) { value_type ** lines = pallocator_.allocate(height); for(int y=0; y inline triple::const_traverser, typename BasicImage::const_traverser, Accessor> srcImageRange(BasicImage const & img, Accessor a) { return triple::const_traverser, typename BasicImage::const_traverser, Accessor>(img.upperLeft(), img.lowerRight(), a); } template inline pair::const_traverser, Accessor> srcImage(BasicImage const & img, Accessor a) { return pair::const_traverser, Accessor>(img.upperLeft(), a); } template inline triple::traverser, typename BasicImage::traverser, Accessor> destImageRange(BasicImage & img, Accessor a) { return triple::traverser, typename BasicImage::traverser, Accessor>(img.upperLeft(), img.lowerRight(), a); } template inline pair::traverser, Accessor> destImage(BasicImage & img, Accessor a) { return pair::traverser, Accessor>(img.upperLeft(), a); } template inline pair::const_traverser, Accessor> maskImage(BasicImage const & img, Accessor a) { return pair::const_traverser, Accessor>(img.upperLeft(), a); } template inline triple::const_traverser, typename BasicImage::const_traverser, typename BasicImage::ConstAccessor> srcImageRange(BasicImage const & img) { return triple::const_traverser, typename BasicImage::const_traverser, typename BasicImage::ConstAccessor>(img.upperLeft(), img.lowerRight(), img.accessor()); } template inline pair< typename BasicImage::const_traverser, typename BasicImage::ConstAccessor> srcImage(BasicImage const & img) { return pair::const_traverser, typename BasicImage::ConstAccessor>(img.upperLeft(), img.accessor()); } template inline triple< typename BasicImage::traverser, typename BasicImage::traverser, typename BasicImage::Accessor> destImageRange(BasicImage & img) { return triple::traverser, typename BasicImage::traverser, typename BasicImage::Accessor>(img.upperLeft(), img.lowerRight(), img.accessor()); } template inline pair< typename BasicImage::traverser, typename BasicImage::Accessor> destImage(BasicImage & img) { return pair::traverser, typename BasicImage::Accessor>(img.upperLeft(), img.accessor()); } template inline pair< typename BasicImage::const_traverser, typename BasicImage::ConstAccessor> maskImage(BasicImage const & img) { return pair::const_traverser, typename BasicImage::ConstAccessor>(img.upperLeft(), img.accessor()); } } # 28 "numerictraits.h" 2 # 1 "../include/vigra/cachedfileimage.hxx" 1 # 25 "../include/vigra/cachedfileimage.hxx" # 1 "/usr/include/errno.h" 1 3 4 # 32 "/usr/include/errno.h" 3 4 extern "C" { # 1 "/usr/include/bits/errno.h" 1 3 4 # 25 "/usr/include/bits/errno.h" 3 4 # 1 "/usr/include/linux/errno.h" 1 3 4 # 1 "/usr/include/asm/errno.h" 1 3 4 # 1 "/usr/include/asm-generic/errno.h" 1 3 4 # 1 "/usr/include/asm-generic/errno-base.h" 1 3 4 # 5 "/usr/include/asm-generic/errno.h" 2 3 4 # 5 "/usr/include/asm/errno.h" 2 3 4 # 5 "/usr/include/linux/errno.h" 2 3 4 # 26 "/usr/include/bits/errno.h" 2 3 4 # 43 "/usr/include/bits/errno.h" 3 4 extern int *__errno_location (void) throw () __attribute__ ((__const__)); # 37 "/usr/include/errno.h" 2 3 4 # 55 "/usr/include/errno.h" 3 4 extern char *program_invocation_name, *program_invocation_short_name; } # 69 "/usr/include/errno.h" 3 4 typedef int error_t; # 26 "../include/vigra/cachedfileimage.hxx" 2 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/map" 1 3 # 63 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/map" 3 # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/map" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_tree.h" 1 3 # 73 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_tree.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 91 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_tree.h" 3 enum _Rb_tree_color { _S_red = false, _S_black = true }; struct _Rb_tree_node_base { typedef _Rb_tree_node_base* _Base_ptr; typedef const _Rb_tree_node_base* _Const_Base_ptr; _Rb_tree_color _M_color; _Base_ptr _M_parent; _Base_ptr _M_left; _Base_ptr _M_right; static _Base_ptr _S_minimum(_Base_ptr __x) { while (__x->_M_left != 0) __x = __x->_M_left; return __x; } static _Const_Base_ptr _S_minimum(_Const_Base_ptr __x) { while (__x->_M_left != 0) __x = __x->_M_left; return __x; } static _Base_ptr _S_maximum(_Base_ptr __x) { while (__x->_M_right != 0) __x = __x->_M_right; return __x; } static _Const_Base_ptr _S_maximum(_Const_Base_ptr __x) { while (__x->_M_right != 0) __x = __x->_M_right; return __x; } }; template struct _Rb_tree_node : public _Rb_tree_node_base { typedef _Rb_tree_node<_Val>* _Link_type; _Val _M_value_field; }; _Rb_tree_node_base* _Rb_tree_increment(_Rb_tree_node_base* __x); const _Rb_tree_node_base* _Rb_tree_increment(const _Rb_tree_node_base* __x); _Rb_tree_node_base* _Rb_tree_decrement(_Rb_tree_node_base* __x); const _Rb_tree_node_base* _Rb_tree_decrement(const _Rb_tree_node_base* __x); template struct _Rb_tree_iterator { typedef _Tp value_type; typedef _Tp& reference; typedef _Tp* pointer; typedef bidirectional_iterator_tag iterator_category; typedef ptrdiff_t difference_type; typedef _Rb_tree_iterator<_Tp> _Self; typedef _Rb_tree_node_base::_Base_ptr _Base_ptr; typedef _Rb_tree_node<_Tp>* _Link_type; _Rb_tree_iterator() : _M_node() { } explicit _Rb_tree_iterator(_Link_type __x) : _M_node(__x) { } reference operator*() const { return static_cast<_Link_type>(_M_node)->_M_value_field; } pointer operator->() const { return &static_cast<_Link_type>(_M_node)->_M_value_field; } _Self& operator++() { _M_node = _Rb_tree_increment(_M_node); return *this; } _Self operator++(int) { _Self __tmp = *this; _M_node = _Rb_tree_increment(_M_node); return __tmp; } _Self& operator--() { _M_node = _Rb_tree_decrement(_M_node); return *this; } _Self operator--(int) { _Self __tmp = *this; _M_node = _Rb_tree_decrement(_M_node); return __tmp; } bool operator==(const _Self& __x) const { return _M_node == __x._M_node; } bool operator!=(const _Self& __x) const { return _M_node != __x._M_node; } _Base_ptr _M_node; }; template struct _Rb_tree_const_iterator { typedef _Tp value_type; typedef const _Tp& reference; typedef const _Tp* pointer; typedef _Rb_tree_iterator<_Tp> iterator; typedef bidirectional_iterator_tag iterator_category; typedef ptrdiff_t difference_type; typedef _Rb_tree_const_iterator<_Tp> _Self; typedef _Rb_tree_node_base::_Const_Base_ptr _Base_ptr; typedef const _Rb_tree_node<_Tp>* _Link_type; _Rb_tree_const_iterator() : _M_node() { } explicit _Rb_tree_const_iterator(_Link_type __x) : _M_node(__x) { } _Rb_tree_const_iterator(const iterator& __it) : _M_node(__it._M_node) { } reference operator*() const { return static_cast<_Link_type>(_M_node)->_M_value_field; } pointer operator->() const { return &static_cast<_Link_type>(_M_node)->_M_value_field; } _Self& operator++() { _M_node = _Rb_tree_increment(_M_node); return *this; } _Self operator++(int) { _Self __tmp = *this; _M_node = _Rb_tree_increment(_M_node); return __tmp; } _Self& operator--() { _M_node = _Rb_tree_decrement(_M_node); return *this; } _Self operator--(int) { _Self __tmp = *this; _M_node = _Rb_tree_decrement(_M_node); return __tmp; } bool operator==(const _Self& __x) const { return _M_node == __x._M_node; } bool operator!=(const _Self& __x) const { return _M_node != __x._M_node; } _Base_ptr _M_node; }; template inline bool operator==(const _Rb_tree_iterator<_Val>& __x, const _Rb_tree_const_iterator<_Val>& __y) { return __x._M_node == __y._M_node; } template inline bool operator!=(const _Rb_tree_iterator<_Val>& __x, const _Rb_tree_const_iterator<_Val>& __y) { return __x._M_node != __y._M_node; } void _Rb_tree_rotate_left(_Rb_tree_node_base* const __x, _Rb_tree_node_base*& __root); void _Rb_tree_rotate_right(_Rb_tree_node_base* const __x, _Rb_tree_node_base*& __root); void _Rb_tree_insert_and_rebalance(const bool __insert_left, _Rb_tree_node_base* __x, _Rb_tree_node_base* __p, _Rb_tree_node_base& __header); _Rb_tree_node_base* _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z, _Rb_tree_node_base& __header); template > class _Rb_tree { typedef typename _Alloc::template rebind<_Rb_tree_node<_Val> >::other _Node_allocator; protected: typedef _Rb_tree_node_base* _Base_ptr; typedef const _Rb_tree_node_base* _Const_Base_ptr; typedef _Rb_tree_node<_Val> _Rb_tree_node; public: typedef _Key key_type; typedef _Val value_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type& reference; typedef const value_type& const_reference; typedef _Rb_tree_node* _Link_type; typedef const _Rb_tree_node* _Const_Link_type; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Alloc allocator_type; _Node_allocator& _M_get_Node_allocator() { return *static_cast<_Node_allocator*>(&this->_M_impl); } const _Node_allocator& _M_get_Node_allocator() const { return *static_cast(&this->_M_impl); } allocator_type get_allocator() const { return allocator_type(_M_get_Node_allocator()); } protected: _Rb_tree_node* _M_get_node() { return _M_impl._Node_allocator::allocate(1); } void _M_put_node(_Rb_tree_node* __p) { _M_impl._Node_allocator::deallocate(__p, 1); } _Link_type _M_create_node(const value_type& __x) { _Link_type __tmp = _M_get_node(); try { get_allocator().construct(&__tmp->_M_value_field, __x); } catch(...) { _M_put_node(__tmp); throw; } return __tmp; } _Link_type _M_clone_node(_Const_Link_type __x) { _Link_type __tmp = _M_create_node(__x->_M_value_field); __tmp->_M_color = __x->_M_color; __tmp->_M_left = 0; __tmp->_M_right = 0; return __tmp; } void _M_destroy_node(_Link_type __p) { get_allocator().destroy(&__p->_M_value_field); _M_put_node(__p); } protected: template::__value> struct _Rb_tree_impl : public _Node_allocator { _Key_compare _M_key_compare; _Rb_tree_node_base _M_header; size_type _M_node_count; _Rb_tree_impl(const _Node_allocator& __a = _Node_allocator(), const _Key_compare& __comp = _Key_compare()) : _Node_allocator(__a), _M_key_compare(__comp), _M_header(), _M_node_count(0) { this->_M_header._M_color = _S_red; this->_M_header._M_parent = 0; this->_M_header._M_left = &this->_M_header; this->_M_header._M_right = &this->_M_header; } }; template struct _Rb_tree_impl<_Key_compare, true> : public _Node_allocator { _Key_compare _M_key_compare; _Rb_tree_node_base _M_header; size_type _M_node_count; _Rb_tree_impl(const _Node_allocator& __a = _Node_allocator(), const _Key_compare& __comp = _Key_compare()) : _Node_allocator(__a), _M_key_compare(__comp), _M_header(), _M_node_count(0) { this->_M_header._M_color = _S_red; this->_M_header._M_parent = 0; this->_M_header._M_left = &this->_M_header; this->_M_header._M_right = &this->_M_header; } }; _Rb_tree_impl<_Compare> _M_impl; protected: _Base_ptr& _M_root() { return this->_M_impl._M_header._M_parent; } _Const_Base_ptr _M_root() const { return this->_M_impl._M_header._M_parent; } _Base_ptr& _M_leftmost() { return this->_M_impl._M_header._M_left; } _Const_Base_ptr _M_leftmost() const { return this->_M_impl._M_header._M_left; } _Base_ptr& _M_rightmost() { return this->_M_impl._M_header._M_right; } _Const_Base_ptr _M_rightmost() const { return this->_M_impl._M_header._M_right; } _Link_type _M_begin() { return static_cast<_Link_type>(this->_M_impl._M_header._M_parent); } _Const_Link_type _M_begin() const { return static_cast<_Const_Link_type> (this->_M_impl._M_header._M_parent); } _Link_type _M_end() { return static_cast<_Link_type>(&this->_M_impl._M_header); } _Const_Link_type _M_end() const { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); } static const_reference _S_value(_Const_Link_type __x) { return __x->_M_value_field; } static const _Key& _S_key(_Const_Link_type __x) { return _KeyOfValue()(_S_value(__x)); } static _Link_type _S_left(_Base_ptr __x) { return static_cast<_Link_type>(__x->_M_left); } static _Const_Link_type _S_left(_Const_Base_ptr __x) { return static_cast<_Const_Link_type>(__x->_M_left); } static _Link_type _S_right(_Base_ptr __x) { return static_cast<_Link_type>(__x->_M_right); } static _Const_Link_type _S_right(_Const_Base_ptr __x) { return static_cast<_Const_Link_type>(__x->_M_right); } static const_reference _S_value(_Const_Base_ptr __x) { return static_cast<_Const_Link_type>(__x)->_M_value_field; } static const _Key& _S_key(_Const_Base_ptr __x) { return _KeyOfValue()(_S_value(__x)); } static _Base_ptr _S_minimum(_Base_ptr __x) { return _Rb_tree_node_base::_S_minimum(__x); } static _Const_Base_ptr _S_minimum(_Const_Base_ptr __x) { return _Rb_tree_node_base::_S_minimum(__x); } static _Base_ptr _S_maximum(_Base_ptr __x) { return _Rb_tree_node_base::_S_maximum(__x); } static _Const_Base_ptr _S_maximum(_Const_Base_ptr __x) { return _Rb_tree_node_base::_S_maximum(__x); } public: typedef _Rb_tree_iterator iterator; typedef _Rb_tree_const_iterator const_iterator; typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; private: iterator _M_insert(_Base_ptr __x, _Base_ptr __y, const value_type& __v); iterator _M_insert_lower(_Base_ptr __x, _Base_ptr __y, const value_type& __v); const_iterator _M_insert(_Const_Base_ptr __x, _Const_Base_ptr __y, const value_type& __v); _Link_type _M_copy(_Const_Link_type __x, _Link_type __p); void _M_erase(_Link_type __x); public: _Rb_tree() { } _Rb_tree(const _Compare& __comp) : _M_impl(allocator_type(), __comp) { } _Rb_tree(const _Compare& __comp, const allocator_type& __a) : _M_impl(__a, __comp) { } _Rb_tree(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x) : _M_impl(__x._M_get_Node_allocator(), __x._M_impl._M_key_compare) { if (__x._M_root() != 0) { _M_root() = _M_copy(__x._M_begin(), _M_end()); _M_leftmost() = _S_minimum(_M_root()); _M_rightmost() = _S_maximum(_M_root()); _M_impl._M_node_count = __x._M_impl._M_node_count; } } ~_Rb_tree() { _M_erase(_M_begin()); } _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& operator=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x); _Compare key_comp() const { return _M_impl._M_key_compare; } iterator begin() { return iterator(static_cast<_Link_type> (this->_M_impl._M_header._M_left)); } const_iterator begin() const { return const_iterator(static_cast<_Const_Link_type> (this->_M_impl._M_header._M_left)); } iterator end() { return iterator(static_cast<_Link_type>(&this->_M_impl._M_header)); } const_iterator end() const { return const_iterator(static_cast<_Const_Link_type> (&this->_M_impl._M_header)); } reverse_iterator rbegin() { return reverse_iterator(end()); } const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); } reverse_iterator rend() { return reverse_iterator(begin()); } const_reverse_iterator rend() const { return const_reverse_iterator(begin()); } bool empty() const { return _M_impl._M_node_count == 0; } size_type size() const { return _M_impl._M_node_count; } size_type max_size() const { return get_allocator().max_size(); } void swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __t); pair _M_insert_unique(const value_type& __x); iterator _M_insert_equal(const value_type& __x); iterator _M_insert_equal_lower(const value_type& __x); iterator _M_insert_unique(iterator __position, const value_type& __x); const_iterator _M_insert_unique(const_iterator __position, const value_type& __x); iterator _M_insert_equal(iterator __position, const value_type& __x); const_iterator _M_insert_equal(const_iterator __position, const value_type& __x); template void _M_insert_unique(_InputIterator __first, _InputIterator __last); template void _M_insert_equal(_InputIterator __first, _InputIterator __last); void erase(iterator __position); void erase(const_iterator __position); size_type erase(const key_type& __x); void erase(iterator __first, iterator __last); void erase(const_iterator __first, const_iterator __last); void erase(const key_type* __first, const key_type* __last); void clear() { _M_erase(_M_begin()); _M_leftmost() = _M_end(); _M_root() = 0; _M_rightmost() = _M_end(); _M_impl._M_node_count = 0; } iterator find(const key_type& __x); const_iterator find(const key_type& __x) const; size_type count(const key_type& __x) const; iterator lower_bound(const key_type& __x); const_iterator lower_bound(const key_type& __x) const; iterator upper_bound(const key_type& __x); const_iterator upper_bound(const key_type& __x) const; pair equal_range(const key_type& __x); pair equal_range(const key_type& __x) const; bool __rb_verify() const; }; template inline bool operator==(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) { return __x.size() == __y.size() && std::equal(__x.begin(), __x.end(), __y.begin()); } template inline bool operator<(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) { return std::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); } template inline bool operator!=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) { return !(__x == __y); } template inline bool operator>(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) { return __y < __x; } template inline bool operator<=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) { return !(__y < __x); } template inline bool operator>=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) { return !(__x < __y); } template inline void swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) { __x.swap(__y); } template _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: operator=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x) { if (this != &__x) { clear(); _M_impl._M_key_compare = __x._M_impl._M_key_compare; if (__x._M_root() != 0) { _M_root() = _M_copy(__x._M_begin(), _M_end()); _M_leftmost() = _S_minimum(_M_root()); _M_rightmost() = _S_maximum(_M_root()); _M_impl._M_node_count = __x._M_impl._M_node_count; } } return *this; } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert(_Base_ptr __x, _Base_ptr __p, const _Val& __v) { bool __insert_left = (__x != 0 || __p == _M_end() || _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__p))); _Link_type __z = _M_create_node(__v); _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, this->_M_impl._M_header); ++_M_impl._M_node_count; return iterator(__z); } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_lower(_Base_ptr __x, _Base_ptr __p, const _Val& __v) { bool __insert_left = (__x != 0 || __p == _M_end() || !_M_impl._M_key_compare(_S_key(__p), _KeyOfValue()(__v))); _Link_type __z = _M_create_node(__v); _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, this->_M_impl._M_header); ++_M_impl._M_node_count; return iterator(__z); } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert(_Const_Base_ptr __x, _Const_Base_ptr __p, const _Val& __v) { bool __insert_left = (__x != 0 || __p == _M_end() || _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__p))); _Link_type __z = _M_create_node(__v); _Rb_tree_insert_and_rebalance(__insert_left, __z, const_cast<_Base_ptr>(__p), this->_M_impl._M_header); ++_M_impl._M_node_count; return const_iterator(__z); } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_equal(const _Val& __v) { _Link_type __x = _M_begin(); _Link_type __y = _M_end(); while (__x != 0) { __y = __x; __x = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x)) ? _S_left(__x) : _S_right(__x); } return _M_insert(__x, __y, __v); } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_equal_lower(const _Val& __v) { _Link_type __x = _M_begin(); _Link_type __y = _M_end(); while (__x != 0) { __y = __x; __x = !_M_impl._M_key_compare(_S_key(__x), _KeyOfValue()(__v)) ? _S_left(__x) : _S_right(__x); } return _M_insert_lower(__x, __y, __v); } template void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __t) { if (_M_root() == 0) { if (__t._M_root() != 0) { _M_root() = __t._M_root(); _M_leftmost() = __t._M_leftmost(); _M_rightmost() = __t._M_rightmost(); _M_root()->_M_parent = _M_end(); __t._M_root() = 0; __t._M_leftmost() = __t._M_end(); __t._M_rightmost() = __t._M_end(); } } else if (__t._M_root() == 0) { __t._M_root() = _M_root(); __t._M_leftmost() = _M_leftmost(); __t._M_rightmost() = _M_rightmost(); __t._M_root()->_M_parent = __t._M_end(); _M_root() = 0; _M_leftmost() = _M_end(); _M_rightmost() = _M_end(); } else { std::swap(_M_root(),__t._M_root()); std::swap(_M_leftmost(),__t._M_leftmost()); std::swap(_M_rightmost(),__t._M_rightmost()); _M_root()->_M_parent = _M_end(); __t._M_root()->_M_parent = __t._M_end(); } std::swap(this->_M_impl._M_node_count, __t._M_impl._M_node_count); std::swap(this->_M_impl._M_key_compare, __t._M_impl._M_key_compare); std::__alloc_swap<_Node_allocator>:: _S_do_it(_M_get_Node_allocator(), __t._M_get_Node_allocator()); } template pair::iterator, bool> _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_unique(const _Val& __v) { _Link_type __x = _M_begin(); _Link_type __y = _M_end(); bool __comp = true; while (__x != 0) { __y = __x; __comp = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x)); __x = __comp ? _S_left(__x) : _S_right(__x); } iterator __j = iterator(__y); if (__comp) if (__j == begin()) return pair(_M_insert(__x, __y, __v), true); else --__j; if (_M_impl._M_key_compare(_S_key(__j._M_node), _KeyOfValue()(__v))) return pair(_M_insert(__x, __y, __v), true); return pair(__j, false); } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_unique(iterator __position, const _Val& __v) { if (__position._M_node == _M_end()) { if (size() > 0 && _M_impl._M_key_compare(_S_key(_M_rightmost()), _KeyOfValue()(__v))) return _M_insert(0, _M_rightmost(), __v); else return _M_insert_unique(__v).first; } else if (_M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__position._M_node))) { iterator __before = __position; if (__position._M_node == _M_leftmost()) return _M_insert(_M_leftmost(), _M_leftmost(), __v); else if (_M_impl._M_key_compare(_S_key((--__before)._M_node), _KeyOfValue()(__v))) { if (_S_right(__before._M_node) == 0) return _M_insert(0, __before._M_node, __v); else return _M_insert(__position._M_node, __position._M_node, __v); } else return _M_insert_unique(__v).first; } else if (_M_impl._M_key_compare(_S_key(__position._M_node), _KeyOfValue()(__v))) { iterator __after = __position; if (__position._M_node == _M_rightmost()) return _M_insert(0, _M_rightmost(), __v); else if (_M_impl._M_key_compare(_KeyOfValue()(__v), _S_key((++__after)._M_node))) { if (_S_right(__position._M_node) == 0) return _M_insert(0, __position._M_node, __v); else return _M_insert(__after._M_node, __after._M_node, __v); } else return _M_insert_unique(__v).first; } else return __position; } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_unique(const_iterator __position, const _Val& __v) { if (__position._M_node == _M_end()) { if (size() > 0 && _M_impl._M_key_compare(_S_key(_M_rightmost()), _KeyOfValue()(__v))) return _M_insert(0, _M_rightmost(), __v); else return const_iterator(_M_insert_unique(__v).first); } else if (_M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__position._M_node))) { const_iterator __before = __position; if (__position._M_node == _M_leftmost()) return _M_insert(_M_leftmost(), _M_leftmost(), __v); else if (_M_impl._M_key_compare(_S_key((--__before)._M_node), _KeyOfValue()(__v))) { if (_S_right(__before._M_node) == 0) return _M_insert(0, __before._M_node, __v); else return _M_insert(__position._M_node, __position._M_node, __v); } else return const_iterator(_M_insert_unique(__v).first); } else if (_M_impl._M_key_compare(_S_key(__position._M_node), _KeyOfValue()(__v))) { const_iterator __after = __position; if (__position._M_node == _M_rightmost()) return _M_insert(0, _M_rightmost(), __v); else if (_M_impl._M_key_compare(_KeyOfValue()(__v), _S_key((++__after)._M_node))) { if (_S_right(__position._M_node) == 0) return _M_insert(0, __position._M_node, __v); else return _M_insert(__after._M_node, __after._M_node, __v); } else return const_iterator(_M_insert_unique(__v).first); } else return __position; } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_equal(iterator __position, const _Val& __v) { if (__position._M_node == _M_end()) { if (size() > 0 && !_M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(_M_rightmost()))) return _M_insert(0, _M_rightmost(), __v); else return _M_insert_equal(__v); } else if (!_M_impl._M_key_compare(_S_key(__position._M_node), _KeyOfValue()(__v))) { iterator __before = __position; if (__position._M_node == _M_leftmost()) return _M_insert(_M_leftmost(), _M_leftmost(), __v); else if (!_M_impl._M_key_compare(_KeyOfValue()(__v), _S_key((--__before)._M_node))) { if (_S_right(__before._M_node) == 0) return _M_insert(0, __before._M_node, __v); else return _M_insert(__position._M_node, __position._M_node, __v); } else return _M_insert_equal(__v); } else { iterator __after = __position; if (__position._M_node == _M_rightmost()) return _M_insert(0, _M_rightmost(), __v); else if (!_M_impl._M_key_compare(_S_key((++__after)._M_node), _KeyOfValue()(__v))) { if (_S_right(__position._M_node) == 0) return _M_insert(0, __position._M_node, __v); else return _M_insert(__after._M_node, __after._M_node, __v); } else return _M_insert_equal_lower(__v); } } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_equal(const_iterator __position, const _Val& __v) { if (__position._M_node == _M_end()) { if (size() > 0 && !_M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(_M_rightmost()))) return _M_insert(0, _M_rightmost(), __v); else return const_iterator(_M_insert_equal(__v)); } else if (!_M_impl._M_key_compare(_S_key(__position._M_node), _KeyOfValue()(__v))) { const_iterator __before = __position; if (__position._M_node == _M_leftmost()) return _M_insert(_M_leftmost(), _M_leftmost(), __v); else if (!_M_impl._M_key_compare(_KeyOfValue()(__v), _S_key((--__before)._M_node))) { if (_S_right(__before._M_node) == 0) return _M_insert(0, __before._M_node, __v); else return _M_insert(__position._M_node, __position._M_node, __v); } else return const_iterator(_M_insert_equal(__v)); } else { const_iterator __after = __position; if (__position._M_node == _M_rightmost()) return _M_insert(0, _M_rightmost(), __v); else if (!_M_impl._M_key_compare(_S_key((++__after)._M_node), _KeyOfValue()(__v))) { if (_S_right(__position._M_node) == 0) return _M_insert(0, __position._M_node, __v); else return _M_insert(__after._M_node, __after._M_node, __v); } else return const_iterator(_M_insert_equal_lower(__v)); } } template template void _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>:: _M_insert_equal(_II __first, _II __last) { for (; __first != __last; ++__first) _M_insert_equal(end(), *__first); } template template void _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>:: _M_insert_unique(_II __first, _II __last) { for (; __first != __last; ++__first) _M_insert_unique(end(), *__first); } template inline void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: erase(iterator __position) { _Link_type __y = static_cast<_Link_type>(_Rb_tree_rebalance_for_erase (__position._M_node, this->_M_impl._M_header)); _M_destroy_node(__y); --_M_impl._M_node_count; } template inline void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: erase(const_iterator __position) { _Link_type __y = static_cast<_Link_type>(_Rb_tree_rebalance_for_erase (const_cast<_Base_ptr>(__position._M_node), this->_M_impl._M_header)); _M_destroy_node(__y); --_M_impl._M_node_count; } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: erase(const _Key& __x) { pair __p = equal_range(__x); const size_type __old_size = size(); erase(__p.first, __p.second); return __old_size - size(); } template typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::_Link_type _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>:: _M_copy(_Const_Link_type __x, _Link_type __p) { _Link_type __top = _M_clone_node(__x); __top->_M_parent = __p; try { if (__x->_M_right) __top->_M_right = _M_copy(_S_right(__x), __top); __p = __top; __x = _S_left(__x); while (__x != 0) { _Link_type __y = _M_clone_node(__x); __p->_M_left = __y; __y->_M_parent = __p; if (__x->_M_right) __y->_M_right = _M_copy(_S_right(__x), __y); __p = __y; __x = _S_left(__x); } } catch(...) { _M_erase(__top); throw; } return __top; } template void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_erase(_Link_type __x) { while (__x != 0) { _M_erase(_S_right(__x)); _Link_type __y = _S_left(__x); _M_destroy_node(__x); __x = __y; } } template void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: erase(iterator __first, iterator __last) { if (__first == begin() && __last == end()) clear(); else while (__first != __last) erase(__first++); } template void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: erase(const_iterator __first, const_iterator __last) { if (__first == begin() && __last == end()) clear(); else while (__first != __last) erase(__first++); } template void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: erase(const _Key* __first, const _Key* __last) { while (__first != __last) erase(*__first++); } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: find(const _Key& __k) { _Link_type __x = _M_begin(); _Link_type __y = _M_end(); while (__x != 0) if (!_M_impl._M_key_compare(_S_key(__x), __k)) __y = __x, __x = _S_left(__x); else __x = _S_right(__x); iterator __j = iterator(__y); return (__j == end() || _M_impl._M_key_compare(__k, _S_key(__j._M_node))) ? end() : __j; } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: find(const _Key& __k) const { _Const_Link_type __x = _M_begin(); _Const_Link_type __y = _M_end(); while (__x != 0) { if (!_M_impl._M_key_compare(_S_key(__x), __k)) __y = __x, __x = _S_left(__x); else __x = _S_right(__x); } const_iterator __j = const_iterator(__y); return (__j == end() || _M_impl._M_key_compare(__k, _S_key(__j._M_node))) ? end() : __j; } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: count(const _Key& __k) const { pair __p = equal_range(__k); const size_type __n = std::distance(__p.first, __p.second); return __n; } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: lower_bound(const _Key& __k) { _Link_type __x = _M_begin(); _Link_type __y = _M_end(); while (__x != 0) if (!_M_impl._M_key_compare(_S_key(__x), __k)) __y = __x, __x = _S_left(__x); else __x = _S_right(__x); return iterator(__y); } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: lower_bound(const _Key& __k) const { _Const_Link_type __x = _M_begin(); _Const_Link_type __y = _M_end(); while (__x != 0) if (!_M_impl._M_key_compare(_S_key(__x), __k)) __y = __x, __x = _S_left(__x); else __x = _S_right(__x); return const_iterator(__y); } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: upper_bound(const _Key& __k) { _Link_type __x = _M_begin(); _Link_type __y = _M_end(); while (__x != 0) if (_M_impl._M_key_compare(__k, _S_key(__x))) __y = __x, __x = _S_left(__x); else __x = _S_right(__x); return iterator(__y); } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: upper_bound(const _Key& __k) const { _Const_Link_type __x = _M_begin(); _Const_Link_type __y = _M_end(); while (__x != 0) if (_M_impl._M_key_compare(__k, _S_key(__x))) __y = __x, __x = _S_left(__x); else __x = _S_right(__x); return const_iterator(__y); } template inline pair::iterator, typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator> _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: equal_range(const _Key& __k) { return pair(lower_bound(__k), upper_bound(__k)); } template inline pair::const_iterator, typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::const_iterator> _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>:: equal_range(const _Key& __k) const { return pair(lower_bound(__k), upper_bound(__k)); } unsigned int _Rb_tree_black_count(const _Rb_tree_node_base* __node, const _Rb_tree_node_base* __root); template bool _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::__rb_verify() const { if (_M_impl._M_node_count == 0 || begin() == end()) return _M_impl._M_node_count == 0 && begin() == end() && this->_M_impl._M_header._M_left == _M_end() && this->_M_impl._M_header._M_right == _M_end(); unsigned int __len = _Rb_tree_black_count(_M_leftmost(), _M_root()); for (const_iterator __it = begin(); __it != end(); ++__it) { _Const_Link_type __x = static_cast<_Const_Link_type>(__it._M_node); _Const_Link_type __L = _S_left(__x); _Const_Link_type __R = _S_right(__x); if (__x->_M_color == _S_red) if ((__L && __L->_M_color == _S_red) || (__R && __R->_M_color == _S_red)) return false; if (__L && _M_impl._M_key_compare(_S_key(__x), _S_key(__L))) return false; if (__R && _M_impl._M_key_compare(_S_key(__R), _S_key(__x))) return false; if (!__L && !__R && _Rb_tree_black_count(__x, _M_root()) != __len) return false; } if (_M_leftmost() != _Rb_tree_node_base::_S_minimum(_M_root())) return false; if (_M_rightmost() != _Rb_tree_node_base::_S_maximum(_M_root())) return false; return true; } } # 66 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/map" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 1 3 # 68 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 91 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3 template , typename _Alloc = std::allocator > > class map { public: typedef _Key key_type; typedef _Tp mapped_type; typedef std::pair value_type; typedef _Compare key_compare; typedef _Alloc allocator_type; private: typedef typename _Alloc::value_type _Alloc_value_type; public: class value_compare : public std::binary_function { friend class map<_Key, _Tp, _Compare, _Alloc>; protected: _Compare comp; value_compare(_Compare __c) : comp(__c) { } public: bool operator()(const value_type& __x, const value_type& __y) const { return comp(__x.first, __y.first); } }; private: typedef typename _Alloc::template rebind::other _Pair_alloc_type; typedef _Rb_tree, key_compare, _Pair_alloc_type> _Rep_type; _Rep_type _M_t; public: typedef typename _Pair_alloc_type::pointer pointer; typedef typename _Pair_alloc_type::const_pointer const_pointer; typedef typename _Pair_alloc_type::reference reference; typedef typename _Pair_alloc_type::const_reference const_reference; typedef typename _Rep_type::iterator iterator; typedef typename _Rep_type::const_iterator const_iterator; typedef typename _Rep_type::size_type size_type; typedef typename _Rep_type::difference_type difference_type; typedef typename _Rep_type::reverse_iterator reverse_iterator; typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; map() : _M_t(_Compare(), allocator_type()) { } explicit map(const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_t(__comp, __a) { } # 175 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3 map(const map& __x) : _M_t(__x._M_t) { } # 187 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3 template map(_InputIterator __first, _InputIterator __last) : _M_t(_Compare(), allocator_type()) { _M_t._M_insert_unique(__first, __last); } # 203 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3 template map(_InputIterator __first, _InputIterator __last, const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_t(__comp, __a) { _M_t._M_insert_unique(__first, __last); } # 225 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3 map& operator=(const map& __x) { _M_t = __x._M_t; return *this; } allocator_type get_allocator() const { return _M_t.get_allocator(); } iterator begin() { return _M_t.begin(); } const_iterator begin() const { return _M_t.begin(); } iterator end() { return _M_t.end(); } const_iterator end() const { return _M_t.end(); } reverse_iterator rbegin() { return _M_t.rbegin(); } const_reverse_iterator rbegin() const { return _M_t.rbegin(); } reverse_iterator rend() { return _M_t.rend(); } const_reverse_iterator rend() const { return _M_t.rend(); } bool empty() const { return _M_t.empty(); } size_type size() const { return _M_t.size(); } size_type max_size() const { return _M_t.max_size(); } # 341 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3 mapped_type& operator[](const key_type& __k) { iterator __i = lower_bound(__k); if (__i == end() || key_comp()(__k, (*__i).first)) __i = insert(__i, value_type(__k, mapped_type())); return (*__i).second; } # 363 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3 mapped_type& at(const key_type& __k) { iterator __i = lower_bound(__k); if (__i == end() || key_comp()(__k, (*__i).first)) __throw_out_of_range(("map::at")); return (*__i).second; } const mapped_type& at(const key_type& __k) const { const_iterator __i = lower_bound(__k); if (__i == end() || key_comp()(__k, (*__i).first)) __throw_out_of_range(("map::at")); return (*__i).second; } # 398 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3 std::pair insert(const value_type& __x) { return _M_t._M_insert_unique(__x); } # 425 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3 iterator insert(iterator __position, const value_type& __x) { return _M_t._M_insert_unique(__position, __x); } # 437 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3 template void insert(_InputIterator __first, _InputIterator __last) { _M_t._M_insert_unique(__first, __last); } # 452 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3 void erase(iterator __position) { _M_t.erase(__position); } # 467 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3 size_type erase(const key_type& __x) { return _M_t.erase(__x); } # 482 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3 void erase(iterator __first, iterator __last) { _M_t.erase(__first, __last); } # 497 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3 void swap(map& __x) { _M_t.swap(__x._M_t); } void clear() { _M_t.clear(); } key_compare key_comp() const { return _M_t.key_comp(); } value_compare value_comp() const { return value_compare(_M_t.key_comp()); } # 540 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3 iterator find(const key_type& __x) { return _M_t.find(__x); } # 555 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3 const_iterator find(const key_type& __x) const { return _M_t.find(__x); } # 567 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3 size_type count(const key_type& __x) const { return _M_t.find(__x) == _M_t.end() ? 0 : 1; } # 582 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3 iterator lower_bound(const key_type& __x) { return _M_t.lower_bound(__x); } # 597 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3 const_iterator lower_bound(const key_type& __x) const { return _M_t.lower_bound(__x); } iterator upper_bound(const key_type& __x) { return _M_t.upper_bound(__x); } const_iterator upper_bound(const key_type& __x) const { return _M_t.upper_bound(__x); } # 636 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3 std::pair equal_range(const key_type& __x) { return _M_t.equal_range(__x); } # 655 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3 std::pair equal_range(const key_type& __x) const { return _M_t.equal_range(__x); } template friend bool operator== (const map<_K1, _T1, _C1, _A1>&, const map<_K1, _T1, _C1, _A1>&); template friend bool operator< (const map<_K1, _T1, _C1, _A1>&, const map<_K1, _T1, _C1, _A1>&); }; # 680 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3 template inline bool operator==(const map<_Key, _Tp, _Compare, _Alloc>& __x, const map<_Key, _Tp, _Compare, _Alloc>& __y) { return __x._M_t == __y._M_t; } # 697 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_map.h" 3 template inline bool operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x, const map<_Key, _Tp, _Compare, _Alloc>& __y) { return __x._M_t < __y._M_t; } template inline bool operator!=(const map<_Key, _Tp, _Compare, _Alloc>& __x, const map<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__x == __y); } template inline bool operator>(const map<_Key, _Tp, _Compare, _Alloc>& __x, const map<_Key, _Tp, _Compare, _Alloc>& __y) { return __y < __x; } template inline bool operator<=(const map<_Key, _Tp, _Compare, _Alloc>& __x, const map<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__y < __x); } template inline bool operator>=(const map<_Key, _Tp, _Compare, _Alloc>& __x, const map<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__x < __y); } template inline void swap(map<_Key, _Tp, _Compare, _Alloc>& __x, map<_Key, _Tp, _Compare, _Alloc>& __y) { __x.swap(__y); } } # 67 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/map" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 1 3 # 66 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 89 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3 template , typename _Alloc = std::allocator > > class multimap { public: typedef _Key key_type; typedef _Tp mapped_type; typedef std::pair value_type; typedef _Compare key_compare; typedef _Alloc allocator_type; private: typedef typename _Alloc::value_type _Alloc_value_type; public: class value_compare : public std::binary_function { friend class multimap<_Key, _Tp, _Compare, _Alloc>; protected: _Compare comp; value_compare(_Compare __c) : comp(__c) { } public: bool operator()(const value_type& __x, const value_type& __y) const { return comp(__x.first, __y.first); } }; private: typedef typename _Alloc::template rebind::other _Pair_alloc_type; typedef _Rb_tree, key_compare, _Pair_alloc_type> _Rep_type; _Rep_type _M_t; public: typedef typename _Pair_alloc_type::pointer pointer; typedef typename _Pair_alloc_type::const_pointer const_pointer; typedef typename _Pair_alloc_type::reference reference; typedef typename _Pair_alloc_type::const_reference const_reference; typedef typename _Rep_type::iterator iterator; typedef typename _Rep_type::const_iterator const_iterator; typedef typename _Rep_type::size_type size_type; typedef typename _Rep_type::difference_type difference_type; typedef typename _Rep_type::reverse_iterator reverse_iterator; typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; multimap() : _M_t(_Compare(), allocator_type()) { } explicit multimap(const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_t(__comp, __a) { } # 173 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3 multimap(const multimap& __x) : _M_t(__x._M_t) { } # 185 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3 template multimap(_InputIterator __first, _InputIterator __last) : _M_t(_Compare(), allocator_type()) { _M_t._M_insert_equal(__first, __last); } # 201 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3 template multimap(_InputIterator __first, _InputIterator __last, const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_t(__comp, __a) { _M_t._M_insert_equal(__first, __last); } # 224 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3 multimap& operator=(const multimap& __x) { _M_t = __x._M_t; return *this; } allocator_type get_allocator() const { return _M_t.get_allocator(); } iterator begin() { return _M_t.begin(); } const_iterator begin() const { return _M_t.begin(); } iterator end() { return _M_t.end(); } const_iterator end() const { return _M_t.end(); } reverse_iterator rbegin() { return _M_t.rbegin(); } const_reverse_iterator rbegin() const { return _M_t.rbegin(); } reverse_iterator rend() { return _M_t.rend(); } const_reverse_iterator rend() const { return _M_t.rend(); } bool empty() const { return _M_t.empty(); } size_type size() const { return _M_t.size(); } size_type max_size() const { return _M_t.max_size(); } # 338 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3 iterator insert(const value_type& __x) { return _M_t._M_insert_equal(__x); } # 362 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3 iterator insert(iterator __position, const value_type& __x) { return _M_t._M_insert_equal(__position, __x); } # 374 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3 template void insert(_InputIterator __first, _InputIterator __last) { _M_t._M_insert_equal(__first, __last); } # 389 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3 void erase(iterator __position) { _M_t.erase(__position); } # 404 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3 size_type erase(const key_type& __x) { return _M_t.erase(__x); } # 419 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3 void erase(iterator __first, iterator __last) { _M_t.erase(__first, __last); } # 434 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3 void swap(multimap& __x) { _M_t.swap(__x._M_t); } void clear() { _M_t.clear(); } key_compare key_comp() const { return _M_t.key_comp(); } value_compare value_comp() const { return value_compare(_M_t.key_comp()); } # 477 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3 iterator find(const key_type& __x) { return _M_t.find(__x); } # 492 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3 const_iterator find(const key_type& __x) const { return _M_t.find(__x); } size_type count(const key_type& __x) const { return _M_t.count(__x); } # 516 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3 iterator lower_bound(const key_type& __x) { return _M_t.lower_bound(__x); } # 531 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3 const_iterator lower_bound(const key_type& __x) const { return _M_t.lower_bound(__x); } iterator upper_bound(const key_type& __x) { return _M_t.upper_bound(__x); } const_iterator upper_bound(const key_type& __x) const { return _M_t.upper_bound(__x); } # 568 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3 std::pair equal_range(const key_type& __x) { return _M_t.equal_range(__x); } # 585 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3 std::pair equal_range(const key_type& __x) const { return _M_t.equal_range(__x); } template friend bool operator== (const multimap<_K1, _T1, _C1, _A1>&, const multimap<_K1, _T1, _C1, _A1>&); template friend bool operator< (const multimap<_K1, _T1, _C1, _A1>&, const multimap<_K1, _T1, _C1, _A1>&); }; # 610 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3 template inline bool operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return __x._M_t == __y._M_t; } # 627 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_multimap.h" 3 template inline bool operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return __x._M_t < __y._M_t; } template inline bool operator!=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__x == __y); } template inline bool operator>(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return __y < __x; } template inline bool operator<=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__y < __x); } template inline bool operator>=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__x < __y); } template inline void swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x, multimap<_Key, _Tp, _Compare, _Alloc>& __y) { __x.swap(__y); } } # 68 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/map" 2 3 # 27 "../include/vigra/cachedfileimage.hxx" 2 # 46 "../include/vigra/cachedfileimage.hxx" # 1 "/usr/include/boost/pool/pool.hpp" 1 3 4 # 15 "/usr/include/boost/pool/pool.hpp" 3 4 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/functional" 1 3 4 # 51 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/functional" 3 4 # 52 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/functional" 3 # 16 "/usr/include/boost/pool/pool.hpp" 2 3 4 # 27 "/usr/include/boost/pool/pool.hpp" 3 4 # 1 "/usr/include/boost/pool/poolfwd.hpp" 1 3 4 # 18 "/usr/include/boost/pool/poolfwd.hpp" 3 4 # 1 "/usr/include/boost/pool/detail/mutex.hpp" 1 3 4 # 53 "/usr/include/boost/pool/detail/mutex.hpp" 3 4 namespace boost { namespace details { namespace pool { # 88 "/usr/include/boost/pool/detail/mutex.hpp" 3 4 class pthread_mutex { private: pthread_mutex_t mtx; pthread_mutex(const pthread_mutex &); void operator=(const pthread_mutex &); public: pthread_mutex() { pthread_mutex_init(&mtx, 0); } ~pthread_mutex() { pthread_mutex_destroy(&mtx); } void lock() { pthread_mutex_lock(&mtx); } void unlock() { pthread_mutex_unlock(&mtx); } }; class null_mutex { private: null_mutex(const null_mutex &); void operator=(const null_mutex &); public: null_mutex() { } static void lock() { } static void unlock() { } }; typedef pthread_mutex default_mutex; } } } # 19 "/usr/include/boost/pool/poolfwd.hpp" 2 3 4 namespace boost { template class simple_segregated_storage; struct default_user_allocator_new_delete; struct default_user_allocator_malloc_free; template class pool; template class object_pool; template struct singleton_pool; struct pool_allocator_tag; template class pool_allocator; struct fast_pool_allocator_tag; template class fast_pool_allocator; } # 28 "/usr/include/boost/pool/pool.hpp" 2 3 4 # 1 "/usr/include/boost/pool/detail/ct_gcd_lcm.hpp" 1 3 4 # 13 "/usr/include/boost/pool/detail/ct_gcd_lcm.hpp" 3 4 # 1 "/usr/include/boost/type_traits/ice.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/ice.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/yes_no_type.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/yes_no_type.hpp" 3 4 namespace boost { namespace type_traits { typedef char yes_type; struct no_type { char padding[8]; }; } } # 15 "/usr/include/boost/type_traits/ice.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/detail/ice_or.hpp" 1 3 4 # 13 "/usr/include/boost/type_traits/detail/ice_or.hpp" 3 4 namespace boost { namespace type_traits { template struct ice_or; template struct ice_or { static const bool value = true; }; template <> struct ice_or { static const bool value = false; }; } } # 16 "/usr/include/boost/type_traits/ice.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/detail/ice_and.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/ice_and.hpp" 3 4 namespace boost { namespace type_traits { template struct ice_and; template struct ice_and { static const bool value = false; }; template <> struct ice_and { static const bool value = true; }; } } # 17 "/usr/include/boost/type_traits/ice.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/detail/ice_not.hpp" 1 3 4 # 13 "/usr/include/boost/type_traits/detail/ice_not.hpp" 3 4 namespace boost { namespace type_traits { template struct ice_not { static const bool value = true; }; template <> struct ice_not { static const bool value = false; }; } } # 18 "/usr/include/boost/type_traits/ice.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/detail/ice_eq.hpp" 1 3 4 # 13 "/usr/include/boost/type_traits/detail/ice_eq.hpp" 3 4 namespace boost { namespace type_traits { template struct ice_eq { static const bool value = (b1 == b2); }; template struct ice_ne { static const bool value = (b1 != b2); }; template bool const ice_eq::value; template bool const ice_ne::value; } } # 19 "/usr/include/boost/type_traits/ice.hpp" 2 3 4 # 14 "/usr/include/boost/pool/detail/ct_gcd_lcm.hpp" 2 3 4 namespace boost { namespace details { namespace pool { # 31 "/usr/include/boost/pool/detail/ct_gcd_lcm.hpp" 3 4 namespace details { template struct ct_gcd_helper; template struct ct_gcd_helper { static const unsigned A_mod_B_ = A % B; static const unsigned value = (::boost::details::pool::details::ct_gcd_helper< B, static_cast(A_mod_B_), ::boost::type_traits::ice_eq::value >::value); }; template struct ct_gcd_helper { static const unsigned value = A; }; } template struct ct_gcd { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( A != 0 && B != 0 ) >)> boost_static_assert_typedef_54; static const unsigned value = (::boost::details::pool::details::ct_gcd_helper::value); }; # 92 "/usr/include/boost/pool/detail/ct_gcd_lcm.hpp" 3 4 template struct ct_lcm { static const unsigned value = (A / ::boost::details::pool::ct_gcd::value * B); }; } } } # 31 "/usr/include/boost/pool/pool.hpp" 2 3 4 # 1 "/usr/include/boost/pool/detail/gcd_lcm.hpp" 1 3 4 # 12 "/usr/include/boost/pool/detail/gcd_lcm.hpp" 3 4 namespace boost { namespace details { namespace pool { # 25 "/usr/include/boost/pool/detail/gcd_lcm.hpp" 3 4 template Integer gcd(Integer A, Integer B) { do { const Integer tmp(B); B = A % B; A = tmp; } while (B != 0); return A; } template Integer lcm(const Integer & A, const Integer & B) { Integer ret = A; ret /= gcd(A, B); ret *= B; return ret; } } } } # 33 "/usr/include/boost/pool/pool.hpp" 2 3 4 # 1 "/usr/include/boost/pool/simple_segregated_storage.hpp" 1 3 4 # 17 "/usr/include/boost/pool/simple_segregated_storage.hpp" 3 4 namespace boost { template class simple_segregated_storage { public: typedef SizeType size_type; private: simple_segregated_storage(const simple_segregated_storage &); void operator=(const simple_segregated_storage &); static void * try_malloc_n(void * & start, size_type n, size_type partition_size); protected: void * first; void * find_prev(void * ptr); static void * & nextof(void * const ptr) { return *(static_cast(ptr)); } public: simple_segregated_storage() :first(0) { } # 61 "/usr/include/boost/pool/simple_segregated_storage.hpp" 3 4 static void * segregate(void * block, size_type nsz, size_type npartition_sz, void * end = 0); void add_block(void * const block, const size_type nsz, const size_type npartition_sz) { first = segregate(block, nsz, npartition_sz, first); } void add_ordered_block(void * const block, const size_type nsz, const size_type npartition_sz) { void * const loc = find_prev(block); if (loc == 0) add_block(block, nsz, npartition_sz); else nextof(loc) = segregate(block, nsz, npartition_sz, nextof(loc)); } bool empty() const { return (first == 0); } void * malloc() { void * const ret = first; first = nextof(first); return ret; } void free(void * const chunk) { nextof(chunk) = first; first = chunk; } void ordered_free(void * const chunk) { void * const loc = find_prev(chunk); if (loc == 0) free(chunk); else { nextof(chunk) = nextof(loc); nextof(loc) = chunk; } } void * malloc_n(size_type n, size_type partition_size); void free_n(void * const chunks, const size_type n, const size_type partition_size) { add_block(chunks, n * partition_size, partition_size); } void ordered_free_n(void * const chunks, const size_type n, const size_type partition_size) { add_ordered_block(chunks, n * partition_size, partition_size); } }; template void * simple_segregated_storage::find_prev(void * const ptr) { if (first == 0 || std::greater()(first, ptr)) return 0; void * iter = first; while (true) { if (nextof(iter) == 0 || std::greater()(nextof(iter), ptr)) return iter; iter = nextof(iter); } } template void * simple_segregated_storage::segregate( void * const block, const size_type sz, const size_type partition_sz, void * const end) { char * old = static_cast(block) + ((sz - partition_sz) / partition_sz) * partition_sz; nextof(old) = end; if (old == block) return block; for (char * iter = old - partition_sz; iter != block; old = iter, iter -= partition_sz) nextof(iter) = old; nextof(block) = old; return block; } # 227 "/usr/include/boost/pool/simple_segregated_storage.hpp" 3 4 template void * simple_segregated_storage::try_malloc_n( void * & start, size_type n, const size_type partition_size) { void * iter = nextof(start); while (--n != 0) { void * next = nextof(iter); if (next != static_cast(iter) + partition_size) { start = iter; return 0; } iter = next; } return iter; } template void * simple_segregated_storage::malloc_n(const size_type n, const size_type partition_size) { void * start = &first; void * iter; do { if (nextof(start) == 0) return 0; iter = try_malloc_n(start, n, partition_size); } while (iter == 0); void * const ret = nextof(start); nextof(start) = nextof(iter); return ret; } } # 35 "/usr/include/boost/pool/pool.hpp" 2 3 4 # 47 "/usr/include/boost/pool/pool.hpp" 3 4 namespace boost { struct default_user_allocator_new_delete { typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; static char * malloc(const size_type bytes) { return new (std::nothrow) char[bytes]; } static void free(char * const block) { delete [] block; } }; struct default_user_allocator_malloc_free { typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; static char * malloc(const size_type bytes) { return reinterpret_cast(std::malloc(bytes)); } static void free(char * const block) { std::free(block); } }; namespace details { template class PODptr { public: typedef SizeType size_type; private: char * ptr; size_type sz; char * ptr_next_size() const { return (ptr + sz - sizeof(size_type)); } char * ptr_next_ptr() const { return (ptr_next_size() - pool::ct_lcm::value); } public: PODptr(char * const nptr, const size_type nsize) :ptr(nptr), sz(nsize) { } PODptr() :ptr(0), sz(0) { } bool valid() const { return (begin() != 0); } void invalidate() { begin() = 0; } char * & begin() { return ptr; } char * begin() const { return ptr; } char * end() const { return ptr_next_ptr(); } size_type total_size() const { return sz; } size_type element_size() const { return (sz - sizeof(size_type) - pool::ct_lcm::value); } size_type & next_size() const { return *(reinterpret_cast(ptr_next_size())); } char * & next_ptr() const { return *(reinterpret_cast(ptr_next_ptr())); } PODptr next() const { return PODptr(next_ptr(), next_size()); } void next(const PODptr & arg) const { next_ptr() = arg.begin(); next_size() = arg.total_size(); } }; } template class pool: protected simple_segregated_storage< typename UserAllocator::size_type> { public: typedef UserAllocator user_allocator; typedef typename UserAllocator::size_type size_type; typedef typename UserAllocator::difference_type difference_type; private: static const unsigned min_alloc_size = (::boost::details::pool::ct_lcm::value); void * malloc_need_resize(); void * ordered_malloc_need_resize(); protected: details::PODptr list; simple_segregated_storage & store() { return *this; } const simple_segregated_storage & store() const { return *this; } const size_type requested_size; size_type next_size; details::PODptr find_POD(void * const chunk) const; static bool is_from(void * const chunk, char * const i, const size_type sizeof_i) { # 175 "/usr/include/boost/pool/pool.hpp" 3 4 std::less_equal lt_eq; std::less lt; return (lt_eq(i, chunk) && lt(chunk, i + sizeof_i)); } size_type alloc_size() const { const unsigned min_size = min_alloc_size; return details::pool::lcm(requested_size, min_size); } static void * & nextof(void * const ptr) { return *(static_cast(ptr)); } public: explicit pool(const size_type nrequested_size, const size_type nnext_size = 32) :list(0, 0), requested_size(nrequested_size), next_size(nnext_size) { } ~pool() { purge_memory(); } bool release_memory(); bool purge_memory(); size_type get_next_size() const { return next_size; } void set_next_size(const size_type nnext_size) { next_size = nnext_size; } void * malloc() { if (!store().empty()) return store().malloc(); return malloc_need_resize(); } void * ordered_malloc() { if (!store().empty()) return store().malloc(); return ordered_malloc_need_resize(); } void * ordered_malloc(size_type n); void free(void * const chunk) { store().free(chunk); } void ordered_free(void * const chunk) { store().ordered_free(chunk); } void free(void * const chunks, const size_type n) { const size_type partition_size = alloc_size(); const size_type total_req_size = n * requested_size; const size_type num_chunks = total_req_size / partition_size + ((total_req_size % partition_size) ? true : false); store().free_n(chunks, num_chunks, partition_size); } void ordered_free(void * const chunks, const size_type n) { const size_type partition_size = alloc_size(); const size_type total_req_size = n * requested_size; const size_type num_chunks = total_req_size / partition_size + ((total_req_size % partition_size) ? true : false); store().ordered_free_n(chunks, num_chunks, partition_size); } bool is_from(void * const chunk) const { return (find_POD(chunk).valid()); } }; template bool pool::release_memory() { bool ret = false; details::PODptr ptr = list; details::PODptr prev; void * free = this->first; void * prev_free = 0; const size_type partition_size = alloc_size(); while (ptr.valid()) { # 316 "/usr/include/boost/pool/pool.hpp" 3 4 if (free == 0) return ret; bool all_chunks_free = true; void * saved_free = free; for (char * i = ptr.begin(); i != ptr.end(); i += partition_size) { if (i != free) { all_chunks_free = false; free = saved_free; break; } free = nextof(free); } const details::PODptr next = ptr.next(); if (!all_chunks_free) { if (is_from(free, ptr.begin(), ptr.element_size())) { std::less lt; void * const end = ptr.end(); do { prev_free = free; free = nextof(free); } while (free && lt(free, end)); } # 370 "/usr/include/boost/pool/pool.hpp" 3 4 prev = ptr; } else { if (prev.valid()) prev.next(next); else list = next; if (prev_free != 0) nextof(prev_free) = free; else this->first = free; UserAllocator::free(ptr.begin()); ret = true; } ptr = next; } return ret; } template bool pool::purge_memory() { details::PODptr iter = list; if (!iter.valid()) return false; do { const details::PODptr next = iter.next(); UserAllocator::free(iter.begin()); iter = next; } while (iter.valid()); list.invalidate(); this->first = 0; return true; } template void * pool::malloc_need_resize() { const size_type partition_size = alloc_size(); const size_type POD_size = next_size * partition_size + details::pool::ct_lcm::value + sizeof(size_type); char * const ptr = UserAllocator::malloc(POD_size); if (ptr == 0) return 0; const details::PODptr node(ptr, POD_size); next_size <<= 1; store().add_block(node.begin(), node.element_size(), partition_size); node.next(list); list = node; return store().malloc(); } template void * pool::ordered_malloc_need_resize() { const size_type partition_size = alloc_size(); const size_type POD_size = next_size * partition_size + details::pool::ct_lcm::value + sizeof(size_type); char * const ptr = UserAllocator::malloc(POD_size); if (ptr == 0) return 0; const details::PODptr node(ptr, POD_size); next_size <<= 1; store().add_block(node.begin(), node.element_size(), partition_size); if (!list.valid() || std::greater()(list.begin(), node.begin())) { node.next(list); list = node; } else { details::PODptr prev = list; while (true) { if (prev.next_ptr() == 0 || std::greater()(prev.next_ptr(), node.begin())) break; prev = prev.next(); } node.next(prev.next()); prev.next(node); } return store().malloc(); } template void * pool::ordered_malloc(const size_type n) { const size_type partition_size = alloc_size(); const size_type total_req_size = n * requested_size; const size_type num_chunks = total_req_size / partition_size + ((total_req_size % partition_size) ? true : false); void * ret = store().malloc_n(num_chunks, partition_size); if (ret != 0) return ret; using std::max; next_size = max (next_size, num_chunks); const size_type POD_size = next_size * partition_size + details::pool::ct_lcm::value + sizeof(size_type); char * const ptr = UserAllocator::malloc(POD_size); if (ptr == 0) return 0; const details::PODptr node(ptr, POD_size); if (next_size > num_chunks) store().add_block(node.begin() + num_chunks * partition_size, node.element_size() - num_chunks * partition_size, partition_size); next_size <<= 1; if (!list.valid() || std::greater()(list.begin(), node.begin())) { node.next(list); list = node; } else { details::PODptr prev = list; while (true) { if (prev.next_ptr() == 0 || std::greater()(prev.next_ptr(), node.begin())) break; prev = prev.next(); } node.next(prev.next()); prev.next(node); } return node.begin(); } template details::PODptr::size_type> pool::find_POD(void * const chunk) const { details::PODptr iter = list; while (iter.valid()) { if (is_from(chunk, iter.begin(), iter.element_size())) return iter; iter = iter.next(); } return iter; } } # 47 "../include/vigra/cachedfileimage.hxx" 2 # 1 "../include/vigra/error.hxx" 1 # 49 "../include/vigra/cachedfileimage.hxx" 2 # 1 "../include/vigra/metaprogramming.hxx" 1 # 50 "../include/vigra/cachedfileimage.hxx" 2 # 1 "../include/vigra/utilities.hxx" 1 # 51 "../include/vigra/cachedfileimage.hxx" 2 using std::cout; using std::endl; using std::list; using std::map; using std::min; namespace vigra { class CachedFileImageBase { public: virtual ~CachedFileImageBase() { } virtual int numBlocksAllocated() const = 0; virtual int numBlocksNeeded() const = 0; virtual void swapOutBlock() const = 0; virtual void printBlockStats() const = 0; }; template class CachedFileImage; class CachedFileImageDirector { public: ~CachedFileImageDirector() { # 96 "../include/vigra/cachedfileimage.hxx" } static CachedFileImageDirector &v() { static CachedFileImageDirector instance; return instance; } void* allocateBlock() { void *block = pool->malloc(); pool->set_next_size(1); if (block == __null) throw std::bad_alloc(); return block; } void deallocateBlock(void* block) { if (block != __null) pool->free(block); } void setAllocation(long long bytes) { vigra::throw_precondition_error((imageList.empty()), "CachedFileImageDirector: " "attempt to change allocation after images have already " "been created."); managedBytes = bytes; managedBlocks = (int)ceil(managedBytes / (double)blocksize); blocksAvailable = managedBlocks; } void setBlockSize(int bytes) { vigra::throw_precondition_error((imageList.empty()), "CachedFileImageDirector: " "attempt to change block size after images have already " "been created."); blocksize = bytes; delete pool; pool = new boost::pool<>(blocksize); managedBlocks = (int)ceil(managedBytes / (double)blocksize); blocksAvailable = managedBlocks; } int getBlockSize() { return blocksize; } int getManagedBlocks() { return managedBlocks; } int getBlocksAvailable() { return blocksAvailable; } int requestBlocksForNewImage(int blocks, CachedFileImageBase const * image) { int blocksAllocated = 0; if (blocksAvailable > 0) { blocksAllocated = 1; blocksAvailable--; } else { blocksAvailable += freeBlock(image); if (blocksAvailable == 0) { throw std::runtime_error("CachedFileImageDirector::requestBlocksForNewImage(): " "no blocks available and attempt to free blocks failed."); } blocksAllocated = blocksAvailable; blocksAvailable = 0; } imageList.push_back(image); imageToMissMap[image] = 0LL; # 200 "../include/vigra/cachedfileimage.hxx" return blocksAllocated; } void returnBlocksUnregisterImage(int blocks, CachedFileImageBase const * image) { blocksAvailable += blocks; imageList.remove(image); # 215 "../include/vigra/cachedfileimage.hxx" } int registerCacheMiss(CachedFileImageBase const * image) { cacheMisses++; imageToMissMap[image]++; imageList.remove(image); if (blocksAvailable == 0) { blocksAvailable += freeBlock(image); } imageList.push_back(image); if (blocksAvailable > 0) { blocksAvailable--; return 1; } else { return 0; } } long long getCacheMisses() { return cacheMisses; } long long getCacheMisses(CachedFileImageBase const * image) { return imageToMissMap[image]; } void resetCacheMisses() { cacheMisses = 0LL; map::iterator i; for (i = imageToMissMap.begin(); i != imageToMissMap.end(); i++) { (*i).second = 0LL; } } void printStats() { cout << "Summary: cache misses=" << cacheMisses << " blocks managed=" << managedBlocks << " allocated=" << (managedBlocks - blocksAvailable) << " free=" << blocksAvailable << endl; } void printStats(const char * imageName, const CachedFileImageBase * image) { cout << imageName << " " << image << ":" << " cache misses=" << imageToMissMap[image] << " blocks allocated=" << image->numBlocksAllocated() << " blocks required=" << image->numBlocksNeeded() << endl; } void printStats(const char * imageName, const int imageNumber, const CachedFileImageBase * image) { cout << imageName << imageNumber << " " << image << ":" << " cache misses=" << imageToMissMap[image] << " blocks allocated=" << image->numBlocksAllocated() << " blocks required=" << image->numBlocksNeeded() << endl; } void printAllBlockStats() { list::iterator i; for (i = imageList.begin(); i != imageList.end(); i++) { (*i)->printBlockStats(); } } protected: CachedFileImageDirector() : blocksize(2<<20), managedBytes(1LL<<30), cacheMisses(0), imageList(), imageToMissMap() { managedBlocks = (int)ceil(managedBytes / (double)blocksize); blocksAvailable = managedBlocks; pool = new boost::pool<>(blocksize); } int freeBlock(CachedFileImageBase const * image) { list::iterator i; for (i = imageList.begin(); i != imageList.end(); i++) { CachedFileImageBase const * candidate = *i; if (candidate->numBlocksAllocated() > (1+image->numBlocksAllocated())) { candidate->swapOutBlock(); imageList.erase(i); imageList.push_back(candidate); return 1; } } # 366 "../include/vigra/cachedfileimage.hxx" return 0; } int blocksize; long long managedBytes; int managedBlocks; int blocksAvailable; long long cacheMisses; boost::pool<> *pool; list imageList; map imageToMissMap; }; template class CachedFileSequentialAccessIteratorPolicy { public: typedef Iterator BaseType; typedef typename Iterator::value_type value_type; typedef typename Iterator::difference_type::MoveX difference_type; typedef typename Iterator::reference reference; typedef typename Iterator::index_reference index_reference; typedef typename Iterator::pointer pointer; typedef typename Iterator::iterator_category iterator_category; static void initialize(BaseType & d) { } static reference dereference(BaseType const & d) { return *d; } static index_reference dereference(BaseType const & d, difference_type n) { int width = d.i->width(); int dy = n / width; int dx = n % width; if (d.x() + dx >= width) {dy++; dx -= width;} else if (d.x() + dx < 0) {dy--; dx += width;} return d(dx, dy); } static bool equal(BaseType const & d1, BaseType const & d2) { int width1 = d1.i->width(); int width2 = d2.i->width(); return (d1.y()*width1 + d1.x()) == (d2.y()*width2 + d2.x()); } static bool less(BaseType const & d1, BaseType const & d2) { int width1 = d1.i->width(); int width2 = d2.i->width(); return (d1.y()*width1 + d1.x()) < (d2.y()*width2 + d2.x()); } static difference_type difference(BaseType const & d1, BaseType const & d2) { int width1 = d1.i->width(); int width2 = d2.i->width(); return (d1.y()*width1 + d1.x()) - (d2.y()*width2 + d2.x()); } static void increment(BaseType & d) { ++d.x; if (d.x() == d.i->width()) { d.x = 0; ++d.y; } } static void decrement(BaseType & d) { --d.x; if (d.x() < 0) { d.x = d.i->width() - 1; --d.y; } } static void advance(BaseType & d, difference_type n) { int width = d.i->width(); int dy = n / width; int dx = n % width; d.x += dx; d.y += dy; if (d.x() >= width) {++d.y; d.x -= width;} if (d.x() < 0) {--d.y; d.x += width;} } }; namespace cfi_detail { template class DirectionSelector; template class DirectionSelector { public: DirectionSelector(T base=0) : current_(base) {} DirectionSelector(DirectionSelector const & rhs) : current_(rhs.current_) {} DirectionSelector & operator=(DirectionSelector const & rhs) { current_ = rhs.current_; return *this; } void operator++() { ++current_; } void operator++(int) { ++current_; } void operator--() { --current_; } void operator--(int) { --current_; } void operator+=(int dx) { current_ += dx; } void operator-=(int dx) { current_ -= dx; } bool operator==(DirectionSelector const & rhs) const { return (current_ == rhs.current_); } bool operator!=(DirectionSelector const & rhs) const { return (current_ != rhs.current_); } bool operator<(DirectionSelector const & rhs) const { return (current_ < rhs.current_); } bool operator<=(DirectionSelector const & rhs) const { return (current_ <= rhs.current_); } bool operator>(DirectionSelector const & rhs) const { return (current_ > rhs.current_); } bool operator>=(DirectionSelector const & rhs) const { return (current_ >= rhs.current_); } int operator-(DirectionSelector const & rhs) const { return (current_ - rhs.current_); } T operator()() const { return current_; } T operator()(int d) const { return (current_ + d); } T current_; }; template class DirectionSelector { public: DirectionSelector(int stride=1, T base=0) : stride_(stride), current_(base) {} DirectionSelector(DirectionSelector const & rhs) : stride_(rhs.stride_), current_(rhs.current_) {} DirectionSelector & operator=(DirectionSelector const & rhs) { stride_ = rhs.stride_; current_ = rhs.current_; return *this; } void operator++() { current_ += stride_; } void operator++(int) { current_ += stride_; } void operator--() { current_ -= stride_; } void operator--(int) { current_ -= stride_; } void operator+=(int dy) { current_ += dy*stride_; } void operator-=(int dy) { current_ -= dy*stride_; } bool operator==(DirectionSelector const & rhs) const { return (current_ == rhs.current_); } bool operator!=(DirectionSelector const & rhs) const { return (current_ != rhs.current_); } bool operator<(DirectionSelector const & rhs) const { return (current_ < rhs.current_); } bool operator<=(DirectionSelector const & rhs) const { return (current_ <= rhs.current_); } bool operator>(DirectionSelector const & rhs) const { return (current_ > rhs.current_); } bool operator>=(DirectionSelector const & rhs) const { return (current_ >= rhs.current_); } int operator-(DirectionSelector const & rhs) const { return (current_ - rhs.current_) / stride_; } T operator()() const { return current_; } T operator()(int d) const { return current_ + d*stride_; } int stride_; T current_; }; template class NotifyingDirectionSelector; template class NotifyingDirectionSelector { public: NotifyingDirectionSelector(T base = 0) : current_(base), notify_(__null) {} NotifyingDirectionSelector(NotifyingDirectionSelector const & rhs) : current_(rhs.current_), notify_(__null) {} NotifyingDirectionSelector & operator=(NotifyingDirectionSelector const & rhs) { current_ = rhs.current_; notify_ = __null; return *this; } void setNotify(Notify *n) { notify_ = n; } void operator++() { notify_->_notify(current_, current_+1); ++current_; } void operator++(int) { notify_->_notify(current_, current_+1); ++current_; } void operator--() { notify_->_notify(current_, current_-1); --current_; } void operator--(int) { notify_->_notify(current_, current_-1); --current_; } void operator+=(int dx) { notify_->_notify(current_, current_+dx); current_ += dx; } void operator-=(int dx) { notify_->_notify(current_, current_-dx); current_ -= dx; } bool operator==(NotifyingDirectionSelector const & rhs) const { return (current_ == rhs.current_); } bool operator!=(NotifyingDirectionSelector const & rhs) const { return (current_ != rhs.current_); } bool operator<(NotifyingDirectionSelector const & rhs) const { return (current_ < rhs.current_); } bool operator<=(NotifyingDirectionSelector const & rhs) const { return (current_ <= rhs.current_); } bool operator>(NotifyingDirectionSelector const & rhs) const { return (current_ > rhs.current_); } bool operator>=(NotifyingDirectionSelector const & rhs) const { return (current_ >= rhs.current_); } int operator-(NotifyingDirectionSelector const & rhs) const { return (current_ - rhs.current_); } T operator()() const { return current_; } T operator()(int d) const { return (current_ + d); } T current_; private: Notify *notify_; }; template class NotifyingDirectionSelector { public: NotifyingDirectionSelector(int stride = 1, T base = 0) : stride_(stride), current_(base), notify_(__null) {} NotifyingDirectionSelector(NotifyingDirectionSelector const & rhs) : stride_(rhs.stride_), current_(rhs.current_), notify_(__null) {} NotifyingDirectionSelector & operator=(NotifyingDirectionSelector const & rhs) { stride_ = rhs.stride_; current_ = rhs.current_; notify_ = __null; return *this; } void setNotify(Notify *n) { notify_ = n; } void operator++() { notify_->_notify(current_, current_+stride_); current_ += stride_; } void operator++(int) { notify_->_notify(current_, current_+stride_); current_ += stride_; } void operator--() { notify_->_notify(current_, current_-stride_); current_ -= stride_; } void operator--(int) { notify_->_notify(current_, current_-stride_); current_ -= stride_; } void operator+=(int dy) { notify_->_notify(current_, current_+dy*stride_); current_ += dy*stride_; } void operator-=(int dy) { notify_->_notify(current_, current_-dy*stride_); current_ -= dy*stride_; } bool operator==(NotifyingDirectionSelector const & rhs) const { return (current_ == rhs.current_); } bool operator!=(NotifyingDirectionSelector const & rhs) const { return (current_ != rhs.current_); } bool operator<(NotifyingDirectionSelector const & rhs) const { return (current_ < rhs.current_); } bool operator<=(NotifyingDirectionSelector const & rhs) const { return (current_ <= rhs.current_); } bool operator>(NotifyingDirectionSelector const & rhs) const { return (current_ > rhs.current_); } bool operator>=(NotifyingDirectionSelector const & rhs) const { return (current_ >= rhs.current_); } int operator-(NotifyingDirectionSelector const & rhs) const { return (current_ - rhs.current_) / stride_; } T operator()() const { return current_; } T operator()(int d) const { return current_ + d*stride_; } int stride_; T current_; private: Notify *notify_; }; } template class CachedFileImageIteratorBase { public: typedef CachedFileImageIteratorBase self_type; typedef IMAGETYPE image_type; typedef PIXELTYPE value_type; typedef PIXELTYPE PixelType; typedef REFERENCE reference; typedef REFERENCE index_reference; typedef POINTER pointer; typedef Diff2D difference_type; typedef image_traverser_tag iterator_category; typedef RowIterator row_iterator; typedef ColumnIterator column_iterator; typedef typename cfi_detail::DirectionSelector MoveX; friend class cfi_detail::DirectionSelector; typedef typename cfi_detail::NotifyingDirectionSelector MoveY; friend class cfi_detail::NotifyingDirectionSelector; friend class CachedFileSequentialAccessIteratorPolicy; MoveX x; MoveY y; IMAGEITERATOR & operator+=(difference_type const & s) { x += s.x; y += s.y; return static_cast(*this); } IMAGEITERATOR & operator-=(difference_type const & s) { x -= s.x; y -= s.y; return static_cast(*this); } IMAGEITERATOR operator+(difference_type const & s) const { IMAGEITERATOR ret(static_cast(*this)); ret += s; return ret; } IMAGEITERATOR operator-(difference_type const & s) const { IMAGEITERATOR ret(static_cast(*this)); ret -= s; return ret; } difference_type operator-(CachedFileImageIteratorBase const & rhs) const { return difference_type(x-rhs.x, y-rhs.y); } bool operator==(CachedFileImageIteratorBase const & rhs) const { return (x == rhs.x) && (y == rhs.y); } bool operator!=(CachedFileImageIteratorBase const & rhs) const { return (x != rhs.x) || (y != rhs.y); } reference operator*() const { return currentRow[x()]; } pointer operator->() const { return (*i)[y()] + x(); } index_reference operator[](difference_type const & d) const { if (d.y == 0) { return currentRow[x()+d.x]; } else { return (*i)(x()+d.x, y()+d.y); } } index_reference operator()(int dx, int dy) const { if (dy == 0) { return currentRow[x()+dx]; } else { return (*i)(x()+dx, y()+dy); } } pointer operator[](int dy) const { return (*i)[y() + dy] + x(); } row_iterator rowIterator() const { return row_iterator(static_cast(*this)); } column_iterator columnIterator() const { return column_iterator(static_cast(*this)); } protected: CachedFileImageIteratorBase(const int X, const int Y, image_type * const I) : x(X), y(Y), i(I), currentRow(__null) { y.setNotify(this); _notify(y()); } CachedFileImageIteratorBase(const int X, const int Y, image_type * const I, int xstride, int ystride) : x(xstride, X), y(ystride, Y), i(I), currentRow(__null) { y.setNotify(this); _notify(y()); } CachedFileImageIteratorBase(const CachedFileImageIteratorBase &r) : x(r.x), y(r.y), i(r.i), currentRow(__null) { y.setNotify(this); _notify(y()); } CachedFileImageIteratorBase& operator=(const CachedFileImageIteratorBase &r) { x = r.x; y = r.y; i = r.i; currentRow = __null; y.setNotify(this); _notify(y()); return *this; } void _notify(int initialY) { if (i) currentRow = (*i)[initialY]; } void _notify(int oldY, int newY) { if (i) currentRow = (*i)[newY]; } image_type *i; pointer currentRow; }; template class StridedCachedFileImageIterator; template class ConstStridedCachedFileImageIterator; template class CachedFileImageIterator : public CachedFileImageIteratorBase, CachedFileImage, PIXELTYPE, PIXELTYPE &, PIXELTYPE *> { public: typedef CachedFileImageIteratorBase, PIXELTYPE, PIXELTYPE &, PIXELTYPE *> Base; CachedFileImageIterator(const int x = 0, const int y = 0, CachedFileImage * const i = __null) : Base(x, y, i) {} friend class StridedCachedFileImageIterator; friend class ConstStridedCachedFileImageIterator; }; template class ConstCachedFileImageIterator : public CachedFileImageIteratorBase, const CachedFileImage, PIXELTYPE, PIXELTYPE const &, PIXELTYPE const *> { public: typedef CachedFileImageIteratorBase, PIXELTYPE, PIXELTYPE const &, PIXELTYPE const *> Base; ConstCachedFileImageIterator(const int x = 0, const int y = 0, const CachedFileImage * const i = __null) : Base(x, y, i) {} # 852 "../include/vigra/cachedfileimage.hxx" friend class ConstStridedCachedFileImageIterator; }; template class StridedCachedFileImageIterator : public CachedFileImageIteratorBase, CachedFileImage, PIXELTYPE, PIXELTYPE &, PIXELTYPE *, StridedArrayTag> { public: typedef CachedFileImageIteratorBase, PIXELTYPE, PIXELTYPE &, PIXELTYPE *, StridedArrayTag> Base; StridedCachedFileImageIterator(const int x = 0, const int y = 0, CachedFileImage * const i = __null, const int xstride = 1, const int ystride = 1) : Base(x, y, i, xstride, ystride) {} StridedCachedFileImageIterator(CachedFileImageIterator const & r, const int xstride, const int ystride) : Base(r.x(), r.y(), r.i, xstride, ystride) {} }; template class ConstStridedCachedFileImageIterator : public CachedFileImageIteratorBase, const CachedFileImage, PIXELTYPE, PIXELTYPE const &, PIXELTYPE const *, StridedArrayTag> { public: typedef CachedFileImageIteratorBase, PIXELTYPE, PIXELTYPE const &, PIXELTYPE const *, StridedArrayTag> Base; ConstStridedCachedFileImageIterator(const int x = 0, const int y = 0, const CachedFileImage * const i = __null, const int xstride = 1, const int ystride = 1) : Base(x, y, i, xstride, ystride) {} ConstStridedCachedFileImageIterator(ConstCachedFileImageIterator const & r, const int xstride, const int ystride) : Base(r.x(), r.y(), r.i, xstride, ystride) {} ConstStridedCachedFileImageIterator(CachedFileImageIterator const & r, const int xstride, const int ystride) : Base(r.x(), r.y(), r.i, xstride, ystride) {} # 947 "../include/vigra/cachedfileimage.hxx" }; template struct IteratorTraits; template class CachedFileImage : public CachedFileImageBase { public: typedef PIXELTYPE value_type; typedef PIXELTYPE PixelType; typedef PIXELTYPE & reference; typedef PIXELTYPE const & const_reference; typedef PIXELTYPE * pointer; typedef PIXELTYPE const * const_pointer; typedef CachedFileImageIterator traverser; typedef ConstCachedFileImageIterator const_traverser; typedef IteratorAdaptor > iterator; typedef IteratorAdaptor > const_iterator; typedef Diff2D difference_type; typedef Size2D size_type; typedef typename IteratorTraits::DefaultAccessor Accessor; typedef typename IteratorTraits::DefaultAccessor ConstAccessor; CachedFileImage() { initMembers(); } CachedFileImage(int width, int height) { vigra::throw_precondition_error(((width >= 0) && (height >= 0)), "CachedFileImage::CachedFileImage(int width, int height): " "width and height must be >= 0.\n"); initMembers(); resize(width, height, value_type()); } explicit CachedFileImage(difference_type const & size, value_type const & d = value_type()) { vigra::throw_precondition_error(((size.x >= 0) && (size.y >= 0)), "CachedFileImage::CachedIfelImage(Diff2D size): " "size.x and size.y must be >= 0.\n"); initMembers(); resize(size.x, size.y, d); } CachedFileImage(int width, int height, value_type const & d) { vigra::throw_precondition_error(((width >= 0) && (height >= 0)), "CachedFileImage::CachedFileImage(int width, int height, value_type const & ): " "width and height must be >= 0.\n"); initMembers(); resize(width, height, d); } CachedFileImage(const CachedFileImage & rhs) { initMembers(); resizeCopy(rhs); } virtual ~CachedFileImage() { deallocate(); } CachedFileImage & operator=(const CachedFileImage &rhs); CachedFileImage & init(value_type const & pixel); void resize(int width, int height) { resize(width, height, value_type()); } void resize(difference_type const & size) { resize(size.x, size.y, value_type()); } void resize(int width, int height, value_type const & d); void resizeCopy(const CachedFileImage & rhs); void swap( CachedFileImage& rhs ); int width() const { return width_; } int height() const { return height_; } size_type size() const { return size_type(width(), height()); } bool isInside(difference_type const & d) const { return d.x >= 0 && d.y >= 0 && d.x < width() && d.y < height(); } reference operator[](difference_type const & d) { return (getLinePointerDirty(d.y))[d.x]; } const_reference operator[](difference_type const & d) const { return (getLinePointer(d.y))[d.x]; } reference operator()(int dx, int dy) { return (getLinePointerDirty(dy))[dx]; } const_reference operator()(int dx, int dy) const { return (getLinePointer(dy))[dx]; } pointer operator[](int dy) { if (dy < 0 || dy >= height_) return __null; else return getLinePointerDirty(dy); } const_pointer operator[](int dy) const { if (dy < 0 || dy >= height_) return __null; else return getLinePointer(dy); } traverser upperLeft() { ; return traverser(0, 0, this); } traverser lowerRight() { ; return traverser(width_, height_, this); } const_traverser upperLeft() const { ; return const_traverser(0, 0, this); } const_traverser lowerRight() const { ; return const_traverser(width_, height_, this); } iterator begin() { ; return iterator(traverser(0, 0, this)); } iterator end() { ; return iterator(traverser(0, height_, this)); } const_iterator begin() const { ; return const_iterator(const_traverser(0, 0, this)); } const_iterator end() const { ; return const_iterator(const_traverser(0, height_, this)); } Accessor accessor() { return Accessor(); } ConstAccessor accessor() const { return ConstAccessor(); } int numBlocksAllocated() const { return blocksAllocated_; } int numBlocksNeeded() const { return blocksNeeded_; } void printBlockStats() const { cout << "image " << this << " blocksAllocated=" << blocksAllocated_ << "/" << blocksNeeded_ << " mrl=" << *mostRecentlyLoadedBlockIterator_ << " blocksInMemory={"; std::copy(blocksInMemory_->begin(), blocksInMemory_->end(), std::ostream_iterator(cout, " ")); cout << "}" << endl; } private: PIXELTYPE initPixel; void deallocate(); void initLineStartArray(); PIXELTYPE * getLinePointer(const int dy) const; PIXELTYPE * getLinePointerDirty(const int dy); PIXELTYPE * getLinePointerCacheMiss(const int dy) const; void swapOutBlock() const; void initTmpfile() const; void initMembers() { initPixel = value_type(); linesPerBlocksize_ = 0; linesPerBlocksizeLog2_ = 0; blocksAllocated_ = 0; blocksNeeded_ = 0; blocksInMemory_ = __null; lines_ = __null; blockIsClean_ = __null; blockInFile_ = __null; width_ = 0; height_ = 0; tmpFile_ = __null; tmpFilename_ = __null; } int linesPerBlocksize_; int linesPerBlocksizeLog2_; mutable int blocksAllocated_; int blocksNeeded_; mutable list *blocksInMemory_; mutable list::iterator mostRecentlyLoadedBlockIterator_; mutable PIXELTYPE ** lines_; mutable bool * blockIsClean_; mutable bool * blockInFile_; int width_, height_; mutable FILE *tmpFile_; mutable char *tmpFilename_; }; template void CachedFileImage::deallocate() { CachedFileImageDirector::v().returnBlocksUnregisterImage(blocksAllocated_, this); delete blocksInMemory_; if (lines_ != __null) { int line = 0; for (int block = 0; block < blocksNeeded_; block++) { int firstLineInBlock = line; for (int subblock = 0; subblock < linesPerBlocksize_; subblock++, line++) { if (line >= height_) break; PIXELTYPE *p = lines_[line]; if (p != __null) { for (int column = 0; column < width_; column++) { (p[column]).~PIXELTYPE(); } } } CachedFileImageDirector::v().deallocateBlock(lines_[firstLineInBlock]); if (line >= height_) break; } delete[] lines_; } delete[] blockIsClean_; delete[] blockInFile_; if (tmpFile_ != __null) { fclose(tmpFile_); } delete[] tmpFilename_; }; template void CachedFileImage::initLineStartArray() { linesPerBlocksize_ = (int)floor( ((double)CachedFileImageDirector::v().getBlockSize()) / (width_ * sizeof(PIXELTYPE))); linesPerBlocksizeLog2_ = (int)floor(log((double)linesPerBlocksize_)/log(2.0)); linesPerBlocksize_ = 1 << linesPerBlocksizeLog2_; # 1313 "../include/vigra/cachedfileimage.hxx" blocksNeeded_ = (int)ceil(((double)height_) / linesPerBlocksize_); int blocksAllowed = CachedFileImageDirector::v().requestBlocksForNewImage( blocksNeeded_, this); blocksInMemory_ = new list(); lines_ = new PIXELTYPE*[height_]; blockIsClean_ = new bool[blocksNeeded_]; blockInFile_ = new bool[blocksNeeded_]; for (int block = 0; block < blocksNeeded_; block++) { blockIsClean_[block] = true; blockInFile_[block] = false; } int line = 0; for (int block = 0; block < blocksAllowed; block++) { blocksInMemory_->push_back(block); blocksAllocated_++; PIXELTYPE* blockStart = (PIXELTYPE*)CachedFileImageDirector::v().allocateBlock(); for (int subblock = 0; subblock < linesPerBlocksize_; subblock++, line++, blockStart+=width_) { if (line >= height_) break; lines_[line] = blockStart; std::uninitialized_fill_n(lines_[line], width_, initPixel); } if (line >= height_) break; } for (; line < height_; line++) { lines_[line] = __null; } mostRecentlyLoadedBlockIterator_ = blocksInMemory_->begin(); return; }; template inline PIXELTYPE * CachedFileImage::getLinePointerDirty(const int dy) { PIXELTYPE *line = lines_[dy]; if (line == __null) line = getLinePointerCacheMiss(dy); blockIsClean_[dy >> linesPerBlocksizeLog2_] = false; return line; }; template inline PIXELTYPE * CachedFileImage::getLinePointer(const int dy) const { PIXELTYPE *line = lines_[dy]; if (line == __null) line = getLinePointerCacheMiss(dy); return line; }; template PIXELTYPE * CachedFileImage::getLinePointerCacheMiss(const int dy) const { int blockNumber = dy >> linesPerBlocksizeLog2_; int firstLineInBlock = blockNumber << linesPerBlocksizeLog2_; # 1422 "../include/vigra/cachedfileimage.hxx" int moreBlocks = CachedFileImageDirector::v().registerCacheMiss(this); if (moreBlocks == 0 && blocksAllocated_ == 0) { throw std::runtime_error("enblend: Out of memory blocks. Try using the -m flag to " "increase the amount of memory to use, or use the -b flag to " "decrease the block size\n" "reason: cache miss, 0 blocks allocated, 0 blocks available."); } else if (moreBlocks == 0) { swapOutBlock(); } PIXELTYPE* blockStart = (PIXELTYPE*)CachedFileImageDirector::v().allocateBlock(); int numLinesInBlock = min(height_, firstLineInBlock + linesPerBlocksize_) - firstLineInBlock; int pixelsToRead = numLinesInBlock * width_; if (blockInFile_[blockNumber]) { # 1467 "../include/vigra/cachedfileimage.hxx" off_t offset = (off_t)width_ * (off_t)firstLineInBlock * (off_t)sizeof(PIXELTYPE); if (fseeko(tmpFile_, offset, 0) != 0) { throw std::runtime_error(strerror((*__errno_location ()))); } # 1498 "../include/vigra/cachedfileimage.hxx" clearerr(tmpFile_); int itemsRead = fread(blockStart, sizeof(PIXELTYPE), pixelsToRead, tmpFile_); if (itemsRead < pixelsToRead) { perror("enblend"); throw std::runtime_error("enblend: error reading from image swap file.\n"); } } else { std::uninitialized_fill_n(blockStart, pixelsToRead, initPixel); } for (int l = 0; l < linesPerBlocksize_; l++, blockStart+=width_) { int absoluteLineNumber = l + firstLineInBlock; if (absoluteLineNumber >= height_) break; lines_[absoluteLineNumber] = blockStart; } blockIsClean_[blockNumber] = true; list::iterator i = blocksInMemory_->begin(); for (; i != blocksInMemory_->end(); ++i) { if (*i > blockNumber) break; } blocksInMemory_->insert(i, blockNumber); mostRecentlyLoadedBlockIterator_ = --i; for (++i; i != blocksInMemory_->end(); ++i) { if (*i == ++blockNumber) mostRecentlyLoadedBlockIterator_ = i; else break; } blocksAllocated_++; # 1547 "../include/vigra/cachedfileimage.hxx" return lines_[dy]; }; template void CachedFileImage::swapOutBlock() const { if (blocksAllocated_ == 0) { throw std::runtime_error("Attempt to free a block from an image that has no blocks."); } # 1565 "../include/vigra/cachedfileimage.hxx" int blockNumber = 0; # 1576 "../include/vigra/cachedfileimage.hxx" if (mostRecentlyLoadedBlockIterator_ == blocksInMemory_->begin()) { blockNumber = blocksInMemory_->back(); blocksInMemory_->pop_back(); } else { list::iterator candidate = mostRecentlyLoadedBlockIterator_; --candidate; blockNumber = *candidate; blocksInMemory_->erase(candidate); } # 1598 "../include/vigra/cachedfileimage.hxx" int firstLineInBlock = blockNumber << linesPerBlocksizeLog2_; PIXELTYPE *blockStart = lines_[firstLineInBlock]; if (!blockIsClean_[blockNumber]) { blockInFile_[blockNumber] = true; if (tmpFile_ == __null) initTmpfile(); # 1638 "../include/vigra/cachedfileimage.hxx" off_t offset = (off_t)width_ * (off_t)firstLineInBlock * (off_t)sizeof(PIXELTYPE); if (fseeko(tmpFile_, offset, 0) != 0) { throw std::runtime_error(strerror((*__errno_location ()))); } int numLinesInBlock = min(height_, firstLineInBlock + linesPerBlocksize_) - firstLineInBlock; int pixelsToWrite = numLinesInBlock * width_; # 1672 "../include/vigra/cachedfileimage.hxx" clearerr(tmpFile_); int itemsWritten = fwrite(blockStart, sizeof(PIXELTYPE), pixelsToWrite, tmpFile_); if (itemsWritten < pixelsToWrite) { perror("enblend"); throw std::runtime_error("enblend: error writing to image swap file.\n"); } } for (int l = 0; l < linesPerBlocksize_; l++) { int absoluteLineNumber = l + firstLineInBlock; if (absoluteLineNumber >= height_) break; PIXELTYPE *p = lines_[absoluteLineNumber]; for (int column = 0; column <= width_; column++) { (p[column]).~PIXELTYPE(); } lines_[absoluteLineNumber] = __null; } CachedFileImageDirector::v().deallocateBlock(blockStart); blocksAllocated_--; }; template void CachedFileImage::initTmpfile() const { char filenameTemplate[] = ".enblend_tmpXXXXXX"; sigset_t oldsigmask; sigprocmask(0, &SigintMask, &oldsigmask); int tmpFD = mkstemp(filenameTemplate); if (tmpFD < 0) { throw std::runtime_error("enblend: unable to create image swap file.\n"); } tmpFile_ = fdopen(tmpFD, "wb+"); # 1749 "../include/vigra/cachedfileimage.hxx" if (tmpFile_ == __null) { throw std::runtime_error(strerror((*__errno_location ()))); } unsigned int filenameTemplateLength = (unsigned int)strlen(filenameTemplate) + 1; tmpFilename_ = new char[filenameTemplateLength]; strncpy(tmpFilename_, filenameTemplate, filenameTemplateLength); unlink(tmpFilename_); sigprocmask(2, &oldsigmask, __null); }; template CachedFileImage & CachedFileImage::operator=(const CachedFileImage & rhs) { if (this != &rhs) { if ((width() != rhs.width()) || (height() != rhs.height())) { resizeCopy(rhs); } else { const_iterator is = rhs.begin(); const_iterator iend = rhs.end(); iterator id = begin(); for(; is != iend; ++is, ++id) *id = *is; } } return *this; }; template CachedFileImage & CachedFileImage::init(value_type const & pixel) { initPixel = pixel; for (int block = 0; block < blocksNeeded_; block++) { blockIsClean_[block] = true; blockInFile_[block] = false; } for (int line = 0; line < height_; line++) { PIXELTYPE *p = lines_[line]; if (lines_[line] != __null) { for (int column = 0; column <= width_; column++) { (p[column]).~PIXELTYPE(); } std::uninitialized_fill_n(lines_[line], width_, initPixel); } } return *this; }; template void CachedFileImage::resize(int width, int height, value_type const & d) { vigra::throw_precondition_error(((width >= 0) && (height >= 0)), "CachedFileImage::resize(int width, int height, value_type const &): " "width and height must be >= 0.\n"); deallocate(); initMembers(); initPixel = d; width_ = width; height_ = height; initLineStartArray(); }; template void CachedFileImage::resizeCopy(const CachedFileImage & rhs) { deallocate(); initMembers(); if (rhs.width() * rhs.height() > 0) { width_ = rhs.width(); height_ = rhs.height(); initLineStartArray(); const_iterator is = rhs.begin(); const_iterator iend = rhs.end(); iterator id = begin(); for(; is != iend; ++is, ++id) *id = *is; } }; template void CachedFileImage::swap( CachedFileImage& rhs ) { if (&rhs != this) { std::swap(initPixel, rhs.initPixel); std::swap(linesPerBlocksize_, rhs.linesPerBlocksize_); std::swap(linesPerBlocksizeLog2_, rhs.linesPerBlocksizeLog2_); std::swap(blocksAllocated_, rhs.blocksAllocated_); std::swap(blocksNeeded_, rhs.blocksNeeded_); std::swap(blocksInMemory_, rhs.blocksInMemory_); std::swap(mostRecentlyLoadedBlockIterator_, rhs.mostRecentlyLoadedBlockIterator_); std::swap(lines_, rhs.lines_); std::swap(blockIsClean_, rhs.blockIsClean_); std::swap(blockInFile_, rhs.blockInFile_); std::swap(width_, rhs.width_); std::swap(height_, rhs.height_); std::swap(tmpFile_, rhs.tmpFile_); std::swap(tmpFilename_, rhs.tmpFilename_); } }; template inline triple::const_traverser, typename CachedFileImage::const_traverser, Accessor> srcImageRange(CachedFileImage const & img, Accessor a) { return triple::const_traverser, typename CachedFileImage::const_traverser, Accessor>(img.upperLeft(), img.lowerRight(), a); } template inline pair::const_traverser, Accessor> srcImage(CachedFileImage const & img, Accessor a) { return pair::const_traverser, Accessor>(img.upperLeft(), a); } template inline triple::traverser, typename CachedFileImage::traverser, Accessor> destImageRange(CachedFileImage & img, Accessor a) { return triple::traverser, typename CachedFileImage::traverser, Accessor>(img.upperLeft(), img.lowerRight(), a); } template inline pair::traverser, Accessor> destImage(CachedFileImage & img, Accessor a) { return pair::traverser, Accessor>(img.upperLeft(), a); } template inline pair::const_traverser, Accessor> maskImage(CachedFileImage const & img, Accessor a) { return pair::const_traverser, Accessor>(img.upperLeft(), a); } template inline triple::const_traverser, typename CachedFileImage::const_traverser, typename CachedFileImage::ConstAccessor> srcImageRange(CachedFileImage const & img) { return triple::const_traverser, typename CachedFileImage::const_traverser, typename CachedFileImage::ConstAccessor>(img.upperLeft(), img.lowerRight(), img.accessor()); } template inline pair< typename CachedFileImage::const_traverser, typename CachedFileImage::ConstAccessor> srcImage(CachedFileImage const & img) { return pair::const_traverser, typename CachedFileImage::ConstAccessor>(img.upperLeft(), img.accessor()); } template inline triple< typename CachedFileImage::traverser, typename CachedFileImage::traverser, typename CachedFileImage::Accessor> destImageRange(CachedFileImage & img) { return triple::traverser, typename CachedFileImage::traverser, typename CachedFileImage::Accessor>(img.upperLeft(), img.lowerRight(), img.accessor()); } template inline pair< typename CachedFileImage::traverser, typename CachedFileImage::Accessor> destImage(CachedFileImage & img) { return pair::traverser, typename CachedFileImage::Accessor>(img.upperLeft(), img.accessor()); } template inline pair< typename CachedFileImage::const_traverser, typename CachedFileImage::ConstAccessor> maskImage(CachedFileImage const & img) { return pair::const_traverser, typename CachedFileImage::ConstAccessor>(img.upperLeft(), img.accessor()); } template inline pair< ConstStridedCachedFileImageIterator, typename IteratorTraits >::DefaultAccessor> maskStrideIter(CachedFileImageIterator const & upperLeft, int xstride, int ystride) { return pair< ConstStridedCachedFileImageIterator, typename IteratorTraits >::DefaultAccessor > (ConstStridedCachedFileImageIterator(upperLeft, xstride, ystride), typename IteratorTraits >::DefaultAccessor()); } template inline pair< ConstStridedCachedFileImageIterator, typename IteratorTraits >::DefaultAccessor> maskStrideIter(ConstCachedFileImageIterator const & upperLeft, int xstride, int ystride) { return pair< ConstStridedCachedFileImageIterator, typename IteratorTraits >::DefaultAccessor > (ConstStridedCachedFileImageIterator(upperLeft, xstride, ystride), typename IteratorTraits >::DefaultAccessor()); } template inline triple< ConstStridedCachedFileImageIterator, ConstStridedCachedFileImageIterator, typename IteratorTraits >::DefaultAccessor> maskStrideIterRange(CachedFileImageIterator const & upperLeft, CachedFileImageIterator const & lowerRight, int xstride, int ystride) { return triple< ConstStridedCachedFileImageIterator, ConstStridedCachedFileImageIterator, typename IteratorTraits >::DefaultAccessor > (ConstStridedCachedFileImageIterator(upperLeft, xstride, ystride), ConstStridedCachedFileImageIterator(lowerRight, xstride, ystride), typename IteratorTraits >::DefaultAccessor()); } template inline triple< ConstStridedCachedFileImageIterator, ConstStridedCachedFileImageIterator, typename IteratorTraits >::DefaultAccessor> maskStrideIterRange(ConstCachedFileImageIterator const & upperLeft, ConstCachedFileImageIterator const & lowerRight, int xstride, int ystride) { return triple< ConstStridedCachedFileImageIterator, ConstStridedCachedFileImageIterator, typename IteratorTraits >::DefaultAccessor > (ConstStridedCachedFileImageIterator(upperLeft, xstride, ystride), ConstStridedCachedFileImageIterator(lowerRight, xstride, ystride), typename IteratorTraits >::DefaultAccessor()); } template vigra::triple, StridedCachedFileImageIterator, ImgAccessor> stride(int xstride, int ystride, vigra::triple, CachedFileImageIterator, ImgAccessor> image) { Diff2D diff = image.second - image.first; if (diff.x % xstride) diff.x += (xstride - (diff.x % xstride)); if (diff.y % ystride) diff.y += (ystride - (diff.y % ystride)); return vigra::make_triple(StridedCachedFileImageIterator(image.first, xstride, ystride), StridedCachedFileImageIterator(image.first + diff, xstride, ystride), image.third); }; template vigra::triple, ConstStridedCachedFileImageIterator, ImgAccessor> stride(int xstride, int ystride, vigra::triple, ConstCachedFileImageIterator, ImgAccessor> image) { Diff2D diff = image.second - image.first; if (diff.x % xstride) diff.x += (xstride - (diff.x % xstride)); if (diff.y % ystride) diff.y += (ystride - (diff.y % ystride)); return vigra::make_triple(ConstStridedCachedFileImageIterator(image.first, xstride, ystride), ConstStridedCachedFileImageIterator(image.first + diff, xstride, ystride), image.third); }; template std::pair, ImgAccessor> stride(int xstride, int ystride, std::pair, ImgAccessor> image) { return std::make_pair(StridedCachedFileImageIterator(image.first, xstride, ystride), image.second); }; template std::pair, ImgAccessor> stride(int xstride, int ystride, std::pair, ImgAccessor> image) { return std::make_pair(ConstStridedCachedFileImageIterator(image.first, xstride, ystride), image.second); }; } # 29 "numerictraits.h" 2 # 1 "../include/vigra/numerictraits.hxx" 1 # 30 "numerictraits.h" 2 using vigra::BasicImage; using vigra::CachedFileImage; using vigra::NumericTraits; using vigra::RGBValue; using vigra::VigraFalseType; using vigra::VigraTrueType; using vigra::Int8; using vigra::Int16; using vigra::Int32; using vigra::Int64; using vigra::UInt8; using vigra::UInt16; using vigra::UInt32; using vigra::UInt64; namespace enblend { struct Error_EnblendNumericTraits_not_specialized_for_this_case { }; template struct EnblendNumericTraits { typedef Error_EnblendNumericTraits_not_specialized_for_this_case ImagePixelComponentType; typedef Error_EnblendNumericTraits_not_specialized_for_this_case ImagePixelType; typedef Error_EnblendNumericTraits_not_specialized_for_this_case ImageType; typedef Error_EnblendNumericTraits_not_specialized_for_this_case ImageIsScalar; typedef Error_EnblendNumericTraits_not_specialized_for_this_case AlphaPixelType; typedef Error_EnblendNumericTraits_not_specialized_for_this_case AlphaType; typedef Error_EnblendNumericTraits_not_specialized_for_this_case MaskPixelType; typedef Error_EnblendNumericTraits_not_specialized_for_this_case MaskType; typedef Error_EnblendNumericTraits_not_specialized_for_this_case ImagePyramidPixelComponentType; typedef Error_EnblendNumericTraits_not_specialized_for_this_case ImagePyramidPixelType; typedef Error_EnblendNumericTraits_not_specialized_for_this_case ImagePyramidType; enum { ImagePyramidIntegerBits = 0 }; enum { ImagePyramidFractionBits = 0 }; typedef Error_EnblendNumericTraits_not_specialized_for_this_case SKIPSMImagePixelType; typedef Error_EnblendNumericTraits_not_specialized_for_this_case SKIPSMAlphaPixelType; typedef Error_EnblendNumericTraits_not_specialized_for_this_case MaskPyramidPixelType; typedef Error_EnblendNumericTraits_not_specialized_for_this_case MaskPyramidType; enum { MaskPyramidIntegerBits = 0 }; enum { MaskPyramidFractionBits = 0 }; typedef Error_EnblendNumericTraits_not_specialized_for_this_case SKIPSMMaskPixelType; }; # 146 "numerictraits.h" template<> struct EnblendNumericTraits { typedef Int8 ImagePixelComponentType; typedef Int8 ImagePixelType; typedef CachedFileImage ImageType; typedef VigraTrueType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage MaskType; typedef Int16 ImagePyramidPixelComponentType; typedef Int16 ImagePyramidPixelType; typedef CachedFileImage ImagePyramidType; enum {ImagePyramidIntegerBits = 9}; enum {ImagePyramidFractionBits = 7}; typedef Int32 SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int16 MaskPyramidPixelType; typedef CachedFileImage MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 7}; typedef Int32 SKIPSMMaskPixelType; };template<> struct EnblendNumericTraits > { typedef Int8 ImagePixelComponentType; typedef RGBValue ImagePixelType; typedef CachedFileImage > ImageType; typedef VigraFalseType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage MaskType; typedef Int16 ImagePyramidPixelComponentType; typedef RGBValue ImagePyramidPixelType; typedef CachedFileImage > ImagePyramidType; enum {ImagePyramidIntegerBits = 9}; enum {ImagePyramidFractionBits = 7}; typedef RGBValue SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int16 MaskPyramidPixelType; typedef CachedFileImage MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 7}; typedef Int32 SKIPSMMaskPixelType; }; template<> struct EnblendNumericTraits { typedef UInt8 ImagePixelComponentType; typedef UInt8 ImagePixelType; typedef CachedFileImage ImageType; typedef VigraTrueType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage MaskType; typedef Int16 ImagePyramidPixelComponentType; typedef Int16 ImagePyramidPixelType; typedef CachedFileImage ImagePyramidType; enum {ImagePyramidIntegerBits = 9}; enum {ImagePyramidFractionBits = 7}; typedef Int32 SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int16 MaskPyramidPixelType; typedef CachedFileImage MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 7}; typedef Int32 SKIPSMMaskPixelType; };template<> struct EnblendNumericTraits > { typedef UInt8 ImagePixelComponentType; typedef RGBValue ImagePixelType; typedef CachedFileImage > ImageType; typedef VigraFalseType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage MaskType; typedef Int16 ImagePyramidPixelComponentType; typedef RGBValue ImagePyramidPixelType; typedef CachedFileImage > ImagePyramidType; enum {ImagePyramidIntegerBits = 9}; enum {ImagePyramidFractionBits = 7}; typedef RGBValue SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int16 MaskPyramidPixelType; typedef CachedFileImage MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 7}; typedef Int32 SKIPSMMaskPixelType; }; template<> struct EnblendNumericTraits { typedef Int16 ImagePixelComponentType; typedef Int16 ImagePixelType; typedef CachedFileImage ImageType; typedef VigraTrueType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage MaskType; typedef Int32 ImagePyramidPixelComponentType; typedef Int32 ImagePyramidPixelType; typedef CachedFileImage ImagePyramidType; enum {ImagePyramidIntegerBits = 17}; enum {ImagePyramidFractionBits = 7}; typedef Int32 SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int32 MaskPyramidPixelType; typedef CachedFileImage MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 15}; typedef Int32 SKIPSMMaskPixelType; };template<> struct EnblendNumericTraits > { typedef Int16 ImagePixelComponentType; typedef RGBValue ImagePixelType; typedef CachedFileImage > ImageType; typedef VigraFalseType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage MaskType; typedef Int32 ImagePyramidPixelComponentType; typedef RGBValue ImagePyramidPixelType; typedef CachedFileImage > ImagePyramidType; enum {ImagePyramidIntegerBits = 17}; enum {ImagePyramidFractionBits = 7}; typedef RGBValue SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int32 MaskPyramidPixelType; typedef CachedFileImage MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 15}; typedef Int32 SKIPSMMaskPixelType; }; template<> struct EnblendNumericTraits { typedef UInt16 ImagePixelComponentType; typedef UInt16 ImagePixelType; typedef CachedFileImage ImageType; typedef VigraTrueType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage MaskType; typedef Int32 ImagePyramidPixelComponentType; typedef Int32 ImagePyramidPixelType; typedef CachedFileImage ImagePyramidType; enum {ImagePyramidIntegerBits = 17}; enum {ImagePyramidFractionBits = 7}; typedef Int32 SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int32 MaskPyramidPixelType; typedef CachedFileImage MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 15}; typedef Int32 SKIPSMMaskPixelType; };template<> struct EnblendNumericTraits > { typedef UInt16 ImagePixelComponentType; typedef RGBValue ImagePixelType; typedef CachedFileImage > ImageType; typedef VigraFalseType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage MaskType; typedef Int32 ImagePyramidPixelComponentType; typedef RGBValue ImagePyramidPixelType; typedef CachedFileImage > ImagePyramidType; enum {ImagePyramidIntegerBits = 17}; enum {ImagePyramidFractionBits = 7}; typedef RGBValue SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int32 MaskPyramidPixelType; typedef CachedFileImage MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 15}; typedef Int32 SKIPSMMaskPixelType; }; template<> struct EnblendNumericTraits { typedef Int32 ImagePixelComponentType; typedef Int32 ImagePixelType; typedef CachedFileImage ImageType; typedef VigraTrueType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage MaskType; typedef double ImagePyramidPixelComponentType; typedef double ImagePyramidPixelType; typedef CachedFileImage ImagePyramidType; enum {ImagePyramidIntegerBits = 8}; enum {ImagePyramidFractionBits = 0}; typedef double SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int32 MaskPyramidPixelType; typedef CachedFileImage MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 15}; typedef Int32 SKIPSMMaskPixelType; };template<> struct EnblendNumericTraits > { typedef Int32 ImagePixelComponentType; typedef RGBValue ImagePixelType; typedef CachedFileImage > ImageType; typedef VigraFalseType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage MaskType; typedef double ImagePyramidPixelComponentType; typedef RGBValue ImagePyramidPixelType; typedef CachedFileImage > ImagePyramidType; enum {ImagePyramidIntegerBits = 8}; enum {ImagePyramidFractionBits = 0}; typedef RGBValue SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int32 MaskPyramidPixelType; typedef CachedFileImage MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 15}; typedef Int32 SKIPSMMaskPixelType; }; template<> struct EnblendNumericTraits { typedef UInt32 ImagePixelComponentType; typedef UInt32 ImagePixelType; typedef CachedFileImage ImageType; typedef VigraTrueType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage MaskType; typedef double ImagePyramidPixelComponentType; typedef double ImagePyramidPixelType; typedef CachedFileImage ImagePyramidType; enum {ImagePyramidIntegerBits = 8}; enum {ImagePyramidFractionBits = 0}; typedef double SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int32 MaskPyramidPixelType; typedef CachedFileImage MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 15}; typedef Int32 SKIPSMMaskPixelType; };template<> struct EnblendNumericTraits > { typedef UInt32 ImagePixelComponentType; typedef RGBValue ImagePixelType; typedef CachedFileImage > ImageType; typedef VigraFalseType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage MaskType; typedef double ImagePyramidPixelComponentType; typedef RGBValue ImagePyramidPixelType; typedef CachedFileImage > ImagePyramidType; enum {ImagePyramidIntegerBits = 8}; enum {ImagePyramidFractionBits = 0}; typedef RGBValue SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int32 MaskPyramidPixelType; typedef CachedFileImage MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 15}; typedef Int32 SKIPSMMaskPixelType; }; template<> struct EnblendNumericTraits { typedef float ImagePixelComponentType; typedef float ImagePixelType; typedef CachedFileImage ImageType; typedef VigraTrueType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage MaskType; typedef double ImagePyramidPixelComponentType; typedef double ImagePyramidPixelType; typedef CachedFileImage ImagePyramidType; enum {ImagePyramidIntegerBits = 8}; enum {ImagePyramidFractionBits = 0}; typedef double SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int32 MaskPyramidPixelType; typedef CachedFileImage MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 15}; typedef Int32 SKIPSMMaskPixelType; };template<> struct EnblendNumericTraits > { typedef float ImagePixelComponentType; typedef RGBValue ImagePixelType; typedef CachedFileImage > ImageType; typedef VigraFalseType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage MaskType; typedef double ImagePyramidPixelComponentType; typedef RGBValue ImagePyramidPixelType; typedef CachedFileImage > ImagePyramidType; enum {ImagePyramidIntegerBits = 8}; enum {ImagePyramidFractionBits = 0}; typedef RGBValue SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int32 MaskPyramidPixelType; typedef CachedFileImage MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 15}; typedef Int32 SKIPSMMaskPixelType; }; template<> struct EnblendNumericTraits { typedef double ImagePixelComponentType; typedef double ImagePixelType; typedef CachedFileImage ImageType; typedef VigraTrueType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage MaskType; typedef double ImagePyramidPixelComponentType; typedef double ImagePyramidPixelType; typedef CachedFileImage ImagePyramidType; enum {ImagePyramidIntegerBits = 8}; enum {ImagePyramidFractionBits = 0}; typedef double SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int32 MaskPyramidPixelType; typedef CachedFileImage MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 15}; typedef Int32 SKIPSMMaskPixelType; };template<> struct EnblendNumericTraits > { typedef double ImagePixelComponentType; typedef RGBValue ImagePixelType; typedef CachedFileImage > ImageType; typedef VigraFalseType ImageIsScalar; typedef UInt8 AlphaPixelType; typedef CachedFileImage AlphaType; typedef UInt8 MaskPixelType; typedef CachedFileImage MaskType; typedef double ImagePyramidPixelComponentType; typedef RGBValue ImagePyramidPixelType; typedef CachedFileImage > ImagePyramidType; enum {ImagePyramidIntegerBits = 8}; enum {ImagePyramidFractionBits = 0}; typedef RGBValue SKIPSMImagePixelType; typedef Int16 SKIPSMAlphaPixelType; typedef Int32 MaskPyramidPixelType; typedef CachedFileImage MaskPyramidType; enum {MaskPyramidIntegerBits = 9}; enum {MaskPyramidFractionBits = 15}; typedef Int32 SKIPSMMaskPixelType; }; } # 35 "enblend.h" 2 # 1 "fixmath.h" 1 # 24 "fixmath.h" # 1 "../config.h" 1 # 25 "fixmath.h" 2 # 35 "fixmath.h" # 1 "../include/vigra/mathutil.hxx" 1 # 36 "fixmath.h" 2 using std::pair; using vigra::NumericTraits; using vigra::triple; namespace enblend { template class ConvertScalarToPyramidFunctor { public: ConvertScalarToPyramidFunctor() { } inline PyramidPixelType operator()(const SrcPixelType &v) const { return doConvert(v, SrcIsIntegral(), PyramidIsIntegral()); } protected: typedef typename NumericTraits::isIntegral SrcIsIntegral; typedef typename NumericTraits::isIntegral PyramidIsIntegral; inline PyramidPixelType doConvert(const SrcPixelType &v, VigraTrueType, VigraTrueType) const { return convertIntegerToFixedPoint(v); } inline PyramidPixelType doConvert(const SrcPixelType &v, VigraTrueType, VigraFalseType) const { return NumericTraits::toRealPromote(v); } inline PyramidPixelType doConvert(const SrcPixelType &v, VigraFalseType, VigraTrueType) const { return convertDoubleToFixedPoint(v); } inline PyramidPixelType doConvert(const SrcPixelType &v, VigraFalseType, VigraFalseType) const { return v; } inline PyramidPixelType convertDoubleToFixedPoint(const double &v) const { return NumericTraits::fromRealPromote(v * (double)(1 << PyramidFractionBits)); }; inline PyramidPixelType convertIntegerToFixedPoint(const SrcPixelType &v) const { return (PyramidPixelType)v << PyramidFractionBits; }; }; template class ConvertPyramidToScalarFunctor { public: ConvertPyramidToScalarFunctor() { } inline DestPixelType operator()(const PyramidPixelType &v) const { return doConvert(v, DestIsIntegral(), PyramidIsIntegral()); } protected: typedef typename NumericTraits::isIntegral DestIsIntegral; typedef typename NumericTraits::isIntegral PyramidIsIntegral; inline DestPixelType doConvert(const PyramidPixelType &v, VigraTrueType, VigraTrueType) const { PyramidPixelType half = 1 << (PyramidFractionBits-1); PyramidPixelType quarter = 1 << (PyramidFractionBits-2); PyramidPixelType threeQuarter = 3 << (PyramidFractionBits-2); PyramidPixelType vFraction = v & ((1 << PyramidFractionBits) - 1); if ((vFraction >= quarter) && (vFraction < threeQuarter)) { PyramidPixelType random = (PyramidPixelType(::Twister()) & (half - 1)) + quarter; if (random <= vFraction) { return DestPixelType(NumericTraits::fromPromote((v >> PyramidFractionBits) + 1)); } else { return DestPixelType(NumericTraits::fromPromote(v >> PyramidFractionBits)); } } else if (vFraction >= quarter) { return DestPixelType(NumericTraits::fromPromote((v >> PyramidFractionBits) + 1)); } else { return DestPixelType(NumericTraits::fromPromote(v >> PyramidFractionBits)); } } inline DestPixelType doConvert(const PyramidPixelType &v, VigraTrueType, VigraFalseType) const { double d = dither(v); return NumericTraits::fromRealPromote(d); } inline DestPixelType doConvert(const PyramidPixelType &v, VigraFalseType, VigraTrueType) const { return convertFixedPointToDouble(v); } inline DestPixelType doConvert(const PyramidPixelType &v, VigraFalseType, VigraFalseType) const { return v; } inline double dither(const double &v) const { double vFraction = v - floor(v); if (vFraction > 0.25 && vFraction <= 0.75) { double random = 0.5 * (double)::Twister() / (2147483647 * 2U + 1U); if ((vFraction - 0.25) >= random) { return ceil(v); } else { return floor(v); } } else { return v; } } inline double convertFixedPointToDouble(const PyramidPixelType &v) const { return NumericTraits::toRealPromote(v) / (double)(1 << PyramidFractionBits); }; }; template class ConvertVectorToPyramidFunctor { typedef typename SrcVectorType::value_type SrcComponentType; typedef typename PyramidVectorType::value_type PyramidComponentType; typedef ConvertScalarToPyramidFunctor ConvertFunctorType; public: ConvertVectorToPyramidFunctor() : cf() {} inline PyramidVectorType operator()(const SrcVectorType &v) const { return PyramidVectorType(cf(v.red()), cf(v.green()), cf(v.blue())); } protected: ConvertFunctorType cf; }; template class ConvertPyramidToVectorFunctor { typedef typename DestVectorType::value_type DestComponentType; typedef typename PyramidVectorType::value_type PyramidComponentType; typedef ConvertPyramidToScalarFunctor ConvertFunctorType; public: ConvertPyramidToVectorFunctor() : cf() {} inline DestVectorType operator()(const PyramidVectorType &v) const { return DestVectorType(cf(v.red()), cf(v.green()), cf(v.blue())); } protected: ConvertFunctorType cf; }; template class ConvertVectorToJCHPyramidFunctor { typedef typename SrcVectorType::value_type SrcComponentType; typedef typename PyramidVectorType::value_type PyramidComponentType; typedef ConvertScalarToPyramidFunctor ConvertFunctorType; public: ConvertVectorToJCHPyramidFunctor() : cf() { scale = 1.0 / NumericTraits::toRealPromote( NumericTraits::max()); } inline PyramidVectorType operator()(const SrcVectorType &v) const { double rgb[3]; rgb[0] = scale * NumericTraits::toRealPromote(v.red()); rgb[1] = scale * NumericTraits::toRealPromote(v.green()); rgb[2] = scale * NumericTraits::toRealPromote(v.blue()); double xyz[3]; cmsDoTransform(InputToXYZTransform, rgb, xyz, 1); cmsCIEXYZ cmsxyz; cmsxyz.X = xyz[0] * 100.0; cmsxyz.Y = xyz[1] * 100.0; cmsxyz.Z = xyz[2] * 100.0; cmsJCh jch; cmsCIECAM02Forward(CIECAMTransform, &cmsxyz, &jch); double theta = jch.h * 3.14159265358979323846 / 180.0; jch.h = jch.C * cos(theta); jch.C = jch.C * sin(theta); double shift = double(1 << (PyramidIntegerBits - 1 - 7)); jch.J *= shift; jch.C *= shift; jch.h *= shift; return PyramidVectorType(cf(jch.J), cf(jch.C), cf(jch.h)); } protected: ConvertFunctorType cf; double scale; }; template class ConvertJCHPyramidToVectorFunctor { typedef typename DestVectorType::value_type DestComponentType; typedef typename PyramidVectorType::value_type PyramidComponentType; typedef ConvertPyramidToScalarFunctor ConvertFunctorType; public: ConvertJCHPyramidToVectorFunctor() : cf() { scale = NumericTraits::toRealPromote( NumericTraits::max()); } inline DestVectorType operator()(const PyramidVectorType &v) const { cmsJCh jch; jch.J = cf(v.red()); jch.C = cf(v.green()); jch.h = cf(v.blue()); double shift = double(1 << (PyramidIntegerBits - 1 - 7)); jch.J /= shift; jch.C /= shift; jch.h /= shift; double r = sqrt(jch.C * jch.C + jch.h * jch.h); jch.h = (180.0 / 3.14159265358979323846) * atan2(jch.C, jch.h); if (jch.h < 0.0) jch.h += 360.0; jch.C = r; cmsCIEXYZ cmsxyz; cmsCIECAM02Reverse(CIECAMTransform, &jch, &cmsxyz); double xyz[3]; xyz[0] = cmsxyz.X / 100.0; xyz[1] = cmsxyz.Y / 100.0; xyz[2] = cmsxyz.Z / 100.0; double rgb[3]; cmsDoTransform(XYZToInputTransform, xyz, rgb, 1); return DestVectorType(NumericTraits::fromRealPromote(rgb[0] * scale), NumericTraits::fromRealPromote(rgb[1] * scale), NumericTraits::fromRealPromote(rgb[2] * scale)); } protected: ConvertFunctorType cf; double scale; }; template void copyToPyramidImage( typename SrcImageType::const_traverser src_upperleft, typename SrcImageType::const_traverser src_lowerright, typename SrcImageType::ConstAccessor sa, typename PyramidImageType::traverser dest_upperleft, typename PyramidImageType::Accessor da, VigraTrueType) { typedef typename SrcImageType::value_type SrcPixelType; typedef typename PyramidImageType::value_type PyramidPixelType; transformImage(src_upperleft, src_lowerright, sa, dest_upperleft, da, ConvertScalarToPyramidFunctor()); }; template void copyToPyramidImage( typename SrcImageType::const_traverser src_upperleft, typename SrcImageType::const_traverser src_lowerright, typename SrcImageType::ConstAccessor sa, typename PyramidImageType::traverser dest_upperleft, typename PyramidImageType::Accessor da, VigraFalseType) { typedef typename SrcImageType::value_type SrcVectorType; typedef typename PyramidImageType::value_type PyramidVectorType; if (UseCIECAM) { if (Verbose > 0) { cout << "CIECAM02 color conversion:"; cout.flush(); } int w = src_lowerright.x - src_upperleft.x; int twentyPercent = 1 + ((src_lowerright.y - src_upperleft.y) / 5); int tick = 1; for (int y = 0; src_upperleft.y < src_lowerright.y; ++src_upperleft.y, ++dest_upperleft.y, ++y) { if (Verbose > 0) { if ((y % twentyPercent) == 0) { cout << " " << tick++ << "/5"; cout.flush(); } } transformLine(src_upperleft.rowIterator(), src_upperleft.rowIterator() + w, sa, dest_upperleft.rowIterator(), da, ConvertVectorToJCHPyramidFunctor()); } if (Verbose > 0) cout << endl; } else { transformImage(src_upperleft, src_lowerright, sa, dest_upperleft, da, ConvertVectorToPyramidFunctor()); } }; template inline void copyToPyramidImage( typename SrcImageType::const_traverser src_upperleft, typename SrcImageType::const_traverser src_lowerright, typename SrcImageType::ConstAccessor sa, typename PyramidImageType::traverser dest_upperleft, typename PyramidImageType::Accessor da) { typedef typename NumericTraits::isScalar src_is_scalar; copyToPyramidImage( src_upperleft, src_lowerright, sa, dest_upperleft, da, src_is_scalar()); }; template inline void copyToPyramidImage( triple src, pair dest) { copyToPyramidImage( src.first, src.second, src.third, dest.first, dest.second); }; template inline void copyFromPyramidImageIf( typename PyramidImageType::const_traverser src_upperleft, typename PyramidImageType::const_traverser src_lowerright, typename PyramidImageType::ConstAccessor sa, typename MaskImageType::const_traverser mask_upperleft, typename MaskImageType::ConstAccessor ma, typename DestImageType::traverser dest_upperleft, typename DestImageType::Accessor da, VigraTrueType) { typedef typename DestImageType::value_type DestPixelType; typedef typename PyramidImageType::value_type PyramidPixelType; transformImageIf(src_upperleft, src_lowerright, sa, mask_upperleft, ma, dest_upperleft, da, ConvertPyramidToScalarFunctor()); }; template inline void copyFromPyramidImageIf( typename PyramidImageType::const_traverser src_upperleft, typename PyramidImageType::const_traverser src_lowerright, typename PyramidImageType::ConstAccessor sa, typename MaskImageType::const_traverser mask_upperleft, typename MaskImageType::ConstAccessor ma, typename DestImageType::traverser dest_upperleft, typename DestImageType::Accessor da, VigraFalseType) { typedef typename DestImageType::value_type DestVectorType; typedef typename PyramidImageType::value_type PyramidVectorType; if (UseCIECAM) { if (Verbose > 0) { cout << "CIECAM02 color conversion:"; cout.flush(); } int w = src_lowerright.x - src_upperleft.x; int twentyPercent = 1 + ((src_lowerright.y - src_upperleft.y) / 5); int tick = 1; for (int y = 0; src_upperleft.y < src_lowerright.y; ++src_upperleft.y, ++mask_upperleft.y, ++dest_upperleft.y, ++y) { if (Verbose > 0) { if ((y % twentyPercent) == 0) { cout << " " << tick++ << "/5"; cout.flush(); } } transformLineIf(src_upperleft.rowIterator(), src_upperleft.rowIterator() + w, sa, mask_upperleft.rowIterator(), ma, dest_upperleft.rowIterator(), da, ConvertJCHPyramidToVectorFunctor()); } if (Verbose > 0) cout << endl; } else { transformImageIf(src_upperleft, src_lowerright, sa, mask_upperleft, ma, dest_upperleft, da, ConvertPyramidToVectorFunctor()); } }; template inline void copyFromPyramidImageIf( typename PyramidImageType::const_traverser src_upperleft, typename PyramidImageType::const_traverser src_lowerright, typename PyramidImageType::ConstAccessor sa, typename MaskImageType::const_traverser mask_upperleft, typename MaskImageType::ConstAccessor ma, typename DestImageType::traverser dest_upperleft, typename DestImageType::Accessor da) { typedef typename NumericTraits::isScalar src_is_scalar; copyFromPyramidImageIf( src_upperleft, src_lowerright, sa, mask_upperleft, ma, dest_upperleft, da, src_is_scalar()); }; template inline void copyFromPyramidImageIf( triple src, pair mask, pair dest) { copyFromPyramidImageIf( src.first, src.second, src.third, mask.first, mask.second, dest.first, dest.second); }; } # 36 "enblend.h" 2 # 1 "assemble.h" 1 # 24 "assemble.h" # 1 "../config.h" 1 # 25 "assemble.h" 2 # 38 "assemble.h" # 1 "../include/vigra/copyimage.hxx" 1 # 43 "../include/vigra/copyimage.hxx" namespace vigra { # 56 "../include/vigra/copyimage.hxx" template void copyLine(SrcIterator s, SrcIterator send, SrcAccessor src, DestIterator d, DestAccessor dest) { for(; s != send; ++s, ++d) dest.set(src(s), d); } template void copyLineIf(SrcIterator s, SrcIterator send, SrcAccessor src, MaskIterator m, MaskAccessor mask, DestIterator d, DestAccessor dest) { for(; s != send; ++s, ++d, ++m) if(mask(m)) dest.set(src(s), d); } # 144 "../include/vigra/copyimage.hxx" template void copyImage(SrcImageIterator src_upperleft, SrcImageIterator src_lowerright, SrcAccessor sa, DestImageIterator dest_upperleft, DestAccessor da) { int w = src_lowerright.x - src_upperleft.x; for(; src_upperleft.y inline void copyImage(triple src, pair dest) { copyImage(src.first, src.second, src.third, dest.first, dest.second); } # 246 "../include/vigra/copyimage.hxx" template void copyImageIf(SrcImageIterator src_upperleft, SrcImageIterator src_lowerright, SrcAccessor sa, MaskImageIterator mask_upperleft, MaskAccessor ma, DestImageIterator dest_upperleft, DestAccessor da) { int w = src_lowerright.x - src_upperleft.x; for(; src_upperleft.y inline void copyImageIf(triple src, pair mask, pair dest) { copyImageIf(src.first, src.second, src.third, mask.first, mask.second, dest.first, dest.second); } } # 39 "assemble.h" 2 # 1 "../include/vigra/impex.hxx" 1 # 65 "../include/vigra/impex.hxx" # 1 "../include/vigra/stdimage.hxx" 1 # 43 "../include/vigra/stdimage.hxx" # 1 "../include/vigra/basicimage.hxx" 1 # 44 "../include/vigra/stdimage.hxx" 2 # 1 "../include/vigra/rgbvalue.hxx" 1 # 46 "../include/vigra/rgbvalue.hxx" # 1 "../include/vigra/tinyvector.hxx" 1 # 49 "../include/vigra/tinyvector.hxx" namespace vigra { using std::abs; using std::ceil; using std::floor; template class TinyVectorBase; template inline typename TinyVectorBase::SquaredNormType squaredNorm(TinyVectorBase const & t); namespace detail { # 83 "../include/vigra/tinyvector.hxx" template struct ExecLoop { template static void assignCast(T1 * left, T2 const * right) { for(int i=0; i::cast(right[i]); } template static void assign(T1 * left, T2 const * right) { for(int i=0; i static void add(T1 * left, T2 const * right) { for(int i=0; i static void sub(T1 * left, T2 const * right) { for(int i=0; i static void mul(T1 * left, T2 const * right) { for(int i=0; i static void neg(T1 * left, T2 const * right) { for(int i=0; i static void abs(T1 * left, T2 const * right) { for(int i=0; i static void floor(T1 * left, T2 const * right) { for(int i=0; i static void ceil(T1 * left, T2 const * right) { for(int i=0; i static void fromPromote(T1 * left, T2 const * right) { for(int i=0; i::fromPromote (right[i]); } template static void fromRealPromote(T1 * left, T2 const * right) { for(int i=0; i::fromRealPromote (right[i]); } template static void assignScalar(T1 * left, T2 right) { for(int i=0; i static void mulScalar(T1 * left, T2 right) { for(int i=0; i static void divScalar(T1 * left, T2 right) { for(int i=0; i static bool notEqual(T1 const * left, T2 const * right) { for(int i=0; i static typename NumericTraits::Promote dot(T const * d) { typename NumericTraits::Promote res(*d * *d); for(int i=1; i static typename PromoteTraits::Promote dot(T1 const * left, T2 const * right) { typename PromoteTraits::Promote res(*left * *right); for(int i=1; i static typename NormTraits::SquaredNormType squaredNorm(T const * d) { typename NormTraits::SquaredNormType res = vigra::squaredNorm(*d); for(int i=1; i struct UnrollDot { template static typename NumericTraits::Promote dot(T const * d) { return *d * *d + UnrollDot::dot(d+1); } template static typename PromoteTraits::Promote dot(T1 const * left, T2 const * right) { return *left * *right + UnrollDot::dot(left+1, right+1); } }; template <> struct UnrollDot<1> { template static typename NumericTraits::Promote dot(T const * d) { return *d * *d ; } template static typename PromoteTraits::Promote dot(T1 const * left, T2 const * right) { return *left * *right; } }; template struct UnrollSquaredNorm { template static typename NormTraits::SquaredNormType squaredNorm(T const * d) { return vigra::squaredNorm(*d) + UnrollSquaredNorm::squaredNorm(d+1); } }; template <> struct UnrollSquaredNorm<1> { template static typename NormTraits::SquaredNormType squaredNorm(T const * d) { return vigra::squaredNorm(*d); } }; # 225 "../include/vigra/tinyvector.hxx" template struct UnrollLoop { template static void assignCast(T1 * left, T2 const * right) { *left = detail::RequiresExplicitCast::cast(*right); UnrollLoop::assignCast(left+1, right+1); } template static void assign(T1 * left, T2 const * right) { (*left) = (*right); UnrollLoop::assign(left+1, right+1); } template static void add(T1 * left, T2 const * right) { (*left) += (*right); UnrollLoop::add(left+1, right+1); } template static void sub(T1 * left, T2 const * right) { (*left) -= (*right); UnrollLoop::sub(left+1, right+1); } template static void mul(T1 * left, T2 const * right) { (*left) *= (*right); UnrollLoop::mul(left+1, right+1); } template static void neg(T1 * left, T2 const * right) { (*left) = - (*right); UnrollLoop::neg(left+1, right+1); } template static void abs(T1 * left, T2 const * right) { (*left) = vigra::abs (*right); UnrollLoop::abs(left+1, right+1); } template static void floor(T1 * left, T2 const * right) { (*left) = vigra::floor (*right); UnrollLoop::floor(left+1, right+1); } template static void ceil(T1 * left, T2 const * right) { (*left) = vigra::ceil (*right); UnrollLoop::ceil(left+1, right+1); } template static void fromPromote(T1 * left, T2 const * right) { (*left) = NumericTraits::fromPromote (*right); UnrollLoop::fromPromote(left+1, right+1); } template static void fromRealPromote(T1 * left, T2 const * right) { (*left) = NumericTraits::fromRealPromote (*right); UnrollLoop::fromRealPromote(left+1, right+1); } template static void assignScalar(T1 * left, T2 right) { (*left) = (right); UnrollLoop::assignScalar(left+1, right); } template static void mulScalar(T1 * left, T2 right) { (*left) *= (right); UnrollLoop::mulScalar(left+1, right); } template static void divScalar(T1 * left, T2 right) { (*left) /= (right); UnrollLoop::divScalar(left+1, right); } template static bool notEqual(T1 const * left, T2 const * right) { return (*left != *right) || UnrollLoop::notEqual(left+1, right+1); } template static typename NumericTraits::Promote dot(T const * d) { return UnrollDot::dot(d); } template static typename PromoteTraits::Promote dot(T1 const * left, T2 const * right) { return UnrollDot::dot(left, right); } template static typename NormTraits::SquaredNormType squaredNorm(T const * d) { return UnrollSquaredNorm::squaredNorm(d); } }; template <> struct UnrollLoop<0> { template static void assignCast(T1, T2) {} template static void assign(T1, T2) {} template static void assignScalar(T1, T2) {} template static void add(T1, T2) {} template static void sub(T1, T2) {} template static void mul(T1, T2) {} template static void mulScalar(T1, T2) {} template static void div(T1, T2) {} template static void divScalar(T1, T2) {} template static void fromPromote(T1, T2) {} template static void fromRealPromote(T1, T2) {} template static void neg(T1, T2) {} template static void abs(T1, T2) {} template static void floor(T1, T2) {} template static void ceil(T1, T2) {} template static bool notEqual(T1, T2) { return false; } }; template struct TinyVectorIf { template struct res { typedef T type; }; }; template <> struct TinyVectorIf { template struct res { typedef F type; }; }; template struct LoopType { typedef typename TinyVectorIf:: template res, ExecLoop >::type type; }; struct DontInit {}; inline DontInit dontInit() {return DontInit(); } } template class TinyVector; template class TinyVectorView; # 371 "../include/vigra/tinyvector.hxx" template class TinyVectorBase { TinyVectorBase(TinyVectorBase const &); TinyVectorBase & operator=(TinyVectorBase const & other); protected: typedef typename detail::LoopType::type Loop; TinyVectorBase() {} public: typedef VALUETYPE value_type; typedef VALUETYPE & reference; typedef VALUETYPE const & const_reference; typedef VALUETYPE * pointer; typedef VALUETYPE const * const_pointer; typedef value_type * iterator; typedef value_type const * const_iterator; typedef unsigned int size_type; typedef int difference_type; typedef double scalar_multiplier; typedef typename NormTraits::SquaredNormType SquaredNormType; typedef typename SquareRootTraits::SquareRootResult NormType; enum { static_size = SIZE }; template void init(Iterator i, Iterator end) { vigra::throw_precondition_error((end-i == SIZE), "TinyVector::init(): Sequence has wrong size."); Loop::assignCast(data_, i); } template DERIVED & operator+=(TinyVectorBase const & r) { Loop::add(data_, r.begin()); return static_cast(*this); } template DERIVED & operator-=(TinyVectorBase const & r) { Loop::sub(data_, r.begin()); return static_cast(*this); } template DERIVED & operator*=(TinyVectorBase const & r) { Loop::mul(data_, r.begin()); return static_cast(*this); } DERIVED & operator*=(double r) { Loop::mulScalar(data_, r); return static_cast(*this); } DERIVED & operator/=(double r) { Loop::divScalar(data_, r); return static_cast(*this); } NormType magnitude() const { return sqrt(static_cast::SquareRootArgument>(squaredMagnitude())); } SquaredNormType squaredMagnitude() const { return Loop::squaredNorm(data_); } reference operator[](difference_type i) { return data_[i]; } const_reference operator[](difference_type i) const { return data_[i]; } iterator begin() { return data_; } iterator end() { return data_ + SIZE; } const_iterator begin() const { return data_; } const_iterator end() const { return data_ + SIZE; } size_type size() const { return SIZE; } pointer data() { return data_; } const_pointer data() const { return data_; } protected: DATA data_; }; # 581 "../include/vigra/tinyvector.hxx" template class TinyVector : public TinyVectorBase > { typedef TinyVectorBase > BaseType; typedef typename BaseType::Loop Loop; public: typedef typename BaseType::value_type value_type; typedef typename BaseType::reference reference; typedef typename BaseType::const_reference const_reference; typedef typename BaseType::pointer pointer; typedef typename BaseType::const_pointer const_pointer; typedef typename BaseType::iterator iterator; typedef typename BaseType::const_iterator const_iterator; typedef typename BaseType::size_type size_type; typedef typename BaseType::difference_type difference_type; typedef typename BaseType::scalar_multiplier scalar_multiplier; typedef typename BaseType::SquaredNormType SquaredNormType; typedef typename BaseType::NormType NormType; explicit TinyVector(value_type const & initial) : BaseType() { Loop::assignScalar(BaseType::begin(), initial); } TinyVector(value_type const & i1, value_type const & i2) : BaseType() { BaseType::data_[0] = i1; BaseType::data_[1] = i2; } TinyVector(value_type const & i1, value_type const & i2, value_type const & i3) : BaseType() { BaseType::data_[0] = i1; BaseType::data_[1] = i2; BaseType::data_[2] = i3; } TinyVector(value_type const & i1, value_type const & i2, value_type const & i3, value_type const & i4) : BaseType() { BaseType::data_[0] = i1; BaseType::data_[1] = i2; BaseType::data_[2] = i3; BaseType::data_[3] = i4; } TinyVector() : BaseType() { Loop::assignScalar(BaseType::data_, NumericTraits::zero()); } TinyVector(TinyVector const & r) : BaseType() { Loop::assign(BaseType::data_, r.data_); } explicit TinyVector(const_pointer data) : BaseType() { Loop::assign(BaseType::data_, data); } TinyVector & operator=(TinyVector const & r) { Loop::assign(BaseType::data_, r.data_); return *this; } template TinyVector(TinyVectorBase const & r) : BaseType() { Loop::assignCast(BaseType::data_, r.begin()); } template TinyVector & operator=(TinyVectorBase const & r) { Loop::assignCast(BaseType::data_, r.begin()); return *this; } explicit TinyVector(detail::DontInit) : BaseType() {} }; # 729 "../include/vigra/tinyvector.hxx" template class TinyVectorView : public TinyVectorBase > { typedef TinyVectorBase > BaseType; typedef typename BaseType::Loop Loop; public: typedef typename BaseType::value_type value_type; typedef typename BaseType::reference reference; typedef typename BaseType::const_reference const_reference; typedef typename BaseType::pointer pointer; typedef typename BaseType::const_pointer const_pointer; typedef typename BaseType::iterator iterator; typedef typename BaseType::const_iterator const_iterator; typedef typename BaseType::size_type size_type; typedef typename BaseType::difference_type difference_type; typedef typename BaseType::scalar_multiplier scalar_multiplier; typedef typename BaseType::SquaredNormType SquaredNormType; typedef typename BaseType::NormType NormType; TinyVectorView() : BaseType() { BaseType::data_ = 0; } TinyVectorView(const_pointer data) : BaseType() { BaseType::data_ = const_cast(data); } TinyVectorView(TinyVectorView const & other) : BaseType() { BaseType::data_ = const_cast(other.data_); } template TinyVectorView(TinyVectorBase const & other) : BaseType() { BaseType::data_ = const_cast(other.data()); } TinyVectorView & operator=(TinyVectorView const & r) { Loop::assign(BaseType::data_, r.begin()); return *this; } template TinyVectorView & operator=(TinyVectorBase const & r) { Loop::assignCast(BaseType::data_, r.begin()); return *this; } }; # 822 "../include/vigra/tinyvector.hxx" template inline bool operator==(TinyVectorBase const & l, TinyVectorBase const & r) { return !(l != r); } template inline bool operator!=(TinyVectorBase const & l, TinyVectorBase const & r) { typedef typename detail::LoopType::type ltype; return ltype::notEqual(l.begin(), r.begin()); } # 847 "../include/vigra/tinyvector.hxx" template std::ostream & operator<<(std::ostream & out, TinyVectorBase const & l) { out << "("; int i; for(i=0; i struct NumericTraits > { typedef TinyVector Type; typedef TinyVector::Promote, SIZE> Promote; typedef TinyVector::RealPromote, SIZE> RealPromote; typedef TinyVector::ComplexPromote, SIZE> ComplexPromote; typedef T ValueType; typedef typename NumericTraits::isIntegral isIntegral; typedef VigraFalseType isScalar; typedef typename NumericTraits::isSigned isSigned; typedef VigraFalseType isOrdered; typedef VigraFalseType isComplex; static TinyVector zero() { return TinyVector(NumericTraits::zero()); } static TinyVector one() { return TinyVector(NumericTraits::one()); } static TinyVector nonZero() { return TinyVector(NumericTraits::nonZero()); } template static Promote toPromote(TinyVectorBase const & v) { return Promote(v); } template static RealPromote toRealPromote(TinyVectorBase const & v) { return RealPromote(v); } template static TinyVector fromPromote(TinyVectorBase::Promote, SIZE, D1, D2> const & v) { TinyVector res(detail::dontInit()); typedef typename detail::LoopType::type ltype; ltype::fromPromote(res.begin(), v.begin()); return res; } template static TinyVector fromRealPromote(TinyVectorBase::RealPromote, SIZE, D1, D2> const & v) { TinyVector res(detail::dontInit()); typedef typename detail::LoopType::type ltype; ltype::fromRealPromote(res.begin(), v.begin()); return res; } }; template struct NumericTraits > : public NumericTraits > { typedef TinyVector Type; typedef TinyVector::Promote, SIZE> Promote; typedef TinyVector::RealPromote, SIZE> RealPromote; typedef TinyVector::ComplexPromote, SIZE> ComplexPromote; typedef T ValueType; typedef typename NumericTraits::isIntegral isIntegral; typedef VigraFalseType isScalar; typedef typename NumericTraits::isSigned isSigned; typedef VigraFalseType isOrdered; typedef VigraFalseType isComplex; }; template struct NormTraits > { typedef TinyVector Type; typedef typename Type::SquaredNormType SquaredNormType; typedef typename Type::NormType NormType; }; template struct NormTraits > { typedef TinyVector Type; typedef typename Type::SquaredNormType SquaredNormType; typedef typename Type::NormType NormType; }; template struct PromoteTraits, TinyVector > { typedef TinyVector::Promote, SIZE> Promote; }; template struct PromoteTraits, TinyVectorView > { typedef TinyVector::Promote, SIZE> Promote; }; template struct PromoteTraits, TinyVector > { typedef TinyVector::Promote, SIZE> Promote; }; template struct PromoteTraits, TinyVectorView > { typedef TinyVector::Promote, SIZE> Promote; }; template struct PromoteTraits, double > { typedef TinyVector::RealPromote, SIZE> Promote; }; template struct PromoteTraits > { typedef TinyVector::RealPromote, SIZE> Promote; }; template struct PromoteTraits, double > { typedef TinyVector::RealPromote, SIZE> Promote; }; template struct PromoteTraits > { typedef TinyVector::RealPromote, SIZE> Promote; }; # 1177 "../include/vigra/tinyvector.hxx" template inline typename PromoteTraits, TinyVector >::Promote operator+(TinyVectorBase const & l, TinyVectorBase const & r) { return typename PromoteTraits, TinyVector >::Promote(l) += r; } template inline typename PromoteTraits, TinyVector >::Promote operator-(TinyVectorBase const & l, TinyVectorBase const & r) { return typename PromoteTraits, TinyVector >::Promote(l) -= r; } template inline typename PromoteTraits, TinyVector >::Promote operator*(TinyVectorBase const & l, TinyVectorBase const & r) { return typename PromoteTraits, TinyVector >::Promote(l) *= r; } template inline typename NumericTraits >::RealPromote operator*(double v, TinyVectorBase const & r) { return typename NumericTraits >::RealPromote(r) *= v; } template inline typename NumericTraits >::RealPromote operator*(TinyVectorBase const & l, double v) { return typename NumericTraits >::RealPromote(l) *= v; } template inline typename NumericTraits >::RealPromote operator/(TinyVectorBase const & l, double v) { return typename NumericTraits >::RealPromote(l) /= v; } template inline TinyVector operator-(TinyVectorBase const & v) { TinyVector res(detail::dontInit()); typedef typename detail::LoopType::type ltype; ltype::neg(res.begin(), v.begin()); return res; } template inline TinyVector abs(TinyVectorBase const & v) { TinyVector res(detail::dontInit()); typedef typename detail::LoopType::type ltype; ltype::abs(res.begin(), v.begin()); return res; } template inline TinyVector ceil(TinyVectorBase const & v) { TinyVector res(detail::dontInit()); typedef typename detail::LoopType::type ltype; ltype::ceil(res.begin(), v.begin()); return res; } template inline TinyVector floor(TinyVectorBase const & v) { TinyVector res(detail::dontInit()); typedef typename detail::LoopType::type ltype; ltype::floor(res.begin(), v.begin()); return res; } template inline TinyVector::Promote, 3> cross(TinyVectorBase const & r1, TinyVectorBase const & r2) { typedef TinyVector::Promote, 3> Res; return Res(r1[1]*r2[2] - r1[2]*r2[1], r1[2]*r2[0] - r1[0]*r2[2], r1[0]*r2[1] - r1[1]*r2[0]); } template inline typename PromoteTraits::Promote dot(TinyVectorBase const & l, TinyVectorBase const & r) { typedef typename detail::LoopType::type ltype; return ltype::dot(l.begin(), r.begin()); } template inline typename TinyVectorBase::SquaredNormType squaredNorm(TinyVectorBase const & t) { return t.squaredMagnitude(); } template inline typename TinyVector::SquaredNormType squaredNorm(TinyVector const & t) { return t.squaredMagnitude(); } } # 47 "../include/vigra/rgbvalue.hxx" 2 # 1 "../include/vigra/static_assert.hxx" 1 # 45 "../include/vigra/static_assert.hxx" namespace vigra { namespace staticAssert { template struct AssertBool; template <> struct AssertBool { typedef int type; typedef void * not_type; }; template <> struct AssertBool { typedef void * type; typedef int not_type; }; template struct Assert; template <> struct Assert { typedef int type; typedef void * not_type; }; template <> struct Assert { typedef void * type; typedef int not_type; }; struct failure{}; struct success {}; inline int check( success ) { return 0; } template< typename Predicate > failure ************ (Predicate::************ assertImpl( void (*)(Predicate), typename Predicate::not_type ) ); template< typename Predicate > success assertImpl( void (*)(Predicate), typename Predicate::type ); # 130 "../include/vigra/static_assert.hxx" } } # 48 "../include/vigra/rgbvalue.hxx" 2 namespace vigra { namespace detail { template struct SelectColorIndexRHS; template struct SelectColorIndexRHS<0, R, G, B> { enum { res = R }; }; template struct SelectColorIndexRHS<1, R, G, B> { enum { res = G }; }; template struct SelectColorIndexRHS<2, R, G, B> { enum { res = B }; }; } template struct RGBValue_bad_color_indices : staticAssert::AssertBool<(R < 3 && G < 3 && B < 3 && ((1 << R) + (1 << G) + (1 << B) == 7))> {}; # 126 "../include/vigra/rgbvalue.hxx" template class RGBValue : public TinyVector { typedef TinyVector Base; enum { IDX0 = (RED_IDX == 0) ? 0 : (GREEN_IDX == 0) ? 1 : 2, IDX1 = (RED_IDX == 1) ? 0 : (GREEN_IDX == 1) ? 1 : 2, IDX2 = (RED_IDX == 2) ? 0 : (GREEN_IDX == 2) ? 1 : 2 }; public: typedef typename Base::value_type value_type; typedef typename Base::iterator iterator; typedef typename Base::const_iterator const_iterator; typedef typename Base::SquaredNormType SquaredNormType; typedef typename Base::NormType NormType; enum { RedIdx = RED_IDX, GreenIdx = GREEN_IDX, BlueIdx = BLUE_IDX }; RGBValue(value_type first, value_type second, value_type third) : Base(first, second, third) { enum { vigra_assertion_in_line_172 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (RGBValue_bad_color_indices))0, 1 ) ) ) }; } RGBValue(value_type gray) : Base(gray, gray, gray) { enum { vigra_assertion_in_line_180 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (RGBValue_bad_color_indices))0, 1 ) ) ) }; } template RGBValue(Iterator i, Iterator end) : Base(i[0], i[1], i[2]) { enum { vigra_assertion_in_line_189 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (RGBValue_bad_color_indices))0, 1 ) ) ) }; } RGBValue() : Base(0, 0, 0) { enum { vigra_assertion_in_line_197 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (RGBValue_bad_color_indices))0, 1 ) ) ) }; } RGBValue(RGBValue const & r) : Base(r) { enum { vigra_assertion_in_line_205 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (RGBValue_bad_color_indices))0, 1 ) ) ) }; } RGBValue & operator=(RGBValue const & r) { Base::operator=(r); return *this; } template RGBValue(RGBValue const & r) : Base(detail::RequiresExplicitCast::cast(r[detail::SelectColorIndexRHS::res]), detail::RequiresExplicitCast::cast(r[detail::SelectColorIndexRHS::res]), detail::RequiresExplicitCast::cast(r[detail::SelectColorIndexRHS::res])) { enum { vigra_assertion_in_line_224 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (RGBValue_bad_color_indices))0, 1 ) ) ) }; } template RGBValue & operator=(RGBValue const & r) { setRed(detail::RequiresExplicitCast::cast(r.red())); setGreen(detail::RequiresExplicitCast::cast(r.green())); setBlue(detail::RequiresExplicitCast::cast(r.blue())); return *this; } RGBValue(TinyVector const & r) : Base(r) { enum { vigra_assertion_in_line_243 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (RGBValue_bad_color_indices))0, 1 ) ) ) }; } RGBValue & operator=(TinyVector const & r) { Base::operator=(r); return *this; } RGBValue operator-() const { return RGBValue(-red(), -green(), -blue()); } value_type & red() { return (*this)[RED_IDX]; } value_type & green() { return (*this)[GREEN_IDX]; } value_type & blue() { return (*this)[BLUE_IDX]; } value_type const & red() const { return (*this)[RED_IDX]; } value_type const & green() const { return (*this)[GREEN_IDX]; } value_type const & blue() const { return (*this)[BLUE_IDX]; } value_type luminance() const { return detail::RequiresExplicitCast::cast(0.3*red() + 0.59*green() + 0.11*blue()); } value_type hue() const { value_type max = std::max(red(), std::max(green(), blue())); value_type min = std::min(red(), std::min(green(), blue())); value_type delta = (max - min) * 6; typename NumericTraits::RealPromote rdelta = NumericTraits::toRealPromote(delta); typename NumericTraits::RealPromote h = 0.0; if (red() == max) h = (green() - blue()) / rdelta; else if (green() == max) h = (1/3) + ((blue() - red()) / rdelta); else h = (2/3) + ((red() - green()) / rdelta); if (h < 0.0) h += 1.0; return NumericTraits::fromRealPromote(h * NumericTraits::max()); } NormType magnitude() const { return Base::magnitude(); } SquaredNormType squaredMagnitude() const { return Base::squaredMagnitude(); } template void setRed(V value) { (*this)[RED_IDX] = detail::RequiresExplicitCast::cast(value); } template void setGreen(V value) { (*this)[GREEN_IDX] = detail::RequiresExplicitCast::cast(value); } template void setBlue(V value) { (*this)[BLUE_IDX] = detail::RequiresExplicitCast::cast(value); } template void setRGB(V r, V g, V b) { (*this)[RED_IDX] = detail::RequiresExplicitCast::cast(r); (*this)[GREEN_IDX] = detail::RequiresExplicitCast::cast(g); (*this)[BLUE_IDX] = detail::RequiresExplicitCast::cast(b); } }; # 363 "../include/vigra/rgbvalue.hxx" template inline bool operator==(RGBValue const & l, RGBValue const & r) { return (l.red() == r.red()) && (l.green() == r.green()) && (l.blue() == r.blue()); } template inline bool operator!=(RGBValue const & l, RGBValue const & r) { return (l.red() != r.red()) || (l.green() != r.green()) || (l.blue() != r.blue()); } # 456 "../include/vigra/rgbvalue.hxx" template struct NumericTraits > { typedef RGBValue Type; typedef RGBValue::Promote, R, G, B> Promote; typedef RGBValue::RealPromote, R, G, B> RealPromote; typedef RGBValue::ComplexPromote, R, G, B> ComplexPromote; typedef T ValueType; typedef typename NumericTraits::isIntegral isIntegral; typedef VigraFalseType isScalar; typedef typename NumericTraits::isSigned isSigned; typedef VigraFalseType isOrdered; typedef VigraFalseType isComplex; static Type zero() { return Type(NumericTraits::zero()); } static Type one() { return Type(NumericTraits::one()); } static Type nonZero() { return Type(NumericTraits::nonZero()); } static Promote toPromote(Type const & v) { return Promote(v); } static RealPromote toRealPromote(Type const & v) { return RealPromote(v); } static Type fromPromote(Promote const & v) { return Type(NumericTraits::fromPromote(v.red()), NumericTraits::fromPromote(v.green()), NumericTraits::fromPromote(v.blue())); } static Type fromRealPromote(RealPromote const & v) { return Type(NumericTraits::fromRealPromote(v.red()), NumericTraits::fromRealPromote(v.green()), NumericTraits::fromRealPromote(v.blue())); } }; template struct NormTraits > { typedef RGBValue Type; typedef typename Type::SquaredNormType SquaredNormType; typedef typename Type::NormType NormType; }; template struct PromoteTraits, RGBValue > { typedef RGBValue::Promote, R, G, B> Promote; }; template struct PromoteTraits, double > { typedef RGBValue::RealPromote, R, G, B> Promote; }; template struct PromoteTraits > { typedef RGBValue::RealPromote, R, G, B> Promote; }; # 652 "../include/vigra/rgbvalue.hxx" template inline RGBValue & operator+=(RGBValue & l, RGBValue const & r) { l.red() += r.red(); l.green() += r.green(); l.blue() += r.blue(); return l; } template inline RGBValue & operator-=(RGBValue & l, RGBValue const & r) { l.red() -= r.red(); l.green() -= r.green(); l.blue() -= r.blue(); return l; } template inline RGBValue & operator*=(RGBValue & l, RGBValue const & r) { l.red() *= r.red(); l.green() *= r.green(); l.blue() *= r.blue(); return l; } template inline RGBValue & operator/=(RGBValue & l, RGBValue const & r) { l.red() /= r.red(); l.green() /= r.green(); l.blue() /= r.blue(); return l; } template inline RGBValue & operator*=(RGBValue & l, RV r) { l.red() *= r; l.green() *= r; l.blue() *= r; return l; } template inline RGBValue & operator/=(RGBValue & l, RV r) { l.red() /= r; l.green() /= r; l.blue() /= r; return l; } template inline RGBValue & operator>>=(RGBValue & l, const unsigned int s) { l.red() >>= s; l.green() >>= s; l.blue() >>= s; return l; } template inline RGBValue & operator>>=(RGBValue & l, const unsigned int s) { double scale = (double)(1 << s); l.red() /= scale; l.green() /= scale; l.blue() /= scale; return l; } template inline RGBValue & operator>>=(RGBValue & l, const unsigned int s) { float scale = (float)(1 << s); l.red() /= scale; l.green() /= scale; l.blue() /= scale; return l; } template inline RGBValue & operator<<=(RGBValue & l, const unsigned int s) { l.red() <<= s; l.green() <<= s; l.blue() <<= s; return l; } template inline RGBValue & operator<<=(RGBValue & l, const unsigned int s) { double scale = (double)(1 << s); l.red() *= scale; l.green() *= scale; l.blue() *= scale; return l; } template inline RGBValue & operator<<=(RGBValue & l, const unsigned int s) { float scale = (float)(1 << s); l.red() *= scale; l.green() *= scale; l.blue() *= scale; return l; } using std::abs; template inline RGBValue abs(RGBValue const & v) { return RGBValue(abs(v.red()), abs(v.green()), abs(v.blue())); } template inline typename PromoteTraits, RGBValue >::Promote operator+(RGBValue const & r1, RGBValue const & r2) { typename PromoteTraits, RGBValue >::Promote res(r1); res += r2; return res; } template inline typename PromoteTraits, RGBValue >::Promote operator-(RGBValue const & r1, RGBValue const & r2) { typename PromoteTraits, RGBValue >::Promote res(r1); res -= r2; return res; } template inline typename PromoteTraits, RGBValue >::Promote operator*(RGBValue const & r1, RGBValue const & r2) { typename PromoteTraits, RGBValue >::Promote res(r1); res *= r2; return res; } template inline typename PromoteTraits, RGBValue >::Promote operator/(RGBValue const & r1, RGBValue const & r2) { typename PromoteTraits, RGBValue >::Promote res(r1); res /= r2; return res; } template inline typename PromoteTraits, RGBValue >::Promote operator*(RV v, RGBValue const & r) { return r * RGBValue(v); } template inline typename PromoteTraits, RGBValue >::Promote operator*(RGBValue const & r, RV v) { return r * RGBValue(v); } template inline typename PromoteTraits, RGBValue >::Promote operator/(RGBValue const & r, RV v) { return r / RGBValue(v); } # 930 "../include/vigra/rgbvalue.hxx" template inline RGBValue operator&(RGBValue const & r1, RGBValue const & r2) { RGBValue res(r1.red() & r2.red(), r1.green() & r2.green(), r1.blue() & r2.blue()); return res; } template inline RGBValue operator>>(RGBValue const & r, int rs) { RGBValue res(r.red() >> rs, r.green() >> rs, r.blue() >> rs); return res; } template inline RGBValue operator>>(RGBValue const & r, int rs) { double scale = (double)(1 << rs); RGBValue res(r.red() / scale, r.green() / scale, r.blue() / scale); return res; } template inline RGBValue operator>>(RGBValue const & r, int rs) { float scale = (float)(1 << rs); RGBValue res(r.red() / scale, r.green() / scale, r.blue() / scale); return res; } template inline RGBValue operator<<(RGBValue const & r, int ls) { RGBValue res(r.red() << ls, r.green() << ls, r.blue() << ls); return res; } template inline RGBValue operator<<(RGBValue const & r, int ls) { double scale = (double)(1 << ls); RGBValue res(r.red() * scale, r.green() * scale, r.blue() * scale); return res; } template inline RGBValue operator<<(RGBValue const & r, int ls) { float scale = (float)(1 << ls); RGBValue res(r.red() * scale, r.green() * scale, r.blue() * scale); return res; } template inline typename PromoteTraits, RGBValue >::Promote cross(RGBValue const & r1, RGBValue const & r2) { typedef typename PromoteTraits, RGBValue >::Promote Res; return Res(r1.green()*r2.blue() - r1.blue()*r2.green(), r1.blue()*r2.red() - r1.red()*r2.blue(), r1.red()*r2.green() - r1.green()*r2.red()); } template inline typename PromoteTraits::Promote dot(RGBValue const & r1, RGBValue const & r2) { return r1.red()*r2.red() + r1.green()*r2.green() + r1.blue()*r2.blue(); } using std::ceil; template inline RGBValue ceil(RGBValue const & r) { return RGBValue(ceil(r.red()), ceil(r.green()), ceil(r.blue())); } using std::floor; template inline RGBValue floor(RGBValue const & r) { return RGBValue(floor(r.red()), floor(r.green()), floor(r.blue())); } # 1062 "../include/vigra/rgbvalue.hxx" template class RGBAccessor : public VectorAccessor { public: typedef typename RGBVALUE::value_type component_type; template component_type const & red(RGBIterator const & rgb) const { return (*rgb).red(); } template void setRGB(V r, V g, V b, RGBIterator const & rgb) const { (*rgb).setRGB( r, g, b ); } template void setRed(V value, RGBIterator const & rgb) const { (*rgb).setRed(value); } template component_type const & red(RGBIterator const & rgb, DIFFERENCE diff) const { return rgb[diff].red(); } template void setRed(V value, RGBIterator const & rgb, DIFFERENCE diff) const { rgb[diff].setRed(value); } template component_type const & green(RGBIterator const & rgb) const { return (*rgb).green(); } template void setGreen(V value, RGBIterator const & rgb) const { (*rgb).setGreen(value); } template component_type const & green(RGBIterator const & rgb, DIFFERENCE d) const { return rgb[d].green(); } template void setGreen(V value, RGBIterator const & rgb, DIFFERENCE d) const { rgb[d].setGreen(value); } template component_type const & blue(RGBIterator const & rgb) const { return (*rgb).blue(); } template void setBlue(V value, RGBIterator const & rgb) const { (*rgb).setBlue(value); } template component_type const & blue(RGBIterator const & rgb, DIFFERENCE d) const { return rgb[d].blue(); } template void setBlue(V value, RGBIterator const & rgb, DIFFERENCE d) const { rgb[d].setBlue(value); } }; # 1193 "../include/vigra/rgbvalue.hxx" template class RedAccessor { public: typedef typename RGBVALUE::value_type value_type; template value_type const & operator()(ITERATOR const & i) const { return (*i).red(); } template value_type const & operator()(ITERATOR const & i, DIFFERENCE d) const { return i[d].red(); } template void set(V value, ITERATOR const & i) const { (*i).setRed(value); } template void set(V value, ITERATOR const & i, DIFFERENCE d) const { i[d].setRed(value); } }; # 1244 "../include/vigra/rgbvalue.hxx" template class GreenAccessor { public: typedef typename RGBVALUE::value_type value_type; template value_type const & operator()(ITERATOR const & i) const { return (*i).green(); } template value_type const & operator()(ITERATOR const & i, DIFFERENCE d) const { return i[d].green(); } template void set(V value, ITERATOR const & i) const { (*i).setGreen(value); } template void set(V value, ITERATOR const & i, DIFFERENCE d) const { i[d].setGreen(value); } }; # 1295 "../include/vigra/rgbvalue.hxx" template class BlueAccessor { public: typedef typename RGBVALUE::value_type value_type; template value_type const & operator()(ITERATOR const & i) const { return (*i).blue(); } template value_type const & operator()(ITERATOR const & i, DIFFERENCE d) const { return i[d].blue(); } template void set(V value, ITERATOR const & i) const { (*i).setBlue(value); } template void set(V value, ITERATOR const & i, DIFFERENCE d) const { i[d].setBlue(value); } }; # 1346 "../include/vigra/rgbvalue.hxx" template class RGBToGrayAccessor { public: typedef typename RGBVALUE::value_type value_type; template value_type operator()(ITERATOR const & i) const { return (*i).luminance(); } template value_type operator()(ITERATOR const & i, DIFFERENCE d) const { return i[d].luminance(); } }; # 1380 "../include/vigra/rgbvalue.hxx" template class GrayToRGBAccessor { public: typedef typename vigra::RGBValue value_type; template value_type operator()(ITERATOR const & i) const { return value_type(*i,*i,*i); } template value_type operator()(ITERATOR const & i, DIFFERENCE d) const { return value_type(i[d],i[d],i[d]); } }; } # 47 "../include/vigra/stdimage.hxx" 2 namespace vigra { # 63 "../include/vigra/stdimage.hxx" typedef BasicImage BImage; # 72 "../include/vigra/stdimage.hxx" typedef BasicImage UInt8Image; # 81 "../include/vigra/stdimage.hxx" typedef BasicImage Int8Image; # 90 "../include/vigra/stdimage.hxx" typedef BasicImage SImage; # 99 "../include/vigra/stdimage.hxx" typedef BasicImage UInt16Image; # 108 "../include/vigra/stdimage.hxx" typedef BasicImage Int16Image; # 117 "../include/vigra/stdimage.hxx" typedef BasicImage IImage; # 126 "../include/vigra/stdimage.hxx" typedef BasicImage UInt32Image; # 135 "../include/vigra/stdimage.hxx" typedef BasicImage Int32Image; # 144 "../include/vigra/stdimage.hxx" typedef BasicImage FImage; # 154 "../include/vigra/stdimage.hxx" typedef BasicImage DImage; # 165 "../include/vigra/stdimage.hxx" typedef BasicImage > BRGBImage; # 175 "../include/vigra/stdimage.hxx" typedef BasicImage > UInt8RGBImage; # 185 "../include/vigra/stdimage.hxx" typedef BasicImage > Int8RGBImage; # 195 "../include/vigra/stdimage.hxx" typedef BasicImage > SRGBImage; # 205 "../include/vigra/stdimage.hxx" typedef BasicImage > UInt16RGBImage; # 215 "../include/vigra/stdimage.hxx" typedef BasicImage > Int16RGBImage; # 225 "../include/vigra/stdimage.hxx" typedef BasicImage > IRGBImage; # 235 "../include/vigra/stdimage.hxx" typedef BasicImage > UInt32RGBImage; # 245 "../include/vigra/stdimage.hxx" typedef BasicImage > Int32RGBImage; # 256 "../include/vigra/stdimage.hxx" typedef BasicImage > FRGBImage; # 267 "../include/vigra/stdimage.hxx" typedef BasicImage > DRGBImage; # 277 "../include/vigra/stdimage.hxx" typedef BasicImage > FVector2Image; # 287 "../include/vigra/stdimage.hxx" typedef BasicImage > FVector3Image; # 297 "../include/vigra/stdimage.hxx" typedef BasicImage > FVector4Image; # 307 "../include/vigra/stdimage.hxx" typedef BasicImage > DVector2Image; # 318 "../include/vigra/stdimage.hxx" typedef BasicImage > DVector3Image; # 328 "../include/vigra/stdimage.hxx" typedef BasicImage > DVector4Image; } # 66 "../include/vigra/impex.hxx" 2 # 1 "../include/vigra/inspectimage.hxx" 1 # 46 "../include/vigra/inspectimage.hxx" # 1 "../include/vigra/functortraits.hxx" 1 # 44 "../include/vigra/functortraits.hxx" namespace vigra { template class FunctorTraitsBase { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraFalseType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; }; # 123 "../include/vigra/functortraits.hxx" template class FunctorTraits : public FunctorTraitsBase {}; # 147 "../include/vigra/functortraits.hxx" template class FunctorTraits > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; }; template class FunctorTraits > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; }; template class FunctorTraits > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; }; template class FunctorTraits > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; }; template class FunctorTraits > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; }; template class FunctorTraits > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; }; template class FunctorTraits > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; }; template class FunctorTraits > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; }; template class FunctorTraits > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; }; template class FunctorTraits > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; }; template class FunctorTraits > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; }; template class FunctorTraits > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; }; template class FunctorTraits > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; }; template class FunctorTraits > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; }; template class FunctorTraits > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraTrueType isUnaryFunctor; typedef VigraFalseType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; }; template class FunctorTraits > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraTrueType isUnaryFunctor; typedef VigraFalseType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; }; template class FunctorTraits > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraTrueType isUnaryFunctor; typedef VigraFalseType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; }; template class FunctorTraits > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraTrueType isUnaryFunctor; typedef VigraFalseType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; }; template class FunctorTraits > { public: typedef T type; typedef VigraFalseType isInitializer; typedef VigraTrueType isUnaryFunctor; typedef VigraFalseType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; }; template class FunctorTraits { public: typedef R (*type)(); typedef VigraTrueType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraFalseType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; }; template class FunctorTraits { public: typedef R (*type)(T); typedef VigraFalseType isInitializer; typedef VigraTrueType isUnaryFunctor; typedef VigraFalseType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; }; template class FunctorTraits { public: typedef R (*type)(T1, T2); typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraFalseType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; }; template class FunctorTraits { public: typedef R (*type)(T1, T2, T3); typedef VigraFalseType isInitializer; typedef VigraFalseType isUnaryFunctor; typedef VigraFalseType isBinaryFunctor; typedef VigraTrueType isTernaryFunctor; typedef VigraFalseType isUnaryAnalyser; typedef VigraFalseType isBinaryAnalyser; typedef VigraFalseType isTernaryAnalyser; }; } # 47 "../include/vigra/inspectimage.hxx" 2 namespace vigra { # 63 "../include/vigra/inspectimage.hxx" template void inspectLine(SrcIterator s, SrcIterator send, SrcAccessor src, Functor & f) { for(; s != send; ++s) f(src(s)); } template void inspectLineIf(SrcIterator s, SrcIterator send, SrcAccessor src, MaskIterator m, MaskAccessor mask, Functor & f) { for(; s != send; ++s, ++m) if(mask(m)) f(src(s)); } template void inspectTwoLines(SrcIterator1 s1, SrcIterator1 s1end, SrcAccessor1 src1, SrcIterator2 s2, SrcAccessor2 src2, Functor & f) { for(; s1 != s1end; ++s1, ++s2) f(src1(s1), src2(s2)); } template void inspectTwoLinesIf(SrcIterator1 s1, SrcIterator1 s1end, SrcAccessor1 src1, SrcIterator2 s2, SrcAccessor2 src2, MaskIterator m, MaskAccessor mask, Functor & f) { for(; s1 != s1end; ++s1, ++s2, ++m) if(mask(m)) f(src1(s1), src2(s2)); } # 181 "../include/vigra/inspectimage.hxx" template void inspectImage(ImageIterator upperleft, ImageIterator lowerright, Accessor a, Functor & f) { int w = lowerright.x - upperleft.x; for(; upperleft.y inline void inspectImage(triple img, Functor & f) { inspectImage(img.first, img.second, img.third, f); } namespace functor { template class UnaryAnalyser; } template inline void inspectImage(ImageIterator upperleft, ImageIterator lowerright, Accessor a, functor::UnaryAnalyser const & f) { inspectImage(upperleft, lowerright, a, const_cast &>(f)); } template inline void inspectImage(triple img, functor::UnaryAnalyser const & f) { inspectImage(img.first, img.second, img.third, const_cast &>(f)); } # 307 "../include/vigra/inspectimage.hxx" template void inspectImageIf(ImageIterator upperleft, ImageIterator lowerright, Accessor a, MaskImageIterator mask_upperleft, MaskAccessor ma, Functor & f) { int w = lowerright.x - upperleft.x; for(; upperleft.y inline void inspectImageIf(triple img, pair mask, Functor & f) { inspectImageIf(img.first, img.second, img.third, mask.first, mask.second, f); } # 413 "../include/vigra/inspectimage.hxx" template void inspectTwoImages(ImageIterator1 upperleft1, ImageIterator1 lowerright1, Accessor1 a1, ImageIterator2 upperleft2, Accessor2 a2, Functor & f) { int w = lowerright1.x - upperleft1.x; for(; upperleft1.y inline void inspectTwoImages(triple img1, pair img2, Functor & f) { inspectTwoImages(img1.first, img1.second, img1.third, img2.first, img2.second, f); } # 529 "../include/vigra/inspectimage.hxx" template void inspectTwoImagesIf(ImageIterator1 upperleft1, ImageIterator1 lowerright1, Accessor1 a1, ImageIterator2 upperleft2, Accessor2 a2, MaskImageIterator mupperleft, MaskAccessor mask, Functor & f) { int w = lowerright1.x - upperleft1.x; for(; upperleft1.y inline void inspectTwoImagesIf(triple img1, pair img2, pair m, Functor & f) { inspectTwoImagesIf(img1.first, img1.second, img1.third, img2.first, img2.second, m.first, m.second, f); } # 617 "../include/vigra/inspectimage.hxx" template class FindMinMax { public: typedef VALUETYPE argument_type; typedef VALUETYPE result_type; typedef VALUETYPE value_type; FindMinMax() : count(0) {} void reset() { count = 0; } void operator()(argument_type const & v) { if(count) { if(v < min) min = v; if(max < v) max = v; } else { min = v; max = v; } ++count; } void operator()(RGBValue const & v) { operator()(v.red()); operator()(v.green()); operator()(v.blue()); } void operator()(FindMinMax const & v) { if(v.count) { if(count) { if(v.min < min) min = v.min; if((this->max) < v.max) max = v.max; } else { min = v.min; max = v.max; } } count += v.count; } VALUETYPE min; VALUETYPE max; unsigned int count; }; template class FunctorTraits > : public FunctorTraitsBase > { public: typedef VigraTrueType isUnaryAnalyser; }; # 759 "../include/vigra/inspectimage.hxx" template class FindAverage { public: typedef VALUETYPE argument_type; typedef typename NumericTraits::RealPromote result_type; typedef typename NumericTraits::RealPromote value_type; FindAverage() : count(0), sum(NumericTraits::zero()) {} void reset() { count = 0; sum = NumericTraits::zero(); } void operator()(argument_type const & v) { sum += v; ++count; } void operator()(FindAverage const & v) { sum += v.sum; count += v.count; } result_type average() const { return sum / (double)count; } result_type operator()() const { return sum / (double)count; } unsigned int count; result_type sum; }; template class FunctorTraits > : public FunctorTraitsBase > { public: typedef VigraTrueType isInitializer; typedef VigraTrueType isUnaryAnalyser; }; # 868 "../include/vigra/inspectimage.hxx" template class FindROISize { public: typedef VALUETYPE argument_type; typedef unsigned int result_type; typedef VALUETYPE value_type; FindROISize() : count(0) {} void reset() { count = 0; } void operator()(argument_type const &) { ++count; } result_type operator()() const { return count; } result_type size() const { return count; } void operator()(FindROISize const & o) { count += o.count; } result_type count; }; template class FunctorTraits > : public FunctorTraitsBase > { public: typedef VigraTrueType isInitializer; typedef VigraTrueType isUnaryAnalyser; }; # 985 "../include/vigra/inspectimage.hxx" class FindBoundingRectangle { public: typedef Diff2D argument_type; typedef Rect2D result_type; typedef Diff2D value_type; Point2D upperLeft; Point2D lowerRight; bool valid; FindBoundingRectangle() : valid(false) {} void reset() { valid = false; } void operator()(argument_type const & coord) { if(!valid) { upperLeft = Point2D(coord); lowerRight = Point2D(coord + Diff2D(1,1)); valid = true; } else { upperLeft.x = std::min(upperLeft.x, coord.x); upperLeft.y = std::min(upperLeft.y, coord.y); lowerRight.x = std::max(lowerRight.x, coord.x + 1); lowerRight.y = std::max(lowerRight.y, coord.y + 1); } } void operator()(FindBoundingRectangle const & otherRegion) { if(!valid) { upperLeft = otherRegion.upperLeft; lowerRight = otherRegion.lowerRight; valid = otherRegion.valid; } else if(otherRegion.valid) { upperLeft.x = std::min(upperLeft.x, otherRegion.upperLeft.x); upperLeft.y = std::min(upperLeft.y, otherRegion.upperLeft.y); lowerRight.x = std::max(lowerRight.x, otherRegion.lowerRight.x); lowerRight.y = std::max(lowerRight.y, otherRegion.lowerRight.y); } } Size2D size() const { return lowerRight - upperLeft; } result_type operator()() const { return result_type(upperLeft, lowerRight); } }; template <> class FunctorTraits : public FunctorTraitsBase { public: typedef VigraTrueType isInitializer; typedef VigraTrueType isUnaryAnalyser; }; # 1126 "../include/vigra/inspectimage.hxx" template class LastValueFunctor { public: typedef VALUETYPE argument_type; typedef VALUETYPE result_type; typedef VALUETYPE value_type; LastValueFunctor() {} void operator=(argument_type const & v) { value = v; } void reset() { value = VALUETYPE(); } void operator()(argument_type const & v) { value = v; } result_type const & operator()() const { return value; } VALUETYPE value; }; template class FunctorTraits > : public FunctorTraitsBase > { public: typedef VigraTrueType isInitializer; typedef VigraTrueType isUnaryAnalyser; }; # 1229 "../include/vigra/inspectimage.hxx" template class ReduceFunctor { FUNCTOR f_; VALUETYPE start_, accumulator_; public: typedef VALUETYPE argument_type; typedef VALUETYPE first_argument_type; typedef VALUETYPE second_argument_type; typedef VALUETYPE result_type; ReduceFunctor(FUNCTOR const & f, VALUETYPE const & initial) : f_(f), start_(initial), accumulator_(initial) {} void reset() { accumulator_ = start_; } template void operator()(T const & v) { accumulator_ = f_(accumulator_, v); } template void operator()(T1 const & v1, T2 const & v2) { accumulator_ = f_(accumulator_, v1, v2); } result_type const & operator()() const { return accumulator_; } }; template ReduceFunctor reduceFunctor(FUNCTOR const & f, VALUETYPE const & initial) { return ReduceFunctor(f, initial); } template class FunctorTraits > : public FunctorTraitsBase > { public: typedef VigraTrueType isInitializer; typedef VigraTrueType isUnaryAnalyser; typedef VigraTrueType isBinaryAnalyser; }; # 1381 "../include/vigra/inspectimage.hxx" template class ArrayOfRegionStatistics { typedef std::vector RegionArray; public: typedef typename RegionStatistics::argument_type first_argument_type; typedef LabelType second_argument_type; typedef LabelType argument_type; typedef typename RegionStatistics::result_type result_type; typedef RegionStatistics value_type; typedef RegionStatistics & reference; typedef RegionStatistics const & const_reference; typedef typename RegionArray::iterator iterator; typedef typename RegionArray::const_iterator const_iterator; ArrayOfRegionStatistics() {} ArrayOfRegionStatistics(unsigned int max_region_label) : regions(max_region_label+1) {} void resize(unsigned int max_region_label) { RegionArray newRegions(max_region_label+1); regions.swap(newRegions); } void reset() { RegionArray newRegions(regions.size()); regions.swap(newRegions); } void operator()(first_argument_type const & v, second_argument_type label) { regions[static_cast(label)](v); } void merge(argument_type label1, argument_type label2) { regions[static_cast(label1)](regions[static_cast(label2)]); } unsigned int maxRegionLabel() const { return size() - 1; } unsigned int size() const { return regions.size(); } result_type operator()(argument_type label) const { return regions[static_cast(label)](); } const_reference operator[](argument_type label) const { return regions[static_cast(label)]; } reference operator[](argument_type label) { return regions[static_cast(label)]; } iterator begin() { return regions.begin(); } const_iterator begin() const { return regions.begin(); } iterator end() { return regions.end(); } const_iterator end() const { return regions.end(); } private: std::vector regions; }; template class FunctorTraits > : public FunctorTraitsBase > { public: typedef VigraTrueType isUnaryFunctor; typedef VigraTrueType isBinaryAnalyser; }; } # 70 "../include/vigra/impex.hxx" 2 # 1 "../include/vigra/transformimage.hxx" 1 # 47 "../include/vigra/transformimage.hxx" namespace vigra { # 61 "../include/vigra/transformimage.hxx" template void transformLine(SrcIterator s, SrcIterator send, SrcAccessor src, DestIterator d, DestAccessor dest, Functor const & f) { for(; s != send; ++s, ++d) dest.set(f(src(s)), d); } template void transformLineIf(SrcIterator s, SrcIterator send, SrcAccessor src, MaskIterator m, MaskAccessor mask, DestIterator d, DestAccessor dest, Functor const & f) { for(; s != send; ++s, ++d, ++m) if(mask(m)) dest.set(f(src(s)), d); } # 165 "../include/vigra/transformimage.hxx" template void transformImage(SrcImageIterator src_upperleft, SrcImageIterator src_lowerright, SrcAccessor sa, DestImageIterator dest_upperleft, DestAccessor da, Functor const & f) { int w = src_lowerright.x - src_upperleft.x; for(; src_upperleft.y < src_lowerright.y; ++src_upperleft.y, ++dest_upperleft.y) { transformLine(src_upperleft.rowIterator(), src_upperleft.rowIterator() + w, sa, dest_upperleft.rowIterator(), da, f); } } template inline void transformImage(triple src, pair dest, Functor const & f) { transformImage(src.first, src.second, src.third, dest.first, dest.second, f); } # 283 "../include/vigra/transformimage.hxx" template void transformImageIf(SrcImageIterator src_upperleft, SrcImageIterator src_lowerright, SrcAccessor sa, MaskImageIterator mask_upperleft, MaskAccessor ma, DestImageIterator dest_upperleft, DestAccessor da, Functor const & f) { int w = src_lowerright.x - src_upperleft.x; for(; src_upperleft.y < src_lowerright.y; ++src_upperleft.y, ++mask_upperleft.y, ++dest_upperleft.y) { transformLineIf(src_upperleft.rowIterator(), src_upperleft.rowIterator() + w, sa, mask_upperleft.rowIterator(), ma, dest_upperleft.rowIterator(), da, f); } } template inline void transformImageIf(triple src, pair mask, pair dest, Functor const & f) { transformImageIf(src.first, src.second, src.third, mask.first, mask.second, dest.first, dest.second, f); } # 399 "../include/vigra/transformimage.hxx" template void gradientBasedTransform(SrcImageIterator srcul, SrcImageIterator srclr, SrcAccessor sa, DestImageIterator destul, DestAccessor da, Functor const & grad) { int w = srclr.x - srcul.x; int h = srclr.y - srcul.y; int x,y; SrcImageIterator sy = srcul; DestImageIterator dy = destul; static const Diff2D left(-1,0); static const Diff2D right(1,0); static const Diff2D top(0,-1); static const Diff2D bottom(0,1); typename NumericTraits::RealPromote diffx, diffy; SrcImageIterator sx = sy; DestImageIterator dx = dy; diffx = sa(sx) - sa(sx, right); diffy = sa(sx) - sa(sx, bottom); da.set(grad(diffx, diffy), dx); for(x=2, ++sx.x, ++dx.x; x inline void gradientBasedTransform(triple src, pair dest, Functor const & grad) { gradientBasedTransform(src.first, src.second, src.third, dest.first, dest.second, grad); } # 500 "../include/vigra/transformimage.hxx" template class LinearIntensityTransform { public: typedef DestValueType argument_type; typedef DestValueType result_type; typedef DestValueType value_type; typedef typename NumericTraits::RealPromote argument_promote; typedef Multiplier scalar_multiplier_type; LinearIntensityTransform(scalar_multiplier_type scale, argument_promote offset) : scale_(scale), offset_(offset) {} template result_type operator()(SrcValueType const & s) const { return NumericTraits::fromRealPromote(scale_ * (s + offset_)); } private: scalar_multiplier_type scale_; argument_promote offset_; }; template class FunctorTraits > : public FunctorTraitsBase > { public: typedef VigraTrueType isUnaryFunctor; }; template class ScalarIntensityTransform { public: typedef DestValueType argument_type; typedef DestValueType result_type; typedef DestValueType value_type; typedef Multiplier scalar_multiplier_type; ScalarIntensityTransform(scalar_multiplier_type scale) : scale_(scale) {} template result_type operator()(SrcValueType const & s) const { return NumericTraits::fromRealPromote(scale_ * s); } private: scalar_multiplier_type scale_; }; template class FunctorTraits > : public FunctorTraitsBase > { public: typedef VigraTrueType isUnaryFunctor; }; # 674 "../include/vigra/transformimage.hxx" template LinearIntensityTransform linearIntensityTransform(Multiplier scale, DestValueType offset) { return LinearIntensityTransform(scale, offset); } template ScalarIntensityTransform linearIntensityTransform(Multiplier scale) { return ScalarIntensityTransform(scale); } # 742 "../include/vigra/transformimage.hxx" template LinearIntensityTransform::RealPromote> linearRangeMapping(SrcValueType src_min, SrcValueType src_max, DestValueType dest_min, DestValueType dest_max ) { return linearRangeMapping(src_min, src_max, dest_min, dest_max, typename NumericTraits::isScalar()); } template LinearIntensityTransform::RealPromote> linearRangeMapping( SrcValueType src_min, SrcValueType src_max, DestValueType dest_min, DestValueType dest_max, VigraTrueType ) { typedef typename NumericTraits::RealPromote Multiplier; Multiplier diff = src_max - src_min; Multiplier scale = diff == NumericTraits::zero() ? NumericTraits::one() : (dest_max - dest_min) / diff; return LinearIntensityTransform( scale, dest_min / scale - src_min ); } template LinearIntensityTransform::RealPromote> linearRangeMapping( SrcValueType src_min, SrcValueType src_max, DestValueType dest_min, DestValueType dest_max, VigraFalseType ) { typedef typename NumericTraits::RealPromote Multiplier; typedef typename Multiplier::value_type MComponent; Multiplier scale(dest_max), offset(dest_max); for(unsigned int i=0; i::zero() ? NumericTraits::one() : (dest_max[i] - dest_min[i]) / diff; offset[i] = dest_min[i] / scale[i] - src_min[i]; } return LinearIntensityTransform(scale, offset); } # 832 "../include/vigra/transformimage.hxx" template class Threshold { public: typedef SrcValueType argument_type; typedef DestValueType result_type; Threshold(argument_type lower, argument_type higher, result_type noresult, result_type yesresult) : lower_(lower), higher_(higher), yesresult_(yesresult), noresult_(noresult) {} result_type operator()(argument_type s) const { return ((s < lower_) || (higher_ < s)) ? noresult_ : yesresult_; } private: argument_type lower_, higher_; result_type yesresult_, noresult_; }; template class FunctorTraits > : public FunctorTraitsBase > { public: typedef VigraTrueType isUnaryFunctor; }; # 948 "../include/vigra/transformimage.hxx" template class BrightnessContrastFunctor { typedef typename NumericTraits::RealPromote promote_type; public: typedef PixelType argument_type; typedef PixelType result_type; typedef PixelType value_type; BrightnessContrastFunctor(promote_type brightness, promote_type contrast, argument_type const & min, argument_type const & max) : b_(1.0/brightness), c_(1.0/contrast), min_(min), diff_(max - min), zero_(NumericTraits::zero()), one_(NumericTraits::one()) {} result_type operator()(argument_type const & v) const { promote_type v1 = (v - min_) / diff_; promote_type brighter = std::pow(v1, b_); promote_type v2 = 2.0 * brighter - one_; promote_type contrasted = (v2 < zero_) ? -std::pow(-v2, c_) : std::pow(v2, c_); return result_type(0.5 * diff_ * (contrasted + one_) + min_); } private: promote_type b_, c_; argument_type min_; promote_type diff_, zero_, one_; }; template <> class BrightnessContrastFunctor { typedef NumericTraits::RealPromote promote_type; unsigned char lut[256]; public: typedef unsigned char value_type; BrightnessContrastFunctor(promote_type brightness, promote_type contrast, value_type const & min = 0, value_type const & max = 255) { BrightnessContrastFunctor f(brightness, contrast, min, max); for(int i = min; i <= max; ++i) { lut[i] = static_cast(f(i)+0.5); } } value_type operator()(value_type const & v) const { return lut[v]; } }; template class BrightnessContrastFunctor > { typedef typename NumericTraits::RealPromote promote_type; BrightnessContrastFunctor red, green, blue; public: typedef RGBValue value_type; BrightnessContrastFunctor(promote_type brightness, promote_type contrast, value_type const & min, value_type const & max) : red(brightness, contrast, min.red(), max.red()), green(brightness, contrast, min.green(), max.green()), blue(brightness, contrast, min.blue(), max.blue()) {} value_type operator()(value_type const & v) const { return value_type(red(v.red()), green(v.green()), blue(v.blue())); } }; # 1117 "../include/vigra/transformimage.hxx" template <> class BrightnessContrastFunctor > { typedef NumericTraits::RealPromote promote_type; BrightnessContrastFunctor red, green, blue; public: typedef RGBValue value_type; BrightnessContrastFunctor(promote_type brightness, promote_type contrast, value_type const & min = value_type(0,0,0), value_type const & max = value_type(255, 255, 255)) : red(brightness, contrast, min.red(), max.red()), green(brightness, contrast, min.green(), max.green()), blue(brightness, contrast, min.blue(), max.blue()) {} value_type operator()(value_type const & v) const { return value_type(red(v.red()), green(v.green()), blue(v.blue())); } }; # 1181 "../include/vigra/transformimage.hxx" template class VectorNormFunctor { public: typedef ValueType argument_type; typedef typename NumericTraits::RealPromote result_type; result_type operator()( const argument_type &a ) const { return std::sqrt( dot(a,a) ); } }; template class FunctorTraits > : public FunctorTraitsBase > { public: typedef VigraTrueType isUnaryFunctor; }; # 1226 "../include/vigra/transformimage.hxx" template class VectorNormSqFunctor { public: typedef ValueType argument_type; typedef typename NumericTraits::RealPromote result_type; result_type operator()( const argument_type &a ) const { return dot(a,a); } }; template class FunctorTraits > : public FunctorTraitsBase > { public: typedef VigraTrueType isUnaryFunctor; }; } # 71 "../include/vigra/impex.hxx" 2 # 1 "../include/vigra/copyimage.hxx" 1 # 72 "../include/vigra/impex.hxx" 2 # 1 "../include/vigra/multi_array.hxx" 1 # 46 "../include/vigra/multi_array.hxx" # 1 "../include/vigra/basicimageview.hxx" 1 # 40 "../include/vigra/basicimageview.hxx" # 1 "../include/vigra/imageiterator.hxx" 1 # 46 "../include/vigra/imageiterator.hxx" namespace vigra { template class StridedIteratorPolicy { public: typedef IMAGEITERATOR ImageIterator; typedef typename IMAGEITERATOR::value_type value_type; typedef typename IMAGEITERATOR::difference_type::MoveY difference_type; typedef typename IMAGEITERATOR::reference reference; typedef typename IMAGEITERATOR::index_reference index_reference; typedef typename IMAGEITERATOR::pointer pointer; typedef std::random_access_iterator_tag iterator_category; struct BaseType { explicit BaseType(pointer c = 0, difference_type stride = 0) : current_(c), stride_(stride) {} pointer current_; difference_type stride_; }; static void initialize(BaseType & ) {} static reference dereference(BaseType const & d) { return const_cast(*d.current_); } static index_reference dereference(BaseType const & d, difference_type n) { return const_cast(d.current_[n*d.stride_]); } static bool equal(BaseType const & d1, BaseType const & d2) { return d1.current_ == d2.current_; } static bool less(BaseType const & d1, BaseType const & d2) { return d1.current_ < d2.current_; } static difference_type difference(BaseType const & d1, BaseType const & d2) { return (d1.current_ - d2.current_) / d1.stride_; } static void increment(BaseType & d) { d.current_ += d.stride_; } static void decrement(BaseType & d) { d.current_ -= d.stride_; } static void advance(BaseType & d, difference_type n) { d.current_ += d.stride_*n; } }; # 445 "../include/vigra/imageiterator.hxx" namespace detail { template class DirectionSelector; template <> class DirectionSelector { public: template class type { public: type(T base) : current_(base) {} type(type const & rhs) : current_(rhs.current_) {} type & operator=(type const & rhs) { current_ = rhs.current_; return *this; } void operator++() {++current_;} void operator++(int) {++current_;} void operator--() {--current_;} void operator--(int) {--current_;} void operator+=(int dx) {current_ += dx; } void operator-=(int dx) {current_ -= dx; } bool operator==(type const & rhs) const { return current_ == rhs.current_; } bool operator!=(type const & rhs) const { return current_ != rhs.current_; } bool operator<(type const & rhs) const { return current_ < rhs.current_; } bool operator<=(type const & rhs) const { return current_ <= rhs.current_; } bool operator>(type const & rhs) const { return current_ > rhs.current_; } bool operator>=(type const & rhs) const { return current_ >= rhs.current_; } int operator-(type const & rhs) const { return current_ - rhs.current_; } T operator()() const { return current_; } T operator()(int d) const { return current_ + d; } T current_; }; }; template <> class DirectionSelector { public: template class type { public: type(int stride, T base = 0) : stride_(stride), current_(base) {} type(type const & rhs) : stride_(rhs.stride_), current_(rhs.current_) {} type & operator=(type const & rhs) { stride_ = rhs.stride_; current_ = rhs.current_; return *this; } void operator++() {current_ += stride_; } void operator++(int) {current_ += stride_; } void operator--() {current_ -= stride_; } void operator--(int) {current_ -= stride_; } void operator+=(int dy) {current_ += dy*stride_; } void operator-=(int dy) {current_ -= dy*stride_; } bool operator==(type const & rhs) const { return (current_ == rhs.current_); } bool operator!=(type const & rhs) const { return (current_ != rhs.current_); } bool operator<(type const & rhs) const { return (current_ < rhs.current_); } bool operator<=(type const & rhs) const { return (current_ <= rhs.current_); } bool operator>(type const & rhs) const { return (current_ > rhs.current_); } bool operator>=(type const & rhs) const { return (current_ >= rhs.current_); } int operator-(type const & rhs) const { return (current_ - rhs.current_) / stride_; } T operator()() const { return current_; } T operator()(int d) const { return current_ + d*stride_; } int stride_; T current_; }; }; template class LinearIteratorSelector; template <> class LinearIteratorSelector { public: template class type { public: typedef typename IMAGEITERATOR::pointer res; template static res construct(typename IMAGEITERATOR::pointer data, DirSelect const &) { return data; } }; }; template <> class LinearIteratorSelector { public: template class type { public: typedef IteratorAdaptor > res; template static res construct(typename IMAGEITERATOR::pointer data, DirSelect const & d) { typedef typename res::BaseType Base; return res(Base(data, d.stride_)); } }; }; } # 648 "../include/vigra/imageiterator.hxx" template class ImageIteratorBase { typedef typename detail::LinearIteratorSelector::template type RowIteratorSelector; typedef typename detail::LinearIteratorSelector::template type ColumnIteratorSelector; public: typedef ImageIteratorBase self_type; typedef PIXELTYPE value_type; typedef PIXELTYPE PixelType; typedef REFERENCE reference; typedef REFERENCE index_reference; typedef POINTER pointer; typedef Diff2D difference_type; typedef image_traverser_tag iterator_category; typedef typename RowIteratorSelector::res row_iterator; typedef typename ColumnIteratorSelector::res column_iterator; typedef typename detail::DirectionSelector::template type MoveX; typedef typename detail::DirectionSelector::template type MoveY; bool operator==(ImageIteratorBase const & rhs) const { return (x == rhs.x) && (y == rhs.y); } bool operator!=(ImageIteratorBase const & rhs) const { return (x != rhs.x) || (y != rhs.y); } difference_type operator-(ImageIteratorBase const & rhs) const { return difference_type(x - rhs.x, y - rhs.y); } # 748 "../include/vigra/imageiterator.hxx" MoveX x; # 761 "../include/vigra/imageiterator.hxx" MoveY y; protected: ImageIteratorBase(pointer base, int ystride) : x(base), y(ystride) {} ImageIteratorBase(pointer base, int xstride, int ystride) : x(xstride, base), y(ystride) {} ImageIteratorBase(ImageIteratorBase const & rhs) : x(rhs.x), y(rhs.y) {} ImageIteratorBase() : x(0), y(0) {} ImageIteratorBase & operator=(ImageIteratorBase const & rhs) { if(this != &rhs) { x = rhs.x; y = rhs.y; } return *this; } public: IMAGEITERATOR & operator+=(difference_type const & s) { x += s.x; y += s.y; return static_cast(*this); } IMAGEITERATOR & operator-=(difference_type const & s) { x -= s.x; y -= s.y; return static_cast(*this); } IMAGEITERATOR operator+(difference_type const & s) const { IMAGEITERATOR ret(static_cast(*this)); ret += s; return ret; } IMAGEITERATOR operator-(difference_type const & s) const { IMAGEITERATOR ret(static_cast(*this)); ret -= s; return ret; } reference operator*() const { return *current(); } pointer operator->() const { return current(); } index_reference operator[](Diff2D const & d) const { return *current(d.x, d.y); } index_reference operator()(int dx, int dy) const { return *current(dx, dy); } pointer operator[](int dy) const { return x() + y(dy); } row_iterator rowIterator() const { return RowIteratorSelector::construct(current(), x); } column_iterator columnIterator() const { return ColumnIteratorSelector::construct(current(), y); } private: pointer current() const { return x() + y(); } pointer current(int dx, int dy) const { return x(dx) + y(dy); } }; # 936 "../include/vigra/imageiterator.hxx" template class ImageIterator : public ImageIteratorBase, PIXELTYPE, PIXELTYPE &, PIXELTYPE *> { public: typedef ImageIteratorBase, PIXELTYPE, PIXELTYPE &, PIXELTYPE *> Base; typedef typename Base::pointer pointer; typedef typename Base::difference_type difference_type; # 955 "../include/vigra/imageiterator.hxx" ImageIterator(pointer base, int ystride) : Base(base, ystride) {} ImageIterator() : Base() {} }; # 982 "../include/vigra/imageiterator.hxx" template class ConstImageIterator : public ImageIteratorBase, PIXELTYPE, PIXELTYPE const &, PIXELTYPE const *> { public: typedef ImageIteratorBase, PIXELTYPE, PIXELTYPE const &, PIXELTYPE const *> Base; typedef typename Base::pointer pointer; typedef typename Base::difference_type difference_type; # 1001 "../include/vigra/imageiterator.hxx" ConstImageIterator(pointer base, int ystride) : Base(base, ystride) {} ConstImageIterator(ImageIterator const & o) : Base(o.x, o.y) {} ConstImageIterator() : Base() {} ConstImageIterator & operator=(ImageIterator const & o) { Base::x = o.x; Base::y = o.y; return *this; } }; # 1056 "../include/vigra/imageiterator.hxx" template class StridedImageIterator : public ImageIteratorBase, PIXELTYPE, PIXELTYPE &, PIXELTYPE *, StridedArrayTag> { public: typedef ImageIteratorBase, PIXELTYPE, PIXELTYPE &, PIXELTYPE *, StridedArrayTag> Base; typedef typename Base::pointer pointer; typedef typename Base::difference_type difference_type; StridedImageIterator(pointer base, int ystride, int xskip, int yskip) : Base(base, xskip, ystride*yskip) {} StridedImageIterator() : Base() {} }; # 1117 "../include/vigra/imageiterator.hxx" template class ConstStridedImageIterator : public ImageIteratorBase, PIXELTYPE, PIXELTYPE const &, PIXELTYPE const *, StridedArrayTag> { public: typedef ImageIteratorBase, PIXELTYPE, PIXELTYPE const &, PIXELTYPE const *, StridedArrayTag> Base; typedef typename Base::pointer pointer; typedef typename Base::difference_type difference_type; ConstStridedImageIterator(pointer base, int ystride, int xskip, int yskip) : Base(base, xskip, ystride*yskip) {} ConstStridedImageIterator(StridedImageIterator const & o) : Base(o.x, o.y) {} ConstStridedImageIterator() : Base() {} ConstStridedImageIterator & operator=(StridedImageIterator const & o) { Base::x = o.x; Base::y = o.y; return *this; } }; # 1167 "../include/vigra/imageiterator.hxx" template struct IteratorTraits > : public IteratorTraitsBase > { typedef ImageIterator mutable_iterator; typedef ConstImageIterator const_iterator; typedef typename AccessorTraits::default_accessor DefaultAccessor; typedef DefaultAccessor default_accessor; typedef VigraTrueType hasConstantStrides; }; template struct IteratorTraits > : public IteratorTraitsBase > { typedef ImageIterator mutable_iterator; typedef ConstImageIterator const_iterator; typedef typename AccessorTraits::default_const_accessor DefaultAccessor; typedef DefaultAccessor default_accessor; typedef VigraTrueType hasConstantStrides; }; template struct IteratorTraits > : public IteratorTraitsBase > { typedef StridedImageIterator mutable_iterator; typedef ConstStridedImageIterator const_iterator; typedef typename AccessorTraits::default_accessor DefaultAccessor; typedef DefaultAccessor default_accessor; typedef VigraTrueType hasConstantStrides; }; template struct IteratorTraits > : public IteratorTraitsBase > { typedef StridedImageIterator mutable_iterator; typedef ConstStridedImageIterator const_iterator; typedef typename AccessorTraits::default_const_accessor DefaultAccessor; typedef DefaultAccessor default_accessor; typedef VigraTrueType hasConstantStrides; }; # 1313 "../include/vigra/imageiterator.hxx" template class ConstValueIteratorPolicy { public: typedef PIXELTYPE value_type; typedef int difference_type; typedef PIXELTYPE const & reference; typedef PIXELTYPE const & index_reference; typedef PIXELTYPE const * pointer; typedef std::random_access_iterator_tag iterator_category; struct BaseType { BaseType(PIXELTYPE const & v = PIXELTYPE(), int p = 0) : value(v), pos(p) {} PIXELTYPE value; int pos; }; static void initialize(BaseType & d) {} static reference dereference(BaseType const & d) { return d.value; } static index_reference dereference(BaseType d, difference_type) { return d.value; } static bool equal(BaseType const & d1, BaseType const & d2) { return d1.pos == d2.pos; } static bool less(BaseType const & d1, BaseType const & d2) { return d1.pos < d2.pos; } static difference_type difference(BaseType const & d1, BaseType const & d2) { return d1.pos - d2.pos; } static void increment(BaseType & d) { ++d.pos; } static void decrement(BaseType & d) { --d.pos; } static void advance(BaseType & d, difference_type n) { d.pos += n; } }; # 1381 "../include/vigra/imageiterator.hxx" template class ConstValueIterator { public: typedef PIXELTYPE value_type; typedef PIXELTYPE PixelType; typedef PIXELTYPE const & reference; typedef PIXELTYPE const & index_reference; typedef PIXELTYPE const * pointer; typedef Diff2D difference_type; typedef image_traverser_tag iterator_category; typedef IteratorAdaptor > row_iterator; typedef IteratorAdaptor > column_iterator; typedef int MoveX; typedef int MoveY; ConstValueIterator() : value_(NumericTraits::zero()), x(0), y(0) {} ConstValueIterator(PixelType const & v) : value_(v), x(0), y(0) {} ConstValueIterator(ConstValueIterator const & v) : value_(v.value_), x(v.x), y(v.y) {} ConstValueIterator & operator=(ConstValueIterator const & v) { if(this != &v) { value_ = v.value_; x = v.x; y = v.y; } return *this; } ConstValueIterator & operator+=(Diff2D const & d) { x += d.x; y += d.y; return *this; } ConstValueIterator & operator-=(Diff2D const & d) { x -= d.x; y -= d.y; return *this; } ConstValueIterator operator+(Diff2D const & d) const { ConstValueIterator ret(*this); ret += d; return ret; } ConstValueIterator operator-(Diff2D const & d) const { ConstValueIterator ret(*this); ret -= d; return ret; } Diff2D operator-(ConstValueIterator const & r) const { return Diff2D(x - r.x, y - r.y); } bool operator==(ConstValueIterator const & r) const { return (x == r.x) && (y == r.y); } bool operator!=(ConstValueIterator const & r) const { return (x != r.x) || (y != r.y); } reference operator*() const { return value_; } pointer operator->() const { return &value_; } index_reference operator()(int const &, int const &) const { return value_; } index_reference operator[](Diff2D const &) const { return value_; } row_iterator rowIterator() const { return row_iterator(typename row_iterator::BaseType(value_, x)); } column_iterator columnIterator() const { return column_iterator(typename column_iterator::BaseType(value_, y)); } int x; int y; private: PixelType value_; }; template struct IteratorTraits > { typedef ConstValueIterator Iterator; typedef Iterator iterator; typedef typename iterator::iterator_category iterator_category; typedef typename iterator::value_type value_type; typedef typename iterator::reference reference; typedef typename iterator::index_reference index_reference; typedef typename iterator::pointer pointer; typedef typename iterator::difference_type difference_type; typedef typename iterator::row_iterator row_iterator; typedef typename iterator::column_iterator column_iterator; typedef StandardConstAccessor DefaultAccessor; typedef StandardConstAccessor default_accessor; typedef VigraTrueType hasConstantStrides; }; typedef Diff2D CoordinateIterator; # 1659 "../include/vigra/imageiterator.hxx" } # 41 "../include/vigra/basicimageview.hxx" 2 # 1 "../include/vigra/initimage.hxx" 1 # 45 "../include/vigra/initimage.hxx" namespace vigra { # 59 "../include/vigra/initimage.hxx" template void initLineImpl(DestIterator d, DestIterator dend, DestAccessor dest, VALUETYPE v, VigraFalseType) { for(; d != dend; ++d) dest.set(v, d); } template void initLineImpl(DestIterator d, DestIterator dend, DestAccessor dest, FUNCTOR const & f, VigraTrueType) { for(; d != dend; ++d) dest.set(f(), d); } template inline void initLine(DestIterator d, DestIterator dend, DestAccessor dest, VALUETYPE v) { initLineImpl(d, dend, dest, v, typename FunctorTraits::isInitializer()); } template inline void initLineFunctor(DestIterator d, DestIterator dend, DestAccessor dest, FUNCTOR f) { initLineImpl(d, dend, dest, f, VigraTrueType()); } template void initLineIfImpl(DestIterator d, DestIterator dend, DestAccessor dest, MaskIterator m, MaskAccessor mask, VALUETYPE v, VigraFalseType) { for(; d != dend; ++d, ++m) if(mask(m)) dest.set(v, d); } template void initLineIfImpl(DestIterator d, DestIterator dend, DestAccessor dest, MaskIterator m, MaskAccessor mask, FUNCTOR const & f, VigraTrueType) { for(; d != dend; ++d, ++m) if(mask(m)) dest.set(f(), d); } template inline void initLineIf(DestIterator d, DestIterator dend, DestAccessor dest, MaskIterator m, MaskAccessor mask, VALUETYPE v) { initLineIfImpl(d, dend, dest, m, mask, v, typename FunctorTraits::isInitializer()); } template void initLineFunctorIf(DestIterator d, DestIterator dend, DestAccessor dest, MaskIterator m, MaskAccessor mask, FUNCTOR f) { initLineIfImpl(d, dend, dest, m, mask, f, VigraTrueType()); } # 199 "../include/vigra/initimage.hxx" template void initImage(ImageIterator upperleft, ImageIterator lowerright, Accessor a, VALUETYPE v) { int w = lowerright.x - upperleft.x; for(; upperleft.y < lowerright.y; ++upperleft.y) { initLine(upperleft.rowIterator(), upperleft.rowIterator() + w, a, v); } } template inline void initImage(triple img, VALUETYPE v) { initImage(img.first, img.second, img.third, v); } # 287 "../include/vigra/initimage.hxx" template void initImageWithFunctor(ImageIterator upperleft, ImageIterator lowerright, Accessor a, FUNCTOR f) { int w = lowerright.x - upperleft.x; for(; upperleft.y < lowerright.y; ++upperleft.y) { initLineFunctor(upperleft.rowIterator(), upperleft.rowIterator() + w, a, f); } } template inline void initImageWithFunctor(triple img, FUNCTOR f) { initImageWithFunctor(img.first, img.second, img.third, f); } # 379 "../include/vigra/initimage.hxx" template void initImageIf(ImageIterator upperleft, ImageIterator lowerright, Accessor a, MaskImageIterator mask_upperleft, MaskAccessor ma, VALUETYPE v) { int w = lowerright.x - upperleft.x; for(; upperleft.y < lowerright.y; ++upperleft.y, ++mask_upperleft.y) { initLineIf(upperleft.rowIterator(), upperleft.rowIterator() + w, a, mask_upperleft.rowIterator(), ma, v); } } template inline void initImageIf(triple img, pair mask, VALUETYPE v) { initImageIf(img.first, img.second, img.third, mask.first, mask.second, v); } # 461 "../include/vigra/initimage.hxx" template inline void initImageBorder(ImageIterator upperleft, ImageIterator lowerright, Accessor a, int border_width, VALUETYPE v) { int w = lowerright.x - upperleft.x; int h = lowerright.y - upperleft.y; int hb = (border_width > h) ? h : border_width; int wb = (border_width > w) ? w : border_width; initImage(upperleft, upperleft+Diff2D(w,hb), a, v); initImage(upperleft, upperleft+Diff2D(wb,h), a, v); initImage(upperleft+Diff2D(0,h-hb), lowerright, a, v); initImage(upperleft+Diff2D(w-wb,0), lowerright, a, v); } template inline void initImageBorder(triple img, int border_width, VALUETYPE v) { initImageBorder(img.first, img.second, img.third, border_width, v); } } # 42 "../include/vigra/basicimageview.hxx" 2 namespace vigra { # 66 "../include/vigra/basicimageview.hxx" template class BasicImageView { public: typedef PIXELTYPE value_type; typedef PIXELTYPE PixelType; typedef PIXELTYPE & reference; typedef PIXELTYPE const & const_reference; typedef PIXELTYPE * pointer; typedef PIXELTYPE const * const_pointer; typedef PIXELTYPE * iterator; typedef PIXELTYPE * ScanOrderIterator; typedef PIXELTYPE const * const_iterator; typedef PIXELTYPE const * ConstScanOrderIterator; typedef ImageIterator traverser; typedef ImageIterator Iterator; typedef ConstImageIterator const_traverser; typedef ConstImageIterator ConstIterator; typedef typename traverser::row_iterator row_iterator; typedef typename const_traverser::row_iterator const_row_iterator; typedef typename traverser::column_iterator column_iterator; typedef typename const_traverser::column_iterator const_column_iterator; typedef Diff2D difference_type; typedef Size2D size_type; typedef typename IteratorTraits::DefaultAccessor Accessor; typedef typename IteratorTraits::DefaultAccessor ConstAccessor; BasicImageView() : data_(0), width_(0), height_(0), stride_(0) {} BasicImageView(const_pointer data, int w, int h, int stride = 0) : data_(const_cast(data)), width_(w), height_(h), stride_(stride == 0 ? w : stride) {} BasicImageView(const_pointer data, difference_type const & size, int stride = 0) : data_(const_cast(data)), width_(size.x), height_(size.y), stride_(stride == 0 ? size.x : stride) {} BasicImageView & init(value_type const & pixel) { initImage(upperLeft(), lowerRight(), accessor(), pixel); return *this; } int width() const { return width_; } int height() const { return height_; } int stride() const { return stride_; } size_type size() const { return size_type(width(), height()); } bool isInside(difference_type const & d) const { return d.x >= 0 && d.y >= 0 && d.x < width() && d.y < height(); } reference operator[](difference_type const & d) { return data_[d.y*stride_ + d.x]; } const_reference operator[](difference_type const & d) const { return data_[d.y*stride_ + d.x]; } reference operator()(int dx, int dy) { return data_[dy*stride_ + dx]; } const_reference operator()(int dx, int dy) const { return data_[dy*stride_ + dx]; } pointer operator[](int dy) { return data_ + dy*stride_; } const_pointer operator[](int dy) const { return data_ + dy*stride_; } traverser upperLeft() { return traverser(data_, stride_); } traverser lowerRight() { return upperLeft() + size(); } const_traverser upperLeft() const { return const_traverser(data_, stride_); } const_traverser lowerRight() const { return upperLeft() + size(); } iterator begin() { vigra::throw_precondition_error((stride_ == width_), "BasicImageView::begin(): " "can only create scan order iterator if width() == stride()."); return data_; } iterator end() { vigra::throw_precondition_error((stride_ == width_), "BasicImageView::end(): " "can only create scan order iterator if width() == stride()."); return data_ + width() * height(); } const_iterator begin() const { vigra::throw_precondition_error((stride_ == width_), "BasicImageView::begin(): " "can only create scan order iterator if width() == stride()."); return data_; } const_iterator end() const { vigra::throw_precondition_error((stride_ == width_), "BasicImageView::end(): " "can only create scan order iterator if width() == stride()."); return data_ + width() * height(); } row_iterator rowBegin(int y) { return data_ + stride_ * y; } row_iterator rowEnd(int y) { return rowBegin(y) + width(); } const_row_iterator rowBegin(int y) const { return data_ + stride_ * y; } const_row_iterator rowEnd(int y) const { return rowBegin(y) + width(); } column_iterator columnBegin(int x) { typedef typename column_iterator::BaseType Iter; return column_iterator(Iter(data_ + x, stride_)); } column_iterator columnEnd(int x) { return columnBegin(x) + height(); } const_column_iterator columnBegin(int x) const { typedef typename const_column_iterator::BaseType Iter; return const_column_iterator(Iter(data_ + x, stride_)); } const_column_iterator columnEnd(int x) const { return columnBegin(x) + height(); } const_pointer data() const { return data_; } Accessor accessor() { return Accessor(); } ConstAccessor accessor() const { return ConstAccessor(); } private: pointer data_; int width_, height_, stride_; }; # 458 "../include/vigra/basicimageview.hxx" template inline triple::const_traverser, typename BasicImageView::const_traverser, Accessor> srcImageRange(BasicImageView const & img, Accessor a) { return triple::const_traverser, typename BasicImageView::const_traverser, Accessor>(img.upperLeft(), img.lowerRight(), a); } template inline pair::const_traverser, Accessor> srcImage(BasicImageView const & img, Accessor a) { return pair::const_traverser, Accessor>(img.upperLeft(), a); } template inline triple::traverser, typename BasicImageView::traverser, Accessor> destImageRange(BasicImageView & img, Accessor a) { return triple::traverser, typename BasicImageView::traverser, Accessor>(img.upperLeft(), img.lowerRight(), a); } template inline pair::traverser, Accessor> destImage(BasicImageView & img, Accessor a) { return pair::traverser, Accessor>(img.upperLeft(), a); } template inline pair::const_traverser, Accessor> maskImage(BasicImageView const & img, Accessor a) { return pair::const_traverser, Accessor>(img.upperLeft(), a); } template inline triple::const_traverser, typename BasicImageView::const_traverser, typename BasicImageView::ConstAccessor> srcImageRange(BasicImageView const & img) { return triple::const_traverser, typename BasicImageView::const_traverser, typename BasicImageView::ConstAccessor>(img.upperLeft(), img.lowerRight(), img.accessor()); } template inline pair< typename BasicImageView::const_traverser, typename BasicImageView::ConstAccessor> srcImage(BasicImageView const & img) { return pair::const_traverser, typename BasicImageView::ConstAccessor>(img.upperLeft(), img.accessor()); } template inline triple< typename BasicImageView::traverser, typename BasicImageView::traverser, typename BasicImageView::Accessor> destImageRange(BasicImageView & img) { return triple::traverser, typename BasicImageView::traverser, typename BasicImageView::Accessor>(img.upperLeft(), img.lowerRight(), img.accessor()); } template inline pair< typename BasicImageView::traverser, typename BasicImageView::Accessor> destImage(BasicImageView & img) { return pair::traverser, typename BasicImageView::Accessor>(img.upperLeft(), img.accessor()); } template inline pair< typename BasicImageView::const_traverser, typename BasicImageView::ConstAccessor> maskImage(BasicImageView const & img) { return pair::const_traverser, typename BasicImageView::ConstAccessor>(img.upperLeft(), img.accessor()); } } # 47 "../include/vigra/multi_array.hxx" 2 # 1 "../include/vigra/multi_iterator.hxx" 1 # 46 "../include/vigra/multi_iterator.hxx" namespace vigra { template class MultiIterator; template class StridedMultiIterator; # 455 "../include/vigra/multi_iterator.hxx" template class MultiIteratorBase { public: # 469 "../include/vigra/multi_iterator.hxx" template class type : public MultiIterator { public: typedef MultiIterator base_type; public: enum { level = N-1 }; typedef T value_type; typedef REFERENCE reference; typedef POINTER pointer; typedef ptrdiff_t difference_type; typedef TinyVector multi_difference_type; typedef MultiIterator next_type; typedef StridedMultiIterator <1, T, REFERENCE, POINTER> iterator; typedef multi_dimensional_traverser_tag iterator_category; type () {} type (pointer ptr, const difference_type *stride, const difference_type *shape) : base_type (ptr, stride, shape) {} void operator++ () { type::m_ptr += type::m_stride [level]; } void operator-- () { type::m_ptr -= type::m_stride [level]; } type operator++ (int) { type ret = *this; ++(*this); return ret; } type operator-- (int) { type ret = *this; --(*this); return ret; } type & operator+= (difference_type n) { type::m_ptr += n * type::m_stride [level]; return *this; } type & operator+= (multi_difference_type const & d) { type::m_ptr += total_stride(d.begin()); return *this; } type & operator-= (difference_type n) { type::m_ptr -= n * type::m_stride [level]; return *this; } type & operator-= (multi_difference_type const & d) { type::m_ptr -= total_stride(d.begin()); return *this; } difference_type operator- (type const & d) const { return (type::m_ptr - d.m_ptr) / type::m_stride[level]; } reference operator[] (difference_type n) const { return type::m_ptr [n* type::m_stride [level]]; } reference operator[] (multi_difference_type const & d) const { return type::m_ptr [total_stride(d.begin())]; } # 647 "../include/vigra/multi_iterator.hxx" next_type begin () const { return *this; } # 659 "../include/vigra/multi_iterator.hxx" next_type end () const { next_type ret = *this; ret += type::m_shape [level-1]; return ret; } # 682 "../include/vigra/multi_iterator.hxx" iterator iteratorForDimension(unsigned int d) const { vigra::throw_precondition_error((d <= level), "MultiIterator::iteratorForDimension(d): d < N required"); return iterator(type::m_ptr, &type::m_stride [d], 0); } protected: difference_type total_stride(typename multi_difference_type::const_iterator d) const { return d[level]*type::m_stride[level] + base_type::total_stride(d); } }; }; # 706 "../include/vigra/multi_iterator.hxx" template <> class MultiIteratorBase <2> { public: template class type : public MultiIterator <1, T, REFERENCE, POINTER> { public: enum { level = 1 }; typedef MultiIterator <1, T, REFERENCE, POINTER> base_type; typedef T value_type; typedef REFERENCE reference; typedef const value_type &const_reference; typedef POINTER pointer; typedef const value_type *const_pointer; typedef ptrdiff_t difference_type; typedef MultiIterator <1, T, REFERENCE, POINTER> next_type; typedef StridedMultiIterator <1, T, REFERENCE, POINTER> iterator; typedef TinyVector multi_difference_type; typedef std::random_access_iterator_tag iterator_category; const difference_type *m_stride; const difference_type *m_shape; type () : base_type (), m_stride (0), m_shape (0) {} type (pointer ptr, const difference_type *stride, const difference_type *shape) : base_type (ptr, stride, shape), m_stride (stride), m_shape (shape) {} void operator++ () { type::m_ptr += m_stride [level]; } void operator-- () { type::m_ptr -= m_stride [level]; } type operator++ (int) { type ret = *this; ++(*this); return ret; } type operator-- (int) { type ret = *this; --(*this); return ret; } type & operator+= (difference_type n) { type::m_ptr += n * m_stride [level]; return *this; } type & operator+= (multi_difference_type const & d) { type::m_ptr += total_stride(d.begin()); return *this; } type &operator-= (difference_type n) { type::m_ptr -= n * m_stride [level]; return *this; } type & operator-= (multi_difference_type const & d) { type::m_ptr -= total_stride(d.begin()); return *this; } difference_type operator- (type const & d) const { return (type::m_ptr - d.m_ptr) / m_stride[level]; } reference operator[] (difference_type n) const { return type::m_ptr [n*m_stride [level]]; } reference operator[] (multi_difference_type const & d) const { return type::m_ptr [total_stride(d.begin())]; } next_type begin () const { return *this; } next_type end () const { next_type ret = *this; ret += m_shape [level-1]; return ret; } iterator iteratorForDimension(unsigned int d) const { vigra::throw_precondition_error((d <= level), "MultiIterator::iteratorForDimension(d): d < N required"); return iterator(type::m_ptr, &m_stride [d], 0); } protected: difference_type total_stride(typename multi_difference_type::const_iterator d) const { return d[level]*m_stride[level] + base_type::total_stride(d); } }; }; # 845 "../include/vigra/multi_iterator.hxx" template <> class MultiIteratorBase <1> { public: template class type { public: enum { level = 0 }; typedef T value_type; typedef REFERENCE reference; typedef const value_type &const_reference; typedef POINTER pointer; typedef const value_type *const_pointer; typedef ptrdiff_t difference_type; typedef void next_type; typedef StridedMultiIterator <1, T, REFERENCE, POINTER> iterator; typedef TinyVector multi_difference_type; typedef multi_dimensional_traverser_tag iterator_category; pointer m_ptr; type () : m_ptr (0) {} type (pointer ptr, const difference_type *, const difference_type *) : m_ptr (ptr) {} void operator++ () { ++m_ptr; } void operator-- () { --m_ptr; } type operator++ (int) { type ret = *this; ++(*this); return ret; } type operator-- (int) { type ret = *this; --(*this); return ret; } type &operator+= (difference_type n) { m_ptr += n; return *this; } type & operator+= (multi_difference_type const & d) { m_ptr += d[level]; return *this; } type &operator-= (difference_type n) { m_ptr -= n; return *this; } type & operator-= (multi_difference_type const & d) { m_ptr -= d[level]; return *this; } reference operator* () const { return *m_ptr; } pointer get () const { return m_ptr; } pointer operator->() const { return &(operator*()); } reference operator[] (difference_type n) const { return m_ptr [n]; } reference operator[] (multi_difference_type const & d) const { return m_ptr [d[level]]; } difference_type operator- (type const & d) const { return (m_ptr - d.m_ptr); } bool operator!= (const type &rhs) const { return m_ptr != rhs.m_ptr; } bool operator== (const type &rhs) const { return m_ptr == rhs.m_ptr; } bool operator< (const type &rhs) const { return m_ptr < rhs.m_ptr; } bool operator<= (const type &rhs) const { return m_ptr <= rhs.m_ptr; } iterator iteratorForDimension(unsigned int d) const { vigra::throw_precondition_error((d == 0), "MultiIterator<1>::iteratorForDimension(d): d == 0 required"); const difference_type stride = 1; return iterator(m_ptr, &stride, 0); } protected: difference_type total_stride(typename multi_difference_type::const_iterator d) const { return d[level]; } }; }; # 1012 "../include/vigra/multi_iterator.hxx" template class MultiIterator : public MultiIteratorBase ::template type { public: typedef typename MultiIteratorBase ::template type base_type; typedef T value_type; typedef REFERENCE reference; typedef const value_type &const_reference; typedef POINTER pointer; typedef const value_type *const_pointer; typedef ptrdiff_t difference_type; typedef TinyVector multi_difference_type; typedef typename base_type::next_type next_type; typedef StridedMultiIterator <1, T, REFERENCE, POINTER> iterator; typedef typename base_type::iterator_category iterator_category; MultiIterator () {} MultiIterator (pointer ptr, const difference_type *stride, const difference_type *shape) : base_type (ptr, stride, shape) {} MultiIterator operator+ (difference_type n) const { MultiIterator ret = *this; ret += n; return ret; } MultiIterator operator+ (multi_difference_type const & d) const { MultiIterator ret = *this; ret += d; return ret; } difference_type operator- (MultiIterator const & d) const { return base_type::operator-(d); } MultiIterator operator- (difference_type n) const { MultiIterator ret = *this; ret -= n; return ret; } MultiIterator operator- (multi_difference_type const & d) const { MultiIterator ret = *this; ret -= d; return ret; } # 1147 "../include/vigra/multi_iterator.hxx" template MultiIterator & dim() { return *this; } MultiIterator<1, T, REFERENCE, POINTER> & dim0() { return *this; } MultiIterator<2, T, REFERENCE, POINTER> & dim1() { return *this; } MultiIterator<3, T, REFERENCE, POINTER> & dim2() { return *this; } MultiIterator<4, T, REFERENCE, POINTER> & dim3() { return *this; } MultiIterator<5, T, REFERENCE, POINTER> & dim4() { return *this; } }; # 1181 "../include/vigra/multi_iterator.hxx" template class StridedMultiIteratorBase { public: # 1196 "../include/vigra/multi_iterator.hxx" template class type : public StridedMultiIterator { public: typedef StridedMultiIterator base_type; public: enum { level = N-1 }; typedef T value_type; typedef REFERENCE reference; typedef const value_type &const_reference; typedef POINTER pointer; typedef const value_type *const_pointer; typedef ptrdiff_t difference_type; typedef TinyVector multi_difference_type; typedef StridedMultiIterator next_type; typedef StridedMultiIterator <1, T, REFERENCE, POINTER> iterator; typedef multi_dimensional_traverser_tag iterator_category; type () {} type (pointer ptr, const difference_type *stride, const difference_type *shape) : base_type (ptr, stride, shape) {} void operator++ () { type::m_ptr += type::m_stride [level]; } void operator-- () { type::m_ptr -= type::m_stride [level]; } type operator++ (int) { type ret = *this; ++(*this); return ret; } type operator-- (int) { type ret = *this; --(*this); return ret; } type &operator+= (difference_type n) { type::m_ptr += n * type::m_stride [level]; return *this; } type & operator+= (multi_difference_type const & d) { type::m_ptr += total_stride(d.begin()); return *this; } type &operator-= (difference_type n) { type::m_ptr -= n * type::m_stride [level]; return *this; } type & operator-= (multi_difference_type const & d) { type::m_ptr -= total_stride(d.begin()); return *this; } difference_type operator- (type const & d) const { return (type::m_ptr - d.m_ptr) / type::m_stride[level]; } reference operator[] (difference_type n) const { return type::m_ptr [n* type::m_stride [level]]; } reference operator[] (multi_difference_type const & d) const { return type::m_ptr [total_stride(d.begin())]; } # 1382 "../include/vigra/multi_iterator.hxx" next_type begin () const { return *this; } # 1394 "../include/vigra/multi_iterator.hxx" next_type end () const { next_type ret = *this; ret += type::m_shape [level-1]; return ret; } # 1417 "../include/vigra/multi_iterator.hxx" iterator iteratorForDimension(unsigned int d) const { vigra::throw_precondition_error((d <= N), "StridedMultiIterator::iteratorForDimension(d): d <= N required"); return iterator(type::m_ptr, &type::m_stride [d], 0); } protected: difference_type total_stride(typename multi_difference_type::const_iterator d) const { return d[level]*type::m_stride[level] + base_type::total_stride(d); } }; }; # 1441 "../include/vigra/multi_iterator.hxx" template <> class StridedMultiIteratorBase <2> { public: template class type : public StridedMultiIterator <1, T, REFERENCE, POINTER> { public: enum { level = 1 }; typedef StridedMultiIterator <1, T, REFERENCE, POINTER> base_type; typedef T value_type; typedef REFERENCE reference; typedef const value_type &const_reference; typedef POINTER pointer; typedef const value_type *const_pointer; typedef ptrdiff_t difference_type; typedef TinyVector multi_difference_type; typedef StridedMultiIterator <1, T, REFERENCE, POINTER> next_type; typedef StridedMultiIterator <1, T, REFERENCE, POINTER> iterator; typedef multi_dimensional_traverser_tag iterator_category; const difference_type *m_stride; const difference_type *m_shape; type () : base_type (), m_stride (0), m_shape (0) {} type (pointer ptr, const difference_type *stride, const difference_type *shape) : base_type (ptr, stride, shape), m_stride (stride), m_shape (shape) {} void operator++ () { type::m_ptr += m_stride [level]; } void operator-- () { type::m_ptr -= m_stride [level]; } type operator++ (int) { type ret = *this; ++(*this); return ret; } type operator-- (int) { type ret = *this; --(*this); return ret; } type &operator+= (int n) { type::m_ptr += n * m_stride [level]; return *this; } type & operator+= (multi_difference_type const & d) { type::m_ptr += total_stride(d.begin()); return *this; } type &operator-= (difference_type n) { type::m_ptr -= n * m_stride [level]; return *this; } type & operator-= (multi_difference_type const & d) { type::m_ptr -= total_stride(d.begin()); return *this; } reference operator[] (difference_type n) const { return type::m_ptr [n*m_stride [level]]; } difference_type operator- (type const & d) const { return (type::m_ptr - d.m_ptr) / m_stride[level]; } reference operator[] (multi_difference_type const & d) const { return type::m_ptr [total_stride(d.begin())]; } next_type begin () const { return *this; } next_type end () const { next_type ret = *this; ret += m_shape [level-1]; return ret; } iterator iteratorForDimension(unsigned int d) const { vigra::throw_precondition_error((d <= type::N), "StridedMultiIterator::iteratorForDimension(d): d <= N required"); return iterator(type::m_ptr, &m_stride [d], 0); } protected: difference_type total_stride(typename multi_difference_type::const_iterator d) const { return d[level]*m_stride[level] + base_type::total_stride(d); } }; }; # 1578 "../include/vigra/multi_iterator.hxx" template <> class StridedMultiIteratorBase <1> { public: template class type { public: enum { level = 0 }; typedef T value_type; typedef REFERENCE reference; typedef const value_type &const_reference; typedef POINTER pointer; typedef const value_type *const_pointer; typedef ptrdiff_t difference_type; typedef TinyVector multi_difference_type; typedef void next_type; typedef StridedMultiIterator <1, T, REFERENCE, POINTER> iterator; typedef std::random_access_iterator_tag iterator_category; pointer m_ptr; difference_type m_stride; type () : m_ptr (0), m_stride (0) {} type (pointer ptr, const difference_type *stride, const difference_type *) : m_ptr (ptr), m_stride (stride [level]) {} reference operator* () const { return *m_ptr; } pointer get () const { return m_ptr; } pointer operator-> () const { return &(operator*()); } void operator++ () { m_ptr += m_stride; } void operator-- () { m_ptr -= m_stride; } type operator++ (int) { type ret = *this; ++(*this); return ret; } type operator-- (int) { type ret = *this; --(*this); return ret; } type &operator+= (difference_type n) { m_ptr += n * m_stride; return *this; } type & operator+= (multi_difference_type const & d) { m_ptr += d[level] * m_stride; return *this; } type &operator-= (difference_type n) { m_ptr -= n * m_stride; return *this; } type & operator-= (multi_difference_type const & d) { m_ptr -= d[level] * m_stride; return *this; } difference_type operator- (type const & d) const { return (m_ptr - d.m_ptr) / m_stride; } reference operator[] (difference_type n) const { return m_ptr [n*m_stride]; } reference operator[] (multi_difference_type const & d) const { return m_ptr [d[level]*m_stride]; } bool operator!= (const type &rhs) const { return m_ptr != rhs.m_ptr; } bool operator== (const type &rhs) const { return m_ptr == rhs.m_ptr; } bool operator< (const type &rhs) const { return m_ptr < rhs.m_ptr; } bool operator<= (const type &rhs) const { return m_ptr <= rhs.m_ptr; } iterator iteratorForDimension(unsigned int d) const { vigra::throw_precondition_error((d == 0), "StridedMultiIterator<1>::iteratorForDimension(d): d == 0 required"); return *this; } protected: difference_type total_stride(typename multi_difference_type::const_iterator d) const { return d[level]*m_stride; } }; }; # 1744 "../include/vigra/multi_iterator.hxx" template class StridedMultiIterator : public StridedMultiIteratorBase ::template type { public: typedef typename StridedMultiIteratorBase < N>::template type base_type; typedef T value_type; typedef REFERENCE reference; typedef const value_type &const_reference; typedef POINTER pointer; typedef const value_type *const_pointer; typedef ptrdiff_t difference_type; typedef TinyVector multi_difference_type; typedef typename base_type::next_type next_type; typedef StridedMultiIterator <1, T, REFERENCE, POINTER> iterator; typedef typename base_type::iterator_category iterator_category; StridedMultiIterator () {} StridedMultiIterator (pointer ptr, const difference_type *stride, const difference_type *shape) : base_type (ptr, stride, shape) {} StridedMultiIterator operator+ (difference_type n) const { StridedMultiIterator ret = *this; ret += n; return ret; } StridedMultiIterator operator+ (multi_difference_type const & d) const { StridedMultiIterator ret = *this; ret += d; return ret; } difference_type operator- (StridedMultiIterator const & d) const { return base_type::operator-(d); } StridedMultiIterator operator- (difference_type n) const { StridedMultiIterator ret = *this; ret -= n; return ret; } StridedMultiIterator operator- (multi_difference_type const & d) const { StridedMultiIterator ret = *this; ret -= d; return ret; } # 1880 "../include/vigra/multi_iterator.hxx" template StridedMultiIterator & dim() { return *this; } StridedMultiIterator<1, T, REFERENCE, POINTER> & dim0() { return *this; } StridedMultiIterator<2, T, REFERENCE, POINTER> & dim1() { return *this; } StridedMultiIterator<3, T, REFERENCE, POINTER> & dim2() { return *this; } StridedMultiIterator<4, T, REFERENCE, POINTER> & dim3() { return *this; } StridedMultiIterator<5, T, REFERENCE, POINTER> & dim4() { return *this; } }; } # 50 "../include/vigra/multi_array.hxx" 2 namespace vigra { namespace detail { # 68 "../include/vigra/multi_array.hxx" template TinyVector defaultStride(const TinyVector &shape) { TinyVector ret; ret [0] = 1; for (unsigned int i = 1; i < N; ++i) ret [i] = ret [i-1] * shape [i-1]; return ret; } # 93 "../include/vigra/multi_array.hxx" template struct MaybeStrided { typedef UnstridedArrayTag type; }; template <> struct MaybeStrided <0> { typedef StridedArrayTag type; }; # 119 "../include/vigra/multi_array.hxx" template struct MultiIteratorChooser { struct Nil {}; template struct Traverser { typedef Nil type; }; }; # 144 "../include/vigra/multi_array.hxx" template <> struct MultiIteratorChooser { template struct Traverser { typedef StridedMultiIterator type; }; }; # 167 "../include/vigra/multi_array.hxx" template <> struct MultiIteratorChooser { template struct Traverser { typedef MultiIterator type; }; }; template void initMultiArrayData(DestIterator d, Shape const & shape, T const & init, MetaInt<0>) { DestIterator dend = d + shape[0]; for(; d != dend; ++d) { *d = init; } } template void initMultiArrayData(DestIterator d, Shape const & shape, T const & init, MetaInt) { DestIterator dend = d + shape[N]; for(; d != dend; ++d) { initMultiArrayData(d.begin(), shape, init, MetaInt()); } } template void copyMultiArrayData(SrcIterator s, Shape const & shape, DestIterator d, MetaInt<0>) { SrcIterator send = s + shape[0]; for(; s != send; ++s, ++d) { *d = *s; } } template void copyMultiArrayData(SrcIterator s, Shape const & shape, DestIterator d, MetaInt) { SrcIterator send = s + shape[N]; for(; s != send; ++s, ++d) { copyMultiArrayData(s.begin(), shape, d.begin(), MetaInt()); } } template void uninitializedCopyMultiArrayData(SrcIterator s, Shape const & shape, T * & d, ALLOC & a, MetaInt<0>) { SrcIterator send = s + shape[0]; for(; s != send; ++s, ++d) { a.construct(d, *s); } } template void uninitializedCopyMultiArrayData(SrcIterator s, Shape const & shape, T * & d, ALLOC & a, MetaInt) { SrcIterator send = s + shape[N]; for(; s != send; ++s) { uninitializedCopyMultiArrayData(s.begin(), shape, d, a, MetaInt()); } } template void squaredNormOfMultiArray(SrcIterator s, Shape const & shape, T & result, MetaInt<0>) { SrcIterator send = s + shape[0]; for(; s != send; ++s) { result += *s * *s; } } template void squaredNormOfMultiArray(SrcIterator s, Shape const & shape, T & result, MetaInt) { SrcIterator send = s + shape[N]; for(; s != send; ++s) { squaredNormOfMultiArray(s.begin(), shape, result, MetaInt()); } } } # 281 "../include/vigra/multi_array.hxx" template class MultiArrayView; template > class MultiArray; # 317 "../include/vigra/multi_array.hxx" template class MultiArrayView { public: # 329 "../include/vigra/multi_array.hxx" enum ActualDimension { actual_dimension = (N==0) ? 1 : N }; typedef T value_type; typedef value_type &reference; typedef const value_type &const_reference; typedef value_type *pointer; typedef const value_type *const_pointer; typedef TinyVector difference_type; typedef difference_type size_type; typedef typename detail::MultiIteratorChooser < C>::template Traverser ::type traverser; typedef typename detail::MultiIteratorChooser < C>::template Traverser ::type const_traverser; typedef MultiArrayView view_type; typedef MultiArray matrix_type; typedef typename NormTraits::SquaredNormType SquaredNormType; typedef typename SquareRootTraits::SquareRootResult NormType; protected: typedef typename difference_type::value_type diff_zero_t; difference_type m_shape; difference_type m_stride; pointer m_ptr; public: MultiArrayView () : m_shape (diff_zero_t(0)), m_stride (diff_zero_t(0)), m_ptr (0) {} MultiArrayView (const difference_type &shape, pointer ptr); MultiArrayView (const difference_type &shape, const difference_type &stride, pointer ptr); reference operator[] (const difference_type &d) { return m_ptr [dot (d, m_stride)]; } const_reference operator[] (const difference_type &d) const { return m_ptr [dot (d, m_stride)]; } reference operator() (int x) { return m_ptr [m_stride[0]*x]; } reference operator() (int x, int y) { return m_ptr [m_stride[0]*x + m_stride[1]*y]; } reference operator() (int x, int y, int z) { return m_ptr [m_stride[0]*x + m_stride[1]*y + m_stride[2]*z]; } reference operator() (int x, int y, int z, int u) { return m_ptr [m_stride[0]*x + m_stride[1]*y + m_stride[2]*z + m_stride[3]*u]; } reference operator() (int x, int y, int z, int u, int v) { return m_ptr [m_stride[0]*x + m_stride[1]*y + m_stride[2]*z + m_stride[3]*u + m_stride[4]*v]; } const_reference operator() (int x) const { return m_ptr [m_stride[0]*x]; } const_reference operator() (int x, int y) const { return m_ptr [m_stride[0]*x + m_stride[1]*y]; } const_reference operator() (int x, int y, int z) const { return m_ptr [m_stride[0]*x + m_stride[1]*y + m_stride[2]*z]; } const_reference operator() (int x, int y, int z, int u) const { return m_ptr [m_stride[0]*x + m_stride[1]*y + m_stride[2]*z + m_stride[3]*u]; } const_reference operator() (int x, int y, int z, int u, int v) const { return m_ptr [m_stride[0]*x + m_stride[1]*y + m_stride[2]*z + m_stride[3]*u + m_stride[4]*v]; } template void init(const U & init); template void copy(const MultiArrayView & rhs); template MultiArrayView bindOuter (const TinyVector &d) const; template MultiArrayView bindInner (const TinyVector &d) const; template MultiArrayView ::type > bind (int d) const; MultiArrayView bindOuter (int d) const; MultiArrayView bindInner (int d) const; MultiArrayView bindAt (int m, int d) const; MultiArrayView subarray (const difference_type &p, const difference_type &q) const { const int offset = dot (m_stride, p); return MultiArrayView (q - p, m_stride, m_ptr + offset); } MultiArrayView stridearray (const difference_type &s) const { difference_type shape = m_shape; for (unsigned int i = 0; i < actual_dimension; ++i) shape [i] /= s [i]; return MultiArrayView (shape, m_stride * s, m_ptr); } std::size_t elementCount () const { std::size_t ret = m_shape[0]; for(unsigned int i = 1; i < actual_dimension; ++i) ret *= m_shape[i]; return ret; } const size_type & size () const { return m_shape; } const difference_type & shape () const { return m_shape; } int size (int n) const { return m_shape [n]; } int shape (int n) const { return m_shape [n]; } const difference_type & stride () const { return m_stride; } int stride (int n) const { return m_stride [n]; } bool isInside (difference_type const & p) const { for(int d=0; d= shape(d)) return false; return true; } SquaredNormType squaredNorm() const { SquaredNormType res = NumericTraits::zero(); detail::squaredNormOfMultiArray(traverser_begin(), shape(), res, MetaInt()); return res; } NormType norm() const { return sqrt(static_cast::SquareRootArgument>(this->squaredNorm())); } pointer data () const { return m_ptr; } traverser traverser_begin () { traverser ret (m_ptr, m_stride.begin (), m_shape.begin ()); return ret; } const_traverser traverser_begin () const { const_traverser ret (m_ptr, m_stride.begin (), m_shape.begin ()); return ret; } traverser traverser_end () { traverser ret (m_ptr, m_stride.begin (), m_shape.begin ()); ret += m_shape [actual_dimension-1]; return ret; } const_traverser traverser_end () const { const_traverser ret (m_ptr, m_stride.begin (), m_shape.begin ()); ret += m_shape [actual_dimension-1]; return ret; } view_type view () { return *this; } }; template MultiArrayView ::MultiArrayView (const difference_type &shape, pointer ptr) : m_shape (shape), m_stride (detail::defaultStride ::actual_dimension> (shape)), m_ptr (ptr) {} template MultiArrayView ::MultiArrayView (const difference_type &shape, const difference_type &stride, pointer ptr) : m_shape (shape), m_stride (stride), m_ptr (ptr) {} template template void MultiArrayView ::init(const U & init) { detail::initMultiArrayData(traverser_begin(), shape(), init, MetaInt()); } template template void MultiArrayView ::copy(const MultiArrayView & rhs) { if(this == &rhs) return; vigra::throw_precondition_error((shape () == rhs.shape ()), "MultiArrayView::copy(): shape mismatch."); detail::copyMultiArrayData(rhs.traverser_begin(), shape(), traverser_begin(), MetaInt()); } template template MultiArrayView MultiArrayView ::bindOuter (const TinyVector &d) const { TinyVector stride; stride.init (m_stride.begin () + N-M, m_stride.end ()); pointer ptr = m_ptr + dot (d, stride); static const int NNew = (N-M == 0) ? 1 : N-M; TinyVector inner_shape, inner_stride; if (N-M == 0) { inner_shape [0] = 1; inner_stride [0] = 0; } else { inner_shape.init (m_shape.begin (), m_shape.end () - M); inner_stride.init (m_stride.begin (), m_stride.end () - M); } return MultiArrayView (inner_shape, inner_stride, ptr); } template template MultiArrayView MultiArrayView ::bindInner (const TinyVector &d) const { TinyVector stride; stride.init (m_stride.begin (), m_stride.end () - N + M); pointer ptr = m_ptr + dot (d, stride); static const int NNew = (N-M == 0) ? 1 : N-M; TinyVector outer_shape, outer_stride; if (N-M == 0) { outer_shape [0] = 1; outer_stride [0] = 0; } else { outer_shape.init (m_shape.begin () + M, m_shape.end ()); outer_stride.init (m_stride.begin () + M, m_stride.end ()); } return MultiArrayView (outer_shape, outer_stride, ptr); } template template MultiArrayView ::type > MultiArrayView ::bind (int d) const { static const int NNew = (N-1 == 0) ? 1 : N-1; TinyVector shape, stride; if (N-1 == 0) { shape[0] = 1; stride[0] = 0; } else { std::copy (m_shape.begin (), m_shape.begin () + M, shape.begin ()); std::copy (m_shape.begin () + M+1, m_shape.end (), shape.begin () + M); std::copy (m_stride.begin (), m_stride.begin () + M, stride.begin ()); std::copy (m_stride.begin () + M+1, m_stride.end (), stride.begin () + M); } return MultiArrayView ::type> (shape, stride, m_ptr + d * m_stride[M]); } template MultiArrayView MultiArrayView ::bindOuter (int d) const { static const int NNew = (N-1 == 0) ? 1 : N-1; TinyVector inner_shape, inner_stride; if (N-1 == 0) { inner_shape [0] = 1; inner_stride [0] = 0; } else { inner_shape.init (m_shape.begin (), m_shape.end () - 1); inner_stride.init (m_stride.begin (), m_stride.end () - 1); } return MultiArrayView (inner_shape, inner_stride, m_ptr + d * m_stride [N-1]); } template MultiArrayView MultiArrayView ::bindInner (int d) const { static const int NNew = (N-1 == 0) ? 1 : N-1; TinyVector outer_shape, outer_stride; if (N-1 == 0) { outer_shape [0] = 1; outer_stride [0] = 0; } else { outer_shape.init (m_shape.begin () + 1, m_shape.end ()); outer_stride.init (m_stride.begin () + 1, m_stride.end ()); } return MultiArrayView (outer_shape, outer_stride, m_ptr + d * m_stride [0]); } template MultiArrayView MultiArrayView ::bindAt (int n, int d) const { vigra::throw_precondition_error((n < static_cast (N)), "MultiArrayView ::bindAt(): dimension out of range."); static const int NNew = (N-1 == 0) ? 1 : N-1; TinyVector shape, stride; if (N-1 == 0) { shape [0] = 1; stride [0] = 0; } else { std::copy (m_shape.begin (), m_shape.begin () + n, shape.begin ()); std::copy (m_shape.begin () + n+1, m_shape.end (), shape.begin () + n); std::copy (m_stride.begin (), m_stride.begin () + n, stride.begin ()); std::copy (m_stride.begin () + n+1, m_stride.end (), stride.begin () + n); } return MultiArrayView (shape, stride, m_ptr + d * m_stride[n]); } template struct NormTraits > { typedef MultiArrayView Type; typedef typename Type::SquaredNormType SquaredNormType; typedef typename Type::NormType NormType; }; template inline typename MultiArrayView ::SquaredNormType squaredNorm(MultiArrayView const & a) { return a.squaredNorm(); } template inline typename MultiArrayView ::NormType norm(MultiArrayView const & a) { return a.norm(); } # 946 "../include/vigra/multi_array.hxx" template class MultiArray : public MultiArrayView { public: using MultiArrayView ::actual_dimension; typedef A allocator_type; typedef MultiArrayView view_type; typedef MultiArray matrix_type; typedef typename view_type::value_type value_type; typedef typename view_type::pointer pointer; typedef typename view_type::const_pointer const_pointer; typedef typename view_type::reference reference; typedef typename view_type::const_reference const_reference; typedef typename view_type::size_type size_type; typedef typename view_type::difference_type difference_type; typedef typename detail::MultiIteratorChooser < UnstridedArrayTag>::template Traverser ::type traverser; typedef typename detail::MultiIteratorChooser < UnstridedArrayTag>::template Traverser ::type const_traverser; typedef T * iterator; typedef T * const_iterator; typedef typename view_type::SquaredNormType SquaredNormType; typedef typename view_type::NormType NormType; protected: typedef typename difference_type::value_type diff_zero_t; allocator_type m_alloc; void allocate (pointer &ptr, std::size_t s, const_reference init); template void allocate (pointer &ptr, std::size_t s, U const * init); template void allocate (pointer &ptr, MultiArrayView const & init); void deallocate (pointer &ptr, std::size_t s); public: MultiArray (); MultiArray (allocator_type const & alloc); explicit MultiArray (const difference_type &shape, allocator_type const & alloc = allocator_type()); MultiArray (const difference_type &shape, const_reference init, allocator_type const & alloc = allocator_type()); MultiArray (const difference_type &shape, const_pointer init, allocator_type const & alloc = allocator_type()); MultiArray (const MultiArray &rhs); template MultiArray (const MultiArrayView &rhs, allocator_type const & alloc = allocator_type()); MultiArray &operator= (const MultiArray &rhs) { return this->operator=(static_cast(rhs)); } template MultiArray &operator= (const MultiArrayView &rhs); ~MultiArray (); void reshape (const difference_type &shape) { reshape (shape, NumericTraits ::zero ()); } void reshape (const difference_type &shape, const_reference init); void swap (MultiArray & other); iterator begin () { return this->data(); } iterator end () { return this->data() + this->elementCount(); } const_iterator begin () const { return this->data(); } const_iterator end () const { return this->data() + this->elementCount(); } allocator_type const & allocator () const { return m_alloc; } }; template MultiArray ::MultiArray () : MultiArrayView (difference_type (diff_zero_t(0)), difference_type (diff_zero_t(0)), 0) {} template MultiArray ::MultiArray (allocator_type const & alloc) : MultiArrayView (difference_type (diff_zero_t(0)), difference_type (diff_zero_t(0)), 0), m_alloc(alloc) {} template MultiArray ::MultiArray (const difference_type &shape, allocator_type const & alloc) : MultiArrayView (shape, detail::defaultStride ::actual_dimension> (shape), 0), m_alloc(alloc) { if (N == 0) { this->m_shape [0] = 1; this->m_stride [0] = 0; } allocate (this->m_ptr, this->elementCount (), NumericTraits::zero ()); } template MultiArray ::MultiArray (const difference_type &shape, const_reference init, allocator_type const & alloc) : MultiArrayView (shape, detail::defaultStride ::actual_dimension> (shape), 0), m_alloc(alloc) { if (N == 0) { this->m_shape [0] = 1; this->m_stride [0] = 0; } allocate (this->m_ptr, this->elementCount (), init); } template MultiArray ::MultiArray (const difference_type &shape, const_pointer init, allocator_type const & alloc) : MultiArrayView (shape, detail::defaultStride ::actual_dimension> (shape), 0), m_alloc(alloc) { if (N == 0) { this->m_shape [0] = 1; this->m_stride [0] = 0; } allocate (this->m_ptr, this->elementCount (), init); } template MultiArray ::MultiArray (const MultiArray &rhs) : MultiArrayView (rhs.m_shape, rhs.m_stride, 0), m_alloc (rhs.m_alloc) { allocate (this->m_ptr, this->elementCount (), rhs.data ()); } template template MultiArray ::MultiArray (const MultiArrayView &rhs, allocator_type const & alloc) : MultiArrayView (rhs.shape(), detail::defaultStride ::actual_dimension> (rhs.shape()), 0), m_alloc (alloc) { allocate (this->m_ptr, rhs); } template MultiArray ::~MultiArray () { deallocate (this->m_ptr, this->elementCount ()); } template template MultiArray & MultiArray ::operator= (const MultiArrayView &rhs) { if (this == &rhs) return *this; if (this->shape() == rhs.shape()) this->copy(rhs); else { pointer new_ptr; allocate (new_ptr, rhs); deallocate (this->m_ptr, this->elementCount ()); this->m_shape = rhs.shape(); this->m_stride = rhs.stride(); this->m_ptr = new_ptr; } return *this; } template void MultiArray ::reshape (const difference_type & new_shape, const_reference init) { if (N== 0) return; difference_type new_stride = detail::defaultStride ::actual_dimension> (new_shape); std::size_t new_size = new_shape [MultiArrayView::actual_dimension-1] * new_stride [MultiArrayView::actual_dimension-1]; T *new_ptr; allocate (new_ptr, new_size, init); deallocate (this->m_ptr, this->elementCount ()); this->m_ptr = new_ptr; this->m_shape = new_shape; this->m_stride = new_stride; } template void MultiArray ::swap (MultiArray & other) { if (this == &other) return; std::swap(this->m_shape, other.m_shape); std::swap(this->m_stride, other.m_stride); std::swap(this->m_ptr, other.m_ptr); std::swap(this->m_alloc, other.m_alloc); } template void MultiArray ::allocate (pointer & ptr, std::size_t s, const_reference init) { ptr = m_alloc.allocate (s); std::size_t i; try { for (i = 0; i < s; ++i) m_alloc.construct (ptr + i, init); } catch (...) { for (std::size_t j = 0; j < i; ++j) m_alloc.destroy (ptr + j); m_alloc.deallocate (ptr, s); throw; } } template template void MultiArray ::allocate (pointer & ptr, std::size_t s, U const * init) { ptr = m_alloc.allocate (s); std::size_t i; try { for (i = 0; i < s; ++i, ++init) m_alloc.construct (ptr + i, *init); } catch (...) { for (std::size_t j = 0; j < i; ++j) m_alloc.destroy (ptr + j); m_alloc.deallocate (ptr, s); throw; } } template template void MultiArray ::allocate (pointer & ptr, MultiArrayView const & init) { std::size_t s = init.elementCount(); ptr = m_alloc.allocate (s); pointer p = ptr; try { detail::uninitializedCopyMultiArrayData(init.traverser_begin(), init.shape(), p, m_alloc, MetaInt()); } catch (...) { for (pointer pp = ptr; pp < p; ++pp) m_alloc.destroy (pp); m_alloc.deallocate (ptr, s); throw; } } template void MultiArray ::deallocate (pointer & ptr, std::size_t s) { if (ptr == 0) return; for (std::size_t i = 0; i < s; ++i) m_alloc.destroy (ptr + i); m_alloc.deallocate (ptr, s); ptr = 0; } template struct NormTraits > { typedef MultiArray Type; typedef typename Type::SquaredNormType SquaredNormType; typedef typename Type::NormType NormType; }; template inline triple::const_traverser, typename MultiArrayView::difference_type, typename AccessorTraits::default_const_accessor > srcMultiArrayRange( MultiArrayView const & array ) { return triple::const_traverser, typename MultiArrayView::difference_type, typename AccessorTraits::default_const_accessor > ( array.traverser_begin(), array.shape(), typename AccessorTraits::default_const_accessor() ); } template inline triple::const_traverser, typename MultiArrayView::difference_type, Accessor > srcMultiArrayRange( MultiArrayView const & array, Accessor a ) { return triple::const_traverser, typename MultiArrayView::difference_type, Accessor > ( array.traverser_begin(), array.shape(), a); } template inline pair::const_traverser, typename AccessorTraits::default_const_accessor > srcMultiArray( MultiArrayView const & array ) { return pair::const_traverser, typename AccessorTraits::default_const_accessor > ( array.traverser_begin(), typename AccessorTraits::default_const_accessor() ); } template inline pair::const_traverser, Accessor > srcMultiArray( MultiArrayView const & array, Accessor a ) { return pair::const_traverser, Accessor > ( array.traverser_begin(), a ); } template inline triple::traverser, typename MultiArrayView::difference_type, typename AccessorTraits::default_accessor > destMultiArrayRange( MultiArrayView & array ) { return triple::traverser, typename MultiArrayView::difference_type, typename AccessorTraits::default_accessor > ( array.traverser_begin(), array.shape(), typename AccessorTraits::default_accessor() ); } template inline triple::traverser, typename MultiArrayView::difference_type, Accessor > destMultiArrayRange( MultiArrayView & array, Accessor a ) { return triple::traverser, typename MultiArrayView::difference_type, Accessor > ( array.traverser_begin(), array.shape(), a ); } template inline pair::traverser, typename AccessorTraits::default_accessor > destMultiArray( MultiArrayView & array ) { return pair::traverser, typename AccessorTraits::default_accessor > ( array.traverser_begin(), typename AccessorTraits::default_accessor() ); } template inline pair::traverser, Accessor > destMultiArray( MultiArrayView & array, Accessor a ) { return pair::traverser, Accessor > ( array.traverser_begin(), a ); } # 1500 "../include/vigra/multi_array.hxx" template BasicImageView makeBasicImageView (MultiArrayView <2, T, UnstridedArrayTag> const &array) { return BasicImageView (array.data (), array.shape (0), array.shape (1)); } # 1516 "../include/vigra/multi_array.hxx" template BasicImageView makeBasicImageView (MultiArray <3, T> const &array) { return BasicImageView (array.data (), array.shape (0)*array.shape (1), array.shape (2)); } # 1532 "../include/vigra/multi_array.hxx" template BasicImageView > makeRGBImageView (MultiArray<3, T> const &array) { vigra::throw_precondition_error((array.shape (0) == 3), "makeRGBImageView(): array.shape(0) must be 3."); return BasicImageView > ( reinterpret_cast *> (array.data ()), array.shape (1), array.shape (2)); } } # 73 "../include/vigra/impex.hxx" 2 # 1 "../include/vigra/codec.hxx" 1 # 58 "../include/vigra/codec.hxx" # 1 "../include/vigra/windows.h" 1 # 59 "../include/vigra/codec.hxx" 2 # 1 "../include/vigra/array_vector.hxx" 1 # 42 "../include/vigra/array_vector.hxx" # 1 "../include/vigra/memory.hxx" 1 # 42 "../include/vigra/memory.hxx" namespace vigra { namespace detail { template void destroy_n(T * , int , VigraTrueType ) { } template void destroy_n(T * p, int n, VigraFalseType ) { T * end = p + n; for(; p != end; ++p) p->~T(); } template void destroy_n(T * p, int n) { destroy_n(p, n, typename TypeTraits::isPOD()); } template void destroy(T * p, VigraTrueType ) { } template void destroy(T * p, VigraFalseType ) { p->~T(); } template void destroy(T * p) { destroy(p, typename TypeTraits::isPOD()); } # 97 "../include/vigra/memory.hxx" } } # 43 "../include/vigra/array_vector.hxx" 2 namespace vigra { # 69 "../include/vigra/array_vector.hxx" template > class ArrayVector { typedef ArrayVector this_type; enum { minimumCapacity = 2 }; public: typedef T value_type; typedef value_type & reference; typedef value_type const & const_reference; typedef value_type * pointer; typedef value_type const * const_pointer; typedef value_type * iterator; typedef value_type const * const_iterator; typedef unsigned int size_type; typedef int difference_type; typedef Alloc allocator_type; typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; public: ArrayVector(); explicit ArrayVector(Alloc const & alloc); explicit ArrayVector( size_type size, Alloc const & alloc = Alloc()); ArrayVector( size_type size, value_type const & initial, Alloc const & alloc = Alloc()); ArrayVector( this_type const & rhs ); template ArrayVector(InputIterator i, InputIterator end); template ArrayVector(InputIterator i, InputIterator end, Alloc const & alloc); this_type & operator=( this_type const & rhs ); ~ArrayVector(); inline const_pointer data() const { return data_; } inline pointer data() { return data_; } inline const_iterator begin() const { return data(); } inline iterator begin() { return data(); } inline const_iterator end() const { return data() + size(); } inline iterator end() { return data() + size(); } inline reverse_iterator rbegin() { return (reverse_iterator(end())); } inline const_reverse_iterator rbegin() const { return (const_reverse_iterator(end())); } inline reverse_iterator rend() { return (reverse_iterator(begin())); } inline const_reverse_iterator rend() const { return (const_reverse_iterator(begin())); } reference front() { return *data_; } const_reference front() const { return *data_; } reference back() { return data_[size_-1]; } const_reference back() const { return data_[size_-1]; } reference operator[]( size_type i ) { return data()[i]; } const_reference operator[]( size_type i ) const { return data()[i]; } void pop_back(); void push_back( value_type const & t ); iterator insert(iterator p, value_type const & v); iterator insert(iterator p, size_type n, value_type const & v); template iterator insert(iterator p, InputIterator i, InputIterator iend); iterator erase(iterator p); iterator erase(iterator p, iterator q); void clear(); void reserve( size_type new_capacity ); void reserve(); void resize( size_type new_size, value_type const & initial ); void resize( size_type new_size ) { resize(new_size, value_type()); } bool empty() const { return size_ == 0; } size_type size() const { return size_; } size_type capacity() const { return capacity_; } void swap(this_type & rhs); private: void deallocate(pointer data, size_type size); pointer reserve_raw(size_type capacity); Alloc alloc_; size_type size_, capacity_; pointer data_; }; template ArrayVector::ArrayVector() : alloc_(Alloc()), size_(0), capacity_(minimumCapacity), data_(reserve_raw(minimumCapacity)) {} template ArrayVector::ArrayVector(Alloc const & alloc) : alloc_(alloc), size_(0), capacity_(minimumCapacity), data_(reserve_raw(minimumCapacity)) {} template ArrayVector::ArrayVector( size_type size, Alloc const & alloc) : alloc_(alloc), size_(size), capacity_(size), data_(reserve_raw(size)) { if(size_ > 0) std::uninitialized_fill(data_, data_+size_, value_type()); } template ArrayVector::ArrayVector( size_type size, value_type const & initial, Alloc const & alloc) : alloc_(alloc), size_(size), capacity_(size), data_(reserve_raw(size)) { if(size_ > 0) std::uninitialized_fill(data_, data_+size_, initial); } template ArrayVector::ArrayVector( this_type const & rhs ) : alloc_(rhs.alloc_), size_(rhs.size_), capacity_(rhs.capacity_), data_(reserve_raw(rhs.capacity_)) { if(size_ > 0) std::uninitialized_copy(rhs.data_, rhs.data_+size_, data_); } template template ArrayVector::ArrayVector(InputIterator i, InputIterator end) : alloc_(), size_(std::distance(i, end)), capacity_(size_), data_(reserve_raw(size_)) { std::uninitialized_copy(i, end, data_); } template template ArrayVector::ArrayVector(InputIterator i, InputIterator end, Alloc const & alloc) : alloc_(alloc), size_(std::distance(i, end)), capacity_(size_), data_(reserve_raw(size_)) { std::uninitialized_copy(i, end, data_); } template ArrayVector & ArrayVector::operator=( this_type const & rhs ) { if(this == &rhs) return *this; ArrayVector new_vector(rhs); swap(new_vector); return *this; } template ArrayVector::~ArrayVector() { deallocate(data_, size_); } template void ArrayVector::pop_back() { --size_; alloc_.destroy(data_ + size_); } template void ArrayVector::push_back( value_type const & t ) { reserve(); alloc_.construct(data_ + size_, t); ++size_; } template void ArrayVector::clear() { detail::destroy_n(data_, size_); size_ = 0; } template typename ArrayVector::iterator ArrayVector::insert(iterator p, value_type const & v) { difference_type pos = p - begin(); if(p == end()) { push_back(v); p = begin() + pos; } else { push_back(back()); p = begin() + pos; std::copy_backward(p, end() - 2, end() - 1); *p = v; } return p; } template typename ArrayVector::iterator ArrayVector::insert(iterator p, size_type n, value_type const & v) { difference_type pos = p - begin(); size_type new_size = size() + n; if(new_size >= capacity_) { pointer new_data = reserve_raw(new_size); std::uninitialized_copy(begin(), p, new_data); std::uninitialized_fill(new_data + pos, new_data + pos + n, v); std::uninitialized_copy(p, end(), new_data + pos + n); deallocate(data_, size_); capacity_ = new_size; data_ = new_data; } else if(pos + n >= size_) { size_type diff = pos + n - size_; std::uninitialized_copy(p, end(), end() + diff); std::uninitialized_fill(end(), end() + diff, v); std::fill(p, end(), v); } else { size_type diff = size_ - (pos + n); std::uninitialized_copy(end() - n, end(), end()); std::copy_backward(p, p + diff, end()); std::fill(p, p + n, v); } size_ = new_size; return begin() + pos; } template template typename ArrayVector::iterator ArrayVector::insert(iterator p, InputIterator i, InputIterator iend) { size_type n = iend - i; size_type pos = p - begin(); size_type new_size = size() + n; if(new_size >= capacity_) { pointer new_data = reserve_raw(new_size); std::uninitialized_copy(begin(), p, new_data); std::uninitialized_copy(i, iend, new_data + pos); std::uninitialized_copy(p, end(), new_data + pos + n); deallocate(data_, size_); capacity_ = new_size; data_ = new_data; } else if(pos + n >= size_) { size_type diff = pos + n - size_; std::uninitialized_copy(p, end(), end() + diff); std::uninitialized_copy(iend - diff, iend, end()); std::copy(i, iend - diff, p); } else { size_type diff = size_ - (pos + n); std::uninitialized_copy(end() - n, end(), end()); std::copy_backward(p, p + diff, end()); std::copy(i, iend, p); } size_ = new_size; return begin() + pos; } template typename ArrayVector::iterator ArrayVector::erase(iterator p) { std::copy(p+1, end(), p); pop_back(); return p; } template typename ArrayVector::iterator ArrayVector::erase(iterator p, iterator q) { std::copy(q, end(), p); size_type eraseCount = q - p; detail::destroy_n(end() - eraseCount, eraseCount); size_ -= eraseCount; return p; } template void ArrayVector::reserve( size_type new_capacity ) { if(new_capacity <= capacity_) return; pointer new_data = reserve_raw(new_capacity); if(size_ > 0) std::uninitialized_copy(data_, data_+size_, new_data); deallocate(data_, size_); data_ = new_data; capacity_ = new_capacity; } template void ArrayVector::reserve() { if(capacity_ == 0) reserve(minimumCapacity); else if(size_ == capacity_) reserve(2*capacity_); } template void ArrayVector::resize( size_type new_size, value_type const & initial) { if(new_size < size_) erase(begin() + new_size, end()); else if(size_ < new_size) { insert(end(), new_size - size(), initial); } } template void ArrayVector::swap(this_type & rhs) { std::swap(size_, rhs.size_); std::swap(capacity_, rhs.capacity_); std::swap(data_, rhs.data_); } template void ArrayVector::deallocate(pointer data, size_type size) { if(data && (size > 0)) { detail::destroy_n(data, size); alloc_.deallocate(data, size); } } template typename ArrayVector::pointer ArrayVector::reserve_raw(size_type capacity) { pointer data = 0; if(capacity) { data = alloc_.allocate(capacity); } return data; } } # 60 "../include/vigra/codec.hxx" 2 # 74 "../include/vigra/codec.hxx" namespace vigra { template struct TypeAsString { static std::string result() { return "undefined"; } }; template <> struct TypeAsString { static std::string result() { return "UINT8"; } }; template <> struct TypeAsString { static std::string result() { return "INT16"; } }; template <> struct TypeAsString { static std::string result() { return "UINT16"; } }; template <> struct TypeAsString { static std::string result() { return "INT32"; } }; template <> struct TypeAsString { static std::string result() { return "UINT32"; } }; template <> struct TypeAsString { static std::string result() { return "INT32"; } }; template <> struct TypeAsString { static std::string result() { return "FLOAT"; } }; template <> struct TypeAsString { static std::string result() { return "DOUBLE"; } }; struct CodecDesc { std::string fileType; std::vector pixelTypes; std::vector compressionTypes; std::vector > magicStrings; std::vector fileExtensions; std::vector bandNumbers; }; struct Decoder { virtual ~Decoder() {}; virtual void init( const std::string & ) = 0; virtual void close() = 0; virtual void abort() = 0; virtual std::string getFileType() const = 0; virtual std::string getPixelType() const = 0; virtual unsigned int getWidth() const = 0; virtual unsigned int getHeight() const = 0; virtual unsigned int getNumBands() const = 0; virtual unsigned int getNumExtraBands() const { return 0; } virtual vigra::Diff2D getPosition() const { return vigra::Diff2D(); } virtual unsigned int getOffset() const = 0; virtual const void * currentScanlineOfBand( unsigned int ) const = 0; virtual void nextScanline() = 0; typedef ArrayVector ICCProfile; const ICCProfile & getICCProfile() const { return iccProfile_; } ICCProfile iccProfile_; }; struct Encoder { virtual ~Encoder() {}; virtual void init( const std::string & ) = 0; virtual void close() = 0; virtual void abort() = 0; virtual std::string getFileType() const = 0; virtual unsigned int getOffset() const = 0; virtual void setWidth( unsigned int ) = 0; virtual void setHeight( unsigned int ) = 0; virtual void setNumBands( unsigned int ) = 0; virtual void setCompressionType( const std::string &, int = -1 ) = 0; virtual void setPixelType( const std::string & ) = 0; virtual void finalizeSettings() = 0; virtual void setPosition( const vigra::Diff2D & pos ) { } virtual void setXResolution( float xres ) { } virtual void setYResolution( float yres ) { } typedef ArrayVector ICCProfile; virtual void setICCProfile(const ICCProfile & ) { } virtual void * currentScanlineOfBand( unsigned int ) = 0; virtual void nextScanline() = 0; struct TIFFCompressionException {}; }; struct CodecFactory { virtual CodecDesc getCodecDesc() const = 0; virtual std::auto_ptr getDecoder() const = 0; virtual std::auto_ptr getEncoder() const = 0; virtual ~CodecFactory() {}; }; # 239 "../include/vigra/codec.hxx" std::auto_ptr getDecoder( const std::string &, const std::string & = "undefined" ); std::auto_ptr getEncoder( const std::string &, const std::string & = "undefined" ); std::vector queryCodecPixelTypes( const std::string & ); bool negotiatePixelType( std::string const & codecname, std::string const & srcPixeltype, std::string & destPixeltype); bool isPixelTypeSupported( const std::string &, const std::string & ); bool isBandNumberSupported( const std::string &, int bands ); } # 75 "../include/vigra/impex.hxx" 2 # 1 "../include/vigra/imageinfo.hxx" 1 # 59 "../include/vigra/imageinfo.hxx" namespace vigra { # 82 "../include/vigra/imageinfo.hxx" std::string impexListFormats(); # 99 "../include/vigra/imageinfo.hxx" std::string impexListExtensions(); # 116 "../include/vigra/imageinfo.hxx" bool isImage(char const * filename); # 131 "../include/vigra/imageinfo.hxx" class ImageExportInfo { public: # 144 "../include/vigra/imageinfo.hxx" ImageExportInfo( const char * ); ~ImageExportInfo(); const char * getFileName() const; # 197 "../include/vigra/imageinfo.hxx" ImageExportInfo & setFileType( const char * ); const char * getFileType() const; # 216 "../include/vigra/imageinfo.hxx" ImageExportInfo & setCompression( const char * ); const char * getCompression() const; # 240 "../include/vigra/imageinfo.hxx" ImageExportInfo & setPixelType( const char * ); # 251 "../include/vigra/imageinfo.hxx" const char * getPixelType() const; ImageExportInfo & setXResolution( float ); float getXResolution() const; ImageExportInfo & setYResolution( float ); float getYResolution() const; # 273 "../include/vigra/imageinfo.hxx" ImageExportInfo & setPosition(const Diff2D & pos); Diff2D getPosition() const; typedef ArrayVector ICCProfile; const ICCProfile & getICCProfile() const; ImageExportInfo & setICCProfile(const ICCProfile & profile); private: std::string m_filename, m_filetype, m_pixeltype, m_comp; float m_x_res, m_y_res; Diff2D m_pos; ICCProfile m_icc_profile; }; std::auto_ptr encoder( const ImageExportInfo & info ); # 320 "../include/vigra/imageinfo.hxx" class ImageImportInfo { public: enum PixelType { UINT8, INT16, UINT16, INT32, UINT32, FLOAT, DOUBLE }; # 348 "../include/vigra/imageinfo.hxx" ImageImportInfo( const char * ); ~ImageImportInfo(); const char * getFileName() const; const char * getFileType() const; int width() const; int height() const; int numBands() const; int numExtraBands() const; Size2D size() const; bool isGrayscale() const; bool isColor() const; # 403 "../include/vigra/imageinfo.hxx" const char * getPixelType() const; PixelType pixelType() const; bool isByte() const; Diff2D getPosition() const; float getXResolution() const; float getYResolution() const; typedef ArrayVector ICCProfile; const ICCProfile & getICCProfile() const; private: std::string m_filename, m_filetype, m_pixeltype; int m_width, m_height, m_num_bands, m_num_extra_bands; float m_x_res, m_y_res; Diff2D m_pos; ICCProfile m_icc_profile; }; std::auto_ptr decoder( const ImageImportInfo & info ); } # 76 "../include/vigra/impex.hxx" 2 namespace vigra { # 105 "../include/vigra/impex.hxx" template< class ImageIterator, class Accessor, class SrcValueType > void read_bands( Decoder * dec, ImageIterator ys, Accessor a, SrcValueType ) { typedef unsigned int size_type; typedef typename ImageIterator::row_iterator DstRowIterator; typedef typename Accessor::value_type AccessorValueType; typedef typename AccessorValueType::value_type DstValueType; const size_type width = dec->getWidth(); const size_type height = dec->getHeight(); const size_type num_bands = dec->getNumBands(); vigra::throw_precondition_error((num_bands == a.size(ys)), "importImage(): number of bands (color channels) in file and destination image differ."); SrcValueType const * scanline; DstRowIterator xs = ys.rowIterator(); if (num_bands == 4) { unsigned int offset = dec->getOffset(); SrcValueType const * scanline0; SrcValueType const * scanline1; SrcValueType const * scanline2; SrcValueType const * scanline3; for( size_type y = 0; y < height; ++y, ++ys.y ) { dec->nextScanline(); xs = ys.rowIterator(); scanline0 = static_cast< SrcValueType const * > (dec->currentScanlineOfBand(0)); scanline1 = static_cast< SrcValueType const * > (dec->currentScanlineOfBand(1)); scanline2 = static_cast< SrcValueType const * > (dec->currentScanlineOfBand(2)); scanline3 = static_cast< SrcValueType const * > (dec->currentScanlineOfBand(3)); for( size_type x = 0; x < width; ++x, ++xs ) { a.setComponent( *scanline0, xs, 0); a.setComponent( *scanline1, xs, 1); a.setComponent( *scanline2, xs, 2); a.setComponent( *scanline3, xs, 3); scanline0 += offset; scanline1 += offset; scanline2 += offset; scanline3 += offset; } } } else { for( size_type y = 0; y < height; ++y, ++ys.y ) { dec->nextScanline(); for( size_type b = 0; b < num_bands; ++b ) { xs = ys.rowIterator(); scanline = static_cast< SrcValueType const * > (dec->currentScanlineOfBand(b)); for( size_type x = 0; x < width; ++x, ++xs ) { a.setComponent( *scanline, xs, b ); scanline += dec->getOffset(); } } } } } # 197 "../include/vigra/impex.hxx" template< class ImageIterator, class Accessor, class SrcValueType > void read_band( Decoder * dec, ImageIterator ys, Accessor a, SrcValueType ) { typedef unsigned int size_type; typedef typename ImageIterator::row_iterator DstRowIterator; typedef typename Accessor::value_type DstValueType; const size_type width = dec->getWidth(); const size_type height = dec->getHeight(); SrcValueType const * scanline; DstRowIterator xs = ys.rowIterator(); for( size_type y = 0; y < height; ++y, ++ys.y ) { dec->nextScanline(); xs = ys.rowIterator(); scanline = static_cast< SrcValueType const * >(dec->currentScanlineOfBand(0)); for( size_type x = 0; x < width; ++x, ++xs ) a.set( scanline[x], xs ); } } # 240 "../include/vigra/impex.hxx" template< class ImageIterator, class Accessor > void importVectorImage( const ImageImportInfo & info, ImageIterator iter, Accessor a ) { std::auto_ptr dec = decoder(info); std::string pixeltype = dec->getPixelType(); if ( pixeltype == "UINT8" ) read_bands( dec.get(), iter, a, (UInt8)0 ); else if ( pixeltype == "INT16" ) read_bands( dec.get(), iter, a, Int16() ); else if ( pixeltype == "UINT16" ) read_bands( dec.get(), iter, a, (UInt16)0 ); else if ( pixeltype == "INT32" ) read_bands( dec.get(), iter, a, Int32() ); else if ( pixeltype == "UINT32" ) read_bands( dec.get(), iter, a, (UInt32)0 ); else if ( pixeltype == "FLOAT" ) read_bands( dec.get(), iter, a, float() ); else if ( pixeltype == "DOUBLE" ) read_bands( dec.get(), iter, a, double() ); else vigra::throw_precondition_error((false), "invalid pixeltype"); dec->close(); } # 288 "../include/vigra/impex.hxx" template < class ImageIterator, class Accessor > void importScalarImage( const ImageImportInfo & info, ImageIterator iter, Accessor a ) { std::auto_ptr dec = decoder(info); std::string pixeltype = dec->getPixelType(); if ( pixeltype == "UINT8" ) read_band( dec.get(), iter, a, (UInt8)0 ); else if ( pixeltype == "INT16" ) read_band( dec.get(), iter, a, Int16() ); else if ( pixeltype == "UINT16" ) read_band( dec.get(), iter, a, (UInt16)0 ); else if ( pixeltype == "INT32" ) read_band( dec.get(), iter, a, Int32() ); else if ( pixeltype == "UINT32" ) read_band( dec.get(), iter, a, (UInt32)0 ); else if ( pixeltype == "FLOAT" ) read_band( dec.get(), iter, a, float() ); else if ( pixeltype == "DOUBLE" ) read_band( dec.get(), iter, a, double() ); else vigra::throw_precondition_error((false), "invalid pixeltype"); dec->close(); } template < class ImageIterator, class Accessor > void importImage( const ImageImportInfo & info, ImageIterator iter, Accessor a, VigraFalseType ) { importVectorImage( info, iter, a ); } template < class ImageIterator, class Accessor > void importImage( const ImageImportInfo & info, ImageIterator iter, Accessor a, VigraTrueType ) { importScalarImage( info, iter, a ); } # 405 "../include/vigra/impex.hxx" template < class ImageIterator, class Accessor > void importImage( const ImageImportInfo & info, ImageIterator iter, Accessor a ) { typedef typename NumericTraits::isScalar is_scalar; importImage( info, iter, a, is_scalar() ); } template < class ImageIterator, class Accessor > void importImage( const ImageImportInfo & info, pair< ImageIterator, Accessor > dest ) { importImage( info, dest.first, dest.second ); } # 438 "../include/vigra/impex.hxx" template< class ImageIterator, class Accessor, class DstValueType > void write_bands( Encoder * enc, ImageIterator ul, ImageIterator lr, Accessor a, DstValueType) { typedef unsigned int size_type; typedef typename ImageIterator::row_iterator SrcRowIterator; typedef typename Accessor::value_type AccessorValueType; typedef typename AccessorValueType::value_type SrcValueType; const size_type width = lr.x - ul.x; const size_type height = lr.y - ul.y; enc->setWidth(width); enc->setHeight(height); const size_type num_bands = a.size(ul); enc->setNumBands(num_bands); enc->finalizeSettings(); DstValueType * scanline; ImageIterator ys(ul); SrcRowIterator xs = ys.rowIterator(); if (num_bands == 4) { unsigned int offset = enc->getOffset(); DstValueType * scanline0; DstValueType * scanline1; DstValueType * scanline2; DstValueType * scanline3; for( size_type y = 0; y < height; ++y, ++ys.y ) { xs = ys.rowIterator(); scanline0 = static_cast< DstValueType * > (enc->currentScanlineOfBand(0)); scanline1 = static_cast< DstValueType * > (enc->currentScanlineOfBand(1)); scanline2 = static_cast< DstValueType * > (enc->currentScanlineOfBand(2)); scanline3 = static_cast< DstValueType * > (enc->currentScanlineOfBand(3)); for( size_type x = 0; x < width; ++x, ++xs) { *scanline0 = detail::RequiresExplicitCast::cast(a.getComponent( xs, 0)); *scanline1 = detail::RequiresExplicitCast::cast(a.getComponent( xs, 1)); *scanline2 = detail::RequiresExplicitCast::cast(a.getComponent( xs, 2)); *scanline3 = detail::RequiresExplicitCast::cast(a.getComponent( xs, 3)); scanline0 += offset; scanline1 += offset; scanline2 += offset; scanline3 += offset; } enc->nextScanline(); } } else { for( size_type y = 0; y < height; ++y, ++ys.y ) { for( size_type b = 0; b < num_bands; ++b ) { xs = ys.rowIterator(); scanline = static_cast< DstValueType * > (enc->currentScanlineOfBand(b)); for( size_type x = 0; x < width; ++x, ++xs ) { *scanline = detail::RequiresExplicitCast::cast(a.getComponent( xs, b )); scanline += enc->getOffset(); } } enc->nextScanline(); } } } template< class MArray, class DstValueType > void write_bands( Encoder * enc, MArray const & array, DstValueType) { typedef unsigned int size_type; const size_type width = array.shape(0); const size_type height = array.shape(1); enc->setWidth(width); enc->setHeight(height); const size_type num_bands = array.shape(2); enc->setNumBands(num_bands); enc->finalizeSettings(); DstValueType * scanline; for( size_type y = 0; y < height; ++y ) { for( size_type b = 0; b < num_bands; ++b ) { scanline = static_cast< DstValueType * > (enc->currentScanlineOfBand(b)); for( size_type x = 0; x < width; ++x) { *scanline = array(x, y, b); scanline += enc->getOffset(); } } enc->nextScanline(); } } # 565 "../include/vigra/impex.hxx" template< class ImageIterator, class Accessor, class DstValueType > void write_band( Encoder * enc, ImageIterator ul, ImageIterator lr, Accessor a, DstValueType) { typedef unsigned int size_type; typedef typename ImageIterator::row_iterator SrcRowIterator; typedef typename Accessor::value_type SrcValueType; const size_type width = lr.x - ul.x; const size_type height = lr.y - ul.y; enc->setWidth(width); enc->setHeight(height); enc->setNumBands(1); enc->finalizeSettings(); DstValueType * scanline; ImageIterator ys(ul); SrcRowIterator xs = ys.rowIterator(); size_type y; for( y = 0; y < height; ++y, ++ys.y ) { xs = ys.rowIterator(); scanline = static_cast< DstValueType * >(enc->currentScanlineOfBand(0)); for( size_type x = 0; x < width; ++x, ++xs, ++scanline ) *scanline = detail::RequiresExplicitCast::cast(a(xs)); enc->nextScanline(); } } namespace detail { template < class SrcIterator, class SrcAccessor, class DestIterator, class DestAccessor > void mapScalarImageToLowerPixelType( SrcIterator sul, SrcIterator slr, SrcAccessor sget, DestIterator dul, DestAccessor dget ) { typedef typename SrcAccessor::value_type SrcValue; typedef typename DestAccessor::value_type DestValue; typedef typename NumericTraits::RealPromote PromoteValue; FindMinMax minmax; inspectImage( sul, slr, sget, minmax ); double scale = (double)NumericTraits::max() / (minmax.max - minmax.min) - (double)NumericTraits::min() / (minmax.max - minmax.min); double offset = (NumericTraits::min() / scale) - minmax.min ; transformImage( sul, slr, sget, dul, dget, linearIntensityTransform( scale, offset ) ); } template < class SrcIterator, class SrcAccessor, class T > void exportScalarImage(SrcIterator sul, SrcIterator slr, SrcAccessor sget, Encoder * enc, bool downcast, T zero) { if (!downcast) { write_band( enc, sul, slr, sget, zero ); } else { BasicImage image(slr-sul); mapScalarImageToLowerPixelType(sul, slr, sget, image.upperLeft(), image.accessor()); write_band( enc, image.upperLeft(), image.lowerRight(), image.accessor(), zero ); } } template < class SrcIterator, class SrcAccessor, class MArray> void mapVectorImageToLowerPixelType( SrcIterator sul, SrcIterator slr, SrcAccessor sget, MArray & array ) { typedef typename SrcAccessor::value_type SrcValue; typedef typename SrcValue::value_type SrcComponent; typedef typename MArray::value_type DestValue; FindMinMax minmax; for(unsigned int i=0; i band(i); inspectImage( sul, slr, band, minmax ); } double scale = (double)NumericTraits::max() / (minmax.max - minmax.min) - (double)NumericTraits::min() / (minmax.max - minmax.min); double offset = (NumericTraits::min() / scale) - minmax.min ; for(unsigned int i=0; i subImage = makeBasicImageView(array.bindOuter(i)); VectorComponentValueAccessor band(i); transformImage( sul, slr, band, subImage.upperLeft(), subImage.accessor(), linearIntensityTransform( scale, offset ) ); } } template < class SrcIterator, class SrcAccessor, class T > void exportVectorImage(SrcIterator sul, SrcIterator slr, SrcAccessor sget, Encoder * enc, bool downcast, T zero) { int bands = sget.size(sul); vigra::throw_precondition_error((isBandNumberSupported(enc->getFileType(), bands)), "exportImage(): file format does not support requested number of bands (color channels)"); if ( !downcast ) { write_bands( enc, sul, slr, sget, zero ); } else { int w = slr.x - sul.x; int h = slr.y - sul.y; typedef vigra::MultiArray<3, T> MArray; MArray array(typename MArray::difference_type(w, h, bands)); mapVectorImageToLowerPixelType(sul, slr, sget, array); write_bands( enc, array, zero ); } } } # 711 "../include/vigra/impex.hxx" template < class SrcIterator, class SrcAccessor > void exportFloatingVectorImage( SrcIterator sul, SrcIterator slr, SrcAccessor sget, const ImageExportInfo & info ) { exportImage(sul, slr, sget, info); } # 733 "../include/vigra/impex.hxx" template < class SrcIterator, class SrcAccessor > void exportIntegralVectorImage( SrcIterator sul, SrcIterator slr, SrcAccessor sget, const ImageExportInfo & info ) { exportImage(sul, slr, sget, info); } # 755 "../include/vigra/impex.hxx" template < class SrcIterator, class SrcAccessor > void exportFloatingScalarImage( SrcIterator sul, SrcIterator slr, SrcAccessor sget, const ImageExportInfo & info ) { exportImage(sul, slr, sget, info); } # 777 "../include/vigra/impex.hxx" template < class SrcIterator, class SrcAccessor > void exportIntegralScalarImage( SrcIterator sul, SrcIterator slr, SrcAccessor sget, const ImageExportInfo & info ) { exportImage(sul, slr, sget, info); } template < class SrcIterator, class SrcAccessor > void exportImage( SrcIterator sul, SrcIterator slr, SrcAccessor sget, const ImageExportInfo & info, VigraFalseType ) { typedef typename SrcAccessor::value_type AccessorValueType; typedef typename AccessorValueType::value_type SrcValueType; std::string pixeltype = info.getPixelType(); std::auto_ptr enc = encoder(info); bool downcast = negotiatePixelType(enc->getFileType(), TypeAsString::result(), pixeltype); enc->setPixelType(pixeltype); if(pixeltype == "UINT8") detail::exportVectorImage( sul, slr, sget, enc.get(), downcast, (UInt8)0); else if(pixeltype == "INT16") detail::exportVectorImage( sul, slr, sget, enc.get(), downcast, Int16()); else if(pixeltype == "UINT16") detail::exportVectorImage( sul, slr, sget, enc.get(), downcast, (UInt16)0); else if(pixeltype == "INT32") detail::exportVectorImage( sul, slr, sget, enc.get(), downcast, Int32()); else if(pixeltype == "UINT32") detail::exportVectorImage( sul, slr, sget, enc.get(), downcast, (UInt32)0); else if(pixeltype == "FLOAT") detail::exportVectorImage( sul, slr, sget, enc.get(), downcast, float()); else if(pixeltype == "DOUBLE") detail::exportVectorImage( sul, slr, sget, enc.get(), downcast, double()); enc->close(); } template < class SrcIterator, class SrcAccessor > void exportImage( SrcIterator sul, SrcIterator slr, SrcAccessor sget, const ImageExportInfo & info, VigraTrueType ) { typedef typename SrcAccessor::value_type SrcValueType; std::string pixeltype = info.getPixelType(); std::auto_ptr enc = encoder(info); bool downcast = negotiatePixelType(enc->getFileType(), TypeAsString::result(), pixeltype); enc->setPixelType(pixeltype); if(pixeltype == "UINT8") detail::exportScalarImage( sul, slr, sget, enc.get(), downcast, (UInt8)0); else if(pixeltype == "INT16") detail::exportScalarImage( sul, slr, sget, enc.get(), downcast, Int16()); else if(pixeltype == "UINT16") detail::exportScalarImage( sul, slr, sget, enc.get(), downcast, (UInt16)0); else if(pixeltype == "INT32") detail::exportScalarImage( sul, slr, sget, enc.get(), downcast, Int32()); else if(pixeltype == "UINT32") detail::exportScalarImage( sul, slr, sget, enc.get(), downcast, (UInt32)0); else if(pixeltype == "FLOAT") detail::exportScalarImage( sul, slr, sget, enc.get(), downcast, float()); else if(pixeltype == "DOUBLE") detail::exportScalarImage( sul, slr, sget, enc.get(), downcast, double()); enc->close(); } # 927 "../include/vigra/impex.hxx" template < class SrcIterator, class SrcAccessor > inline void exportImage( SrcIterator sul, SrcIterator slr, SrcAccessor sget, const ImageExportInfo & info ) { typedef typename NumericTraits::isScalar is_scalar; try { exportImage( sul, slr, sget, info, is_scalar() ); } catch(Encoder::TIFFCompressionException &) { const_cast(info).setCompression(""); exportImage( sul, slr, sget, info, is_scalar() ); } } template < class SrcIterator, class SrcAccessor > inline void exportImage( triple src, const ImageExportInfo & info ) { exportImage( src.first, src.second, src.third, info ); } } # 40 "assemble.h" 2 # 1 "../include/vigra/inspectimage.hxx" 1 # 41 "assemble.h" 2 # 1 "../include/vigra/transformimage.hxx" 1 # 43 "assemble.h" 2 # 1 "../include/vigra_ext/FunctorAccessor.h" 1 # 27 "../include/vigra_ext/FunctorAccessor.h" # 1 "../include/vigra/numerictraits.hxx" 1 # 28 "../include/vigra_ext/FunctorAccessor.h" 2 namespace vigra_ext { # 40 "../include/vigra_ext/FunctorAccessor.h" template class ReadFunctorAccessor { public: typedef typename Functor::result_type value_type; ReadFunctorAccessor(Functor f, Accessor a) : m_f(f), m_a(a) { } # 57 "../include/vigra_ext/FunctorAccessor.h" template typename Functor::result_type operator()(ITERATOR_ const & i, DIFFERENCE_ d) const { return m_f(m_a(i,d)); } template typename Functor::result_type operator()(ITERATOR const & i) const { return m_f(m_a(i)); } protected: Functor m_f; Accessor m_a; }; # 83 "../include/vigra_ext/FunctorAccessor.h" template class WriteFunctorAccessor { public: typedef typename Functor::result_type value_type; WriteFunctorAccessor(Functor f, Accessor a) : m_f(f), m_a(a) { } template void set(Value const & v, ITERATOR const & i) const { m_a.set(m_f(vigra::detail::RequiresExplicitCast::cast(v)), i); } template void set(Value const & v, ITERATOR_ const & i, DIFFERENCE_ d) const { m_a.set(m_f(vigra::detail::RequiresExplicitCast::cast(v)),i,d); } Functor m_f; Accessor m_a; }; # 142 "../include/vigra_ext/FunctorAccessor.h" template class SplitVector2Accessor { public: typedef vigra::TinyVector value_type; typedef typename value_type::value_type component_type; SplitVector2Accessor(Iter1 i1, Acc1 a1, Iter2 i2, Acc2 a2) : i1_(i1), a1_(a1), i2_(i2), a2_(a2) {} template void setComponent( V const & value, ITERATOR const & i, int idx ) const { switch (idx) { case 0: a1_.set(value, i1_, *i); break; case 1: a2_.set(value, i2_, *i); break; default: throw std::runtime_error("too many components in input value"); } } template unsigned int size(ITERATOR const & i) const { return 2; } Iter1 i1_; Acc1 a1_; Iter2 i2_; Acc2 a2_; }; # 196 "../include/vigra_ext/FunctorAccessor.h" template class SplitVectorNAccessor { public: typedef vigra::TinyVector value_type; typedef typename value_type::value_type component_type; SplitVectorNAccessor(Iter1 i1, Acc1 a1, Iter2 i2, Acc2 a2) : i1_(i1), a1_(a1), i2_(i2), a2_(a2) {} template void setComponent( V const & value, ITERATOR const & i, int idx ) const { if ( idx < SIZE - 1 ) { a1_.setComponent(value, i1_, *i, idx); } else if ( idx == SIZE - 1 ) { a2_.set(value, i2_, *i); } else { throw std::runtime_error("too many components in input value"); } } template unsigned int size(ITERATOR const & i) const { return SIZE; } Iter1 i1_; Acc1 a1_; Iter2 i2_; Acc2 a2_; }; template class MergeScalarScalar2VectorAccessor { public: typedef vigra::TinyVector value_type; typedef typename value_type::value_type component_type; MergeScalarScalar2VectorAccessor(Iter1 i1, Acc1 a1, Iter2 i2, Acc2 a2) : i1_(i1), a1_(a1), i2_(i2), a2_(a2) {} template value_type operator()(DIFFERENCE_ const & d) const { return value_type(a1_(i1_, d), a2_(i2_, d)); } template component_type getComponent(ITERATOR const & i, int idx) const { switch (idx) { case 0: return a1_( i1_, *i ); case 1: return a2_( i2_, *i ); default: throw std::runtime_error("too many components in input value"); exit(1); } } template component_type const & getComponent(ITERATOR const & i, DIFFERENCE_ const & d, int idx) const { i += d; switch (idx) { case 0: return a1_.getComponent(i1_, *i, idx); case 1: return a2_.getComponent(i2_, *i, idx); default: throw std::runtime_error("too many components in input value"); } } template unsigned int size(ITERATOR const & i) const { return 2; } Iter1 i1_; Acc1 a1_; Iter2 i2_; Acc2 a2_; }; # 318 "../include/vigra_ext/FunctorAccessor.h" template class MergeVectorScalar2VectorAccessor { public: typedef typename Acc1::value_type image1_type; typedef typename Acc2::value_type image2_type; typedef typename image1_type::value_type component_type; typedef vigra::TinyVector value_type; MergeVectorScalar2VectorAccessor(Iter1 i1, Acc1 a1, Iter2 i2, Acc2 a2) : i1_(i1), a1_(a1), i2_(i2), a2_(a2) {} template value_type operator()(DIFFERENCE_ const & d) const { value_type ret; typename value_type::iterator it = ret.begin(); const image1_type & i1 = a1_(i1_, d); for ( typename image1_type::const_iterator it1 = i1.begin(); it1 != i1.end(); ++it1 ) { *it = *it1; it++; } *it = a2_(i2_, d); return ret; } template component_type getComponent(ITERATOR const & i, int idx) const { if ( idx < SIZE - 1 ) { return a1_.getComponent(i1_, *i, idx); } else if ( idx == SIZE - 1 ) { return a2_(i2_, *i); } else { throw std::runtime_error("too many components in input value"); throw 0; } } template component_type const getComponent(ITERATOR i, DIFFERENCE_ const & d, int idx) const { i += d; if ( idx < SIZE - 1 ) { return a1_.getComponent(i1_, *i, idx); } else if ( idx == SIZE - 1 ) { return a2_(i2_, *i); } else { throw std::runtime_error("too many components in input value"); throw 0; } } template unsigned int size(ITERATOR const & i) const { return SIZE; } Iter1 i1_; Acc1 a1_; Iter2 i2_; Acc2 a2_; }; # 437 "../include/vigra_ext/FunctorAccessor.h" template class ImageSplittingAccessor { public: typedef typename Acc1::value_type image_type1; typedef typename Acc2::value_type image_type2; ImageSplittingAccessor(Iter1 i1, Acc1 a1, Iter2 i2, Acc2 a2) : i1_(i1), a1_(a1), i2_(i2), a2_(a2) {} template void setComponent(V const & value, ITERATOR const & i, int idx) const { setComponentIsScalar(value, i, idx, vigra::NumericTraits::isScalar() ); } # 525 "../include/vigra_ext/FunctorAccessor.h" protected: template void setComponentIsScalar(V const & value, ITERATOR const & i, int idx, vigra::VigraTrueType) const { setComponentScalarIsScalar(value, i, idx, vigra::NumericTraits::isScalar() ); } template void setComponentIsScalar(V const & value, ITERATOR const & i, int idx, vigra::VigraFalseType) const { setComponentVectorIsScalar(value, i, idx, vigra::NumericTraits::isScalar() ); } template void setComponentScalarIsScalar(V const & value, ITERATOR const & i, int idx, vigra::VigraTrueType) const { switch (idx) { case 0: a1_.set(value, i); break; case 1: a2_.set(value, i2_, i - i1_); break; default: throw std::runtime_error("too many components in input value"); } } template void setComponentScalarIsVector(V const & value, ITERATOR const & i, int idx, vigra::VigraTrueType) const { throw std::runtime_error("vector -> scalar, vector accessor not implemented"); } template void setComponentVectorIsScalar(V const & value, ITERATOR const & i, int idx, vigra::VigraTrueType) const { image_type1 & v1 = a1_(i); typename image_type1::size_type s1 = v1.size(); if (idx < s1) { a1_.setComponent(value, i, idx); } else if ( idx == s1) { a2_.set(value, i2_, i - i1_); } else { throw std::runtime_error("too many components in input value"); } } template void setComponentVectorIsVector(V const & value, ITERATOR const & i, int idx, vigra::VigraTrueType) const { throw std::runtime_error("vector -> vector, vector accessor not implemented"); } Iter1 i1_; Acc1 a1_; Iter2 i2_; Acc2 a2_; }; template struct Multiply { typedef T result_type; Multiply(T factor) : m_factor(factor) {} template PixelType operator()(PixelType const& v) const { return vigra::NumericTraits::fromRealPromote(v * m_factor); } T m_factor; }; } # 44 "assemble.h" 2 # 1 "../include/vigra_ext/impexalpha.hxx" 1 # 33 "../include/vigra_ext/impexalpha.hxx" # 1 "../include/vigra/imageiterator.hxx" 1 # 34 "../include/vigra_ext/impexalpha.hxx" 2 # 1 "../include/vigra/transformimage.hxx" 1 # 35 "../include/vigra_ext/impexalpha.hxx" 2 # 1 "../include/vigra/initimage.hxx" 1 # 36 "../include/vigra_ext/impexalpha.hxx" 2 # 1 "../include/vigra/impex.hxx" 1 # 39 "../include/vigra_ext/impexalpha.hxx" 2 namespace vigra { template struct GetMaskTrue; # 68 "../include/vigra_ext/impexalpha.hxx" template<> struct GetMaskTrue { static vigra::UInt8 get() { return vigra::NumericTraits::max(); } }; template<> struct GetMaskTrue { static vigra::Int16 get() { return vigra::NumericTraits::max(); } }; template<> struct GetMaskTrue { static vigra::UInt16 get() { return vigra::NumericTraits::max(); } }; template<> struct GetMaskTrue { static vigra::Int32 get() { return vigra::NumericTraits::max(); } }; template<> struct GetMaskTrue { static vigra::UInt32 get() { return vigra::NumericTraits::max(); } }; template<> struct GetMaskTrue { static float get() { return 1.0f; } }; template<> struct GetMaskTrue { static double get() { return 1.0; } }; template class MultiImageMaskAccessor2 { public: typedef vigra::TinyVector value_type; typedef typename Acc1::value_type component_type; typedef typename Acc2::value_type alpha_type; MultiImageMaskAccessor2(Iter1 i1, Acc1 a1, Iter2 i2, Acc2 a2) : i1_(i1), a1_(a1), i2_(i2), a2_(a2) {} template value_type operator()(DIFFERENCE const & d) const { return value_type(a1_(i1_, d), a2_(i2_, d)); } template value_type operator()(DIFFERENCE1 d, DIFFERENCE2 const & d2) const { d += d2; return value_type(a1_(i1_, d), a2_(i2_, d)); } template value_type set(const value_type & vt, DIFFERENCE const & d) const { a1_.set(vt[0], i1_, d); a2_.set(vt[1], i2_, d); } template void setComponent( V const & value, ITERATOR const & i, int idx ) const { switch (idx) { case 0: a1_.set(value, i1_, *i); break; case 1: a2_.set(value, i2_, *i); break; default: throw std::runtime_error("too many components in input value"); } } template component_type getComponent(ITERATOR const & i, int idx) const { switch (idx) { case 0: return a1_( i1_, *i ); case 1: return a2_( i2_, *i ); default: throw std::runtime_error("too many components in input value"); exit(1); } } template unsigned int size ( ITERATOR const & i ) const { return 2; } private: Iter1 i1_; Acc1 a1_; Iter2 i2_; Acc2 a2_; }; template class MultiImageVectorMaskAccessor4 { public: typedef typename Acc1::value_type VT1; enum { static_size = 4 }; typedef vigra::TinyVector value_type; typedef typename value_type::value_type component_type; typedef typename Acc2::value_type alpha_type; MultiImageVectorMaskAccessor4(Iter1 i1, Acc1 a1, Iter2 i2, Acc2 a2) : i1_(i1), a1_(a1), i2_(i2), a2_(a2) {} template value_type operator()(DIFFERENCE const & d) const { const VT1 & v1 = a1_.get(i1_,d); return value_type(v1[0], v1[1], v1[2], a2_(i2_, d)); } template value_type operator()(DIFFERENCE1 d, DIFFERENCE2 const & d2) const { d += d2; const VT1 & v1 = a1_.get(i1_,d); return value_type(v1[0], v1[1], v1[2], a2_(i2_, d)); } template value_type set(const value_type & vt, DIFFERENCE const & d) const { Iter1 i1(i1_); i1 +=d; a1_.setComponent(vt[0], i1_, 0); a1_.setComponent(vt[1], i1_, 1); a1_.setComponent(vt[2], i1_, 2); a2_.set(vt[3], i2_, d); } template void setComponent( V const & value, ITERATOR const & i, int idx ) const { if ( idx < static_size - 1 ) { a1_.setComponent(value, i1_, *i, idx); } else if ( idx == static_size - 1 ) { a2_.set(value, i2_, *i); } else { throw std::runtime_error("too many components in input value"); } } template component_type getComponent(ITERATOR const & i, int idx) const { if ( idx < static_size - 1 ) { return a1_.getComponent(i1_, *i, idx); } else return a2_(i2_, *i); # 274 "../include/vigra_ext/impexalpha.hxx" } template unsigned int size ( ITERATOR const & i ) const { return static_size; } private: Iter1 i1_; Acc1 a1_; Iter2 i2_; Acc2 a2_; }; template void exportImageAlpha(vigra::triple image, std::pair alpha, vigra::ImageExportInfo const & info, vigra::VigraTrueType) { typedef MultiImageMaskAccessor2 MAcc; exportImage(vigra::CoordinateIterator(), vigra::CoordinateIterator() + (image.second - image.first), MAcc(image.first, image.third, alpha.first, alpha.second), info); } template void exportImageAlpha(vigra::triple image, std::pair alpha, vigra::ImageExportInfo const & info, vigra::VigraFalseType) { typedef MultiImageVectorMaskAccessor4 MAcc; exportImage(vigra::CoordinateIterator(), vigra::CoordinateIterator(image.second - image.first), MAcc(image.first, image.third, alpha.first, alpha.second), info ); } # 330 "../include/vigra_ext/impexalpha.hxx" template void exportImageAlpha(vigra::triple image, std::pair alpha, vigra::ImageExportInfo const & info) { typedef typename vigra::NumericTraits::isScalar is_scalar; exportImageAlpha( image, alpha, info, is_scalar()); } template void importImageAlpha(vigra::ImageImportInfo const & info, std::pair image, std::pair alpha, vigra::VigraFalseType) { vigra::throw_precondition_error((image.second(image.first).size() == 3), "only scalar and 3 channel (vector) images supported by impexalpha.hxx"); typedef MultiImageVectorMaskAccessor4 MAcc; importImage(info, vigra::CoordinateIterator(), MAcc(image.first, image.second, alpha.first, alpha.second) ); } template void importImageAlpha(vigra::ImageImportInfo const & info, std::pair image, std::pair alpha, vigra::VigraTrueType) { typedef MultiImageMaskAccessor2 MAcc; importImage(info, vigra::CoordinateIterator(), MAcc(image.first, image.second, alpha.first, alpha.second) ); } # 388 "../include/vigra_ext/impexalpha.hxx" template void importImageAlpha(vigra::ImageImportInfo const & info, vigra::pair image, std::pair alpha ) { typedef typename vigra::NumericTraits::isScalar is_scalar; if (info.numExtraBands() == 1 ) { importImageAlpha(info, image, alpha, is_scalar()); } else if (info.numExtraBands() == 0 ) { importImage(info, image); vigra::initImage(alpha.first , alpha.first + vigra::Diff2D(info.width(), info.height()), alpha.second, 255); } else { throw std::runtime_error("Images with two or more alpha channel are not supported"); } } } # 45 "assemble.h" 2 using std::cerr; using std::cout; using std::endl; using std::list; using std::pair; using vigra::copyImageIf; using vigra::Diff2D; using vigra::exportImageAlpha; using vigra::FindBoundingRectangle; using vigra::ImageExportInfo; using vigra::ImageImportInfo; using vigra::importImageAlpha; using vigra::inspectImageIf; using vigra::NumericTraits; using vigra::Rect2D; using vigra::Threshold; using vigra::transformImage; using vigra_ext::ReadFunctorAccessor; using vigra_ext::WriteFunctorAccessor; namespace enblend { template void checkpoint(pair &p, ImageExportInfo &outputImageInfo) { typedef typename ImageType::PixelType ImagePixelType; typedef typename EnblendNumericTraits::ImagePixelComponentType ImagePixelComponentType; typedef typename AlphaType::Accessor AlphaAccessor; typedef typename AlphaType::PixelType AlphaPixelType; typedef ReadFunctorAccessor< Threshold, AlphaAccessor> ThresholdingAccessor; ThresholdingAccessor ata( Threshold( NumericTraits::zero(), NumericTraits::zero(), NumericTraits::max(), NumericTraits::zero() ), (p.second)->accessor()); exportImageAlpha(srcImageRange(*(p.first)), srcIter((p.second)->upperLeft(), ata), outputImageInfo); }; template void import(const ImageImportInfo &info, const pair &image, const pair &alpha) { typedef typename DestIterator::PixelType ImagePixelType; typedef typename EnblendNumericTraits::ImagePixelComponentType ImagePixelComponentType; typedef typename AlphaIterator::PixelType AlphaPixelType; typedef WriteFunctorAccessor< Threshold, AlphaAccessor> ThresholdingAccessor; ThresholdingAccessor ata( Threshold( NumericTraits::max() / 2, NumericTraits::max(), NumericTraits::zero(), NumericTraits::max() ), alpha.second); importImageAlpha(info, image, destIter(alpha.first, ata)); }; template pair assemble(list &imageInfoList, Rect2D &inputUnion, Rect2D &bb) { typedef typename AlphaType::traverser AlphaIteratorType; typedef typename AlphaType::Accessor AlphaAccessor; if (imageInfoList.empty()) return pair(__null, __null); ImageType *image = new ImageType(inputUnion.size()); AlphaType *imageA = new AlphaType(inputUnion.size()); if (Verbose > 0) { if (OneAtATime) { cout << "Loading next image: " << imageInfoList.front()->getFileName() << endl; } else { cout << "Combining non-overlapping images: " << imageInfoList.front()->getFileName(); cout.flush(); } } Diff2D imagePos = imageInfoList.front()->getPosition(); import(*imageInfoList.front(), destIter(image->upperLeft() + imagePos - inputUnion.upperLeft()), destIter(imageA->upperLeft() + imagePos - inputUnion.upperLeft())); imageInfoList.erase(imageInfoList.begin()); if (!OneAtATime) { list::iterator> toBeRemoved; list::iterator i; for (i = imageInfoList.begin(); i != imageInfoList.end(); i++) { ImageImportInfo *info = *i; ImageType *src = new ImageType(info->size()); AlphaType *srcA = new AlphaType(info->size()); import(*info, destImage(*src), destImage(*srcA)); bool overlapFound = false; AlphaIteratorType dy = imageA->upperLeft() - inputUnion.upperLeft() + info->getPosition(); AlphaAccessor da = imageA->accessor(); AlphaIteratorType sy = srcA->upperLeft(); AlphaIteratorType send = srcA->lowerRight(); AlphaAccessor sa = srcA->accessor(); for(; sy.y < send.y; ++sy.y, ++dy.y) { AlphaIteratorType sx = sy; AlphaIteratorType dx = dy; for(; sx.x < send.x; ++sx.x, ++dx.x) { if (sa(sx) && da(dx)) { overlapFound = true; break; } } if (overlapFound) break; } if (!overlapFound) { if (Verbose > 0) { cout << " " << info->getFileName(); cout.flush(); } Diff2D srcPos = info->getPosition(); copyImageIf(srcImageRange(*src), maskImage(*srcA), destIter(image->upperLeft() - inputUnion.upperLeft() + srcPos)); copyImageIf(srcImageRange(*srcA), maskImage(*srcA), destIter(imageA->upperLeft() - inputUnion.upperLeft() + srcPos)); toBeRemoved.push_back(i); } delete src; delete srcA; } list::iterator>::iterator r; for (r = toBeRemoved.begin(); r != toBeRemoved.end(); r++) { imageInfoList.erase(*r); } } if (Verbose > 0 && !OneAtATime) cout << endl; FindBoundingRectangle unionRect; inspectImageIf(srcIterRange(Diff2D(), Diff2D() + image->size()), srcImage(*imageA), unionRect); bb = unionRect(); if (Verbose > 1) { cout << "assembled images bounding box: " << unionRect() << endl; } return pair(image, imageA); }; } # 37 "enblend.h" 2 # 1 "blend.h" 1 # 24 "blend.h" # 1 "../config.h" 1 # 25 "blend.h" 2 # 1 "../include/vigra/combineimages.hxx" 1 # 46 "../include/vigra/combineimages.hxx" namespace vigra { # 61 "../include/vigra/combineimages.hxx" template void combineTwoLines(SrcIterator1 s1, SrcIterator1 s1end, SrcAccessor1 src1, SrcIterator2 s2, SrcAccessor2 src2, DestIterator d, DestAccessor dest, Functor const & f) { for(; s1 != s1end; ++s1, ++s2, ++d) dest.set(f(src1(s1), src2(s2)), d); } template void combineTwoLinesIf(SrcIterator1 s1, SrcIterator1 s1end, SrcAccessor1 src1, SrcIterator2 s2, SrcAccessor2 src2, MaskIterator m, MaskAccessor mask, DestIterator d, DestAccessor dest, Functor const & f) { for(; s1 != s1end; ++s1, ++s2, ++m, ++d) if(mask(m)) dest.set(f(src1(s1), src2(s2)), d); } template void combineThreeLines(SrcIterator1 s1, SrcIterator1 s1end, SrcAccessor1 src1, SrcIterator2 s2, SrcAccessor2 src2, SrcIterator3 s3, SrcAccessor3 src3, DestIterator d, DestAccessor dest, Functor const & f) { for(; s1 != s1end; ++s1, ++s2, ++s3, ++d) dest.set(f(src1(s1), src2(s2), src3(s3)), d); } # 202 "../include/vigra/combineimages.hxx" template void combineTwoImages(SrcImageIterator1 src1_upperleft, SrcImageIterator1 src1_lowerright, SrcAccessor1 sa1, SrcImageIterator2 src2_upperleft, SrcAccessor2 sa2, DestImageIterator dest_upperleft, DestAccessor da, Functor const & f) { int w = src1_lowerright.x - src1_upperleft.x; for(; src1_upperleft.y < src1_lowerright.y; ++src1_upperleft.y, ++src2_upperleft.y, ++dest_upperleft.y) { combineTwoLines(src1_upperleft.rowIterator(), src1_upperleft.rowIterator() + w, sa1, src2_upperleft.rowIterator(), sa2, dest_upperleft.rowIterator(), da, f); } } template inline void combineTwoImages(triple src1, pair src2, pair dest, Functor const & f) { combineTwoImages(src1.first, src1.second, src1.third, src2.first, src2.second, dest.first, dest.second, f); } # 346 "../include/vigra/combineimages.hxx" template void combineTwoImagesIf(SrcImageIterator1 src1_upperleft, SrcImageIterator1 src1_lowerright, SrcAccessor1 sa1, SrcImageIterator2 src2_upperleft, SrcAccessor2 sa2, MaskImageIterator mask_upperleft, MaskAccessor ma, DestImageIterator dest_upperleft, DestAccessor da, Functor const & f) { int w = src1_lowerright.x - src1_upperleft.x; for(; src1_upperleft.y < src1_lowerright.y; ++src1_upperleft.y, ++src2_upperleft.y, ++dest_upperleft.y, ++mask_upperleft.y) { combineTwoLinesIf(src1_upperleft.rowIterator(), src1_upperleft.rowIterator() + w, sa1, src2_upperleft.rowIterator(), sa2, mask_upperleft.rowIterator(), ma, dest_upperleft.rowIterator(), da, f); } } template inline void combineTwoImagesIf(triple src1, pair src2, pair mask, pair dest, Functor const & f) { combineTwoImagesIf(src1.first, src1.second, src1.third, src2.first, src2.second, mask.first, mask.second, dest.first, dest.second, f); } # 487 "../include/vigra/combineimages.hxx" template void combineThreeImages(SrcImageIterator1 src1_upperleft, SrcImageIterator1 src1_lowerright, SrcAccessor1 sa1, SrcImageIterator2 src2_upperleft, SrcAccessor2 sa2, SrcImageIterator3 src3_upperleft, SrcAccessor3 sa3, DestImageIterator dest_upperleft, DestAccessor da, Functor const & f) { int w = src1_lowerright.x - src1_upperleft.x; for(; src1_upperleft.y < src1_lowerright.y; ++src1_upperleft.y, ++src2_upperleft.y, ++src3_upperleft.y, ++dest_upperleft.y) { combineThreeLines(src1_upperleft.rowIterator(), src1_upperleft.rowIterator() + w, sa1, src2_upperleft.rowIterator(), sa2, src3_upperleft.rowIterator(), sa3, dest_upperleft.rowIterator(), da, f); } } template inline void combineThreeImages(triple src1, pair src2, pair src3, pair dest, Functor const & f) { combineThreeImages(src1.first, src1.second, src1.third, src2.first, src2.second, src3.first, src3.second, dest.first, dest.second, f); } # 558 "../include/vigra/combineimages.hxx" template class MagnitudeFunctor { public: typedef ValueType first_argument_type; typedef ValueType second_argument_type; typedef typename NumericTraits::RealPromote result_type; typedef ValueType value_type; result_type operator()(first_argument_type const & v1, second_argument_type const & v2) const { return std::sqrt(v1*v1 + v2*v2); } }; template class FunctorTraits > : public FunctorTraitsBase > { public: typedef VigraTrueType isBinaryFunctor; }; # 609 "../include/vigra/combineimages.hxx" template class RGBGradientMagnitudeFunctor { public: typedef RGBValue first_argument_type; typedef RGBValue second_argument_type; typedef typename NumericTraits::RealPromote result_type; typedef ValueType value_type; # 640 "../include/vigra/combineimages.hxx" result_type operator()(first_argument_type const & gx, second_argument_type const & gy) const { return std::sqrt(gx.red()*gx.red() + gx.green()*gx.green() + gx.blue()*gx.blue() + gy.red()*gy.red() + gy.green()*gy.green() + gy.blue()*gy.blue()); } }; template class FunctorTraits > : public FunctorTraitsBase > { public: typedef VigraTrueType isBinaryFunctor; }; } # 30 "blend.h" 2 using std::cout; using std::vector; using vigra::combineThreeImages; using vigra::NumericTraits; # 54 "blend.h" namespace enblend { template class CartesianBlendFunctor { public: CartesianBlendFunctor(MaskPixelType w) : white(NumericTraits::toRealPromote(w)) {} template ImagePixelType operator()(const MaskPixelType &maskP, const ImagePixelType &wP, const ImagePixelType &bP) const { typedef typename NumericTraits::RealPromote RealImagePixelType; double whiteCoeff = NumericTraits::toRealPromote(maskP) / white; double blackCoeff = 1.0 - whiteCoeff; RealImagePixelType rwP = NumericTraits::toRealPromote(wP); RealImagePixelType rbP = NumericTraits::toRealPromote(bP); RealImagePixelType blendP = (whiteCoeff * rwP) + (blackCoeff * rbP); return NumericTraits::fromRealPromote(blendP); } protected: double white; }; # 118 "blend.h" template void blend(vector *maskGP, vector *whiteLP, vector *blackLP, typename MaskPyramidType::value_type maskPyramidWhiteValue) { if (Verbose > 0) { cout << "Blending layers: "; cout.flush(); } # 158 "blend.h" for (unsigned int layer = 0; layer < maskGP->size(); layer++) { if (Verbose > 0) { cout << " l" << layer; cout.flush(); } if (1) { combineThreeImages(srcImageRange(*((*maskGP)[layer])), srcImage(*((*whiteLP)[layer])), srcImage(*((*blackLP)[layer])), destImage(*((*blackLP)[layer])), CartesianBlendFunctor(maskPyramidWhiteValue)); continue; } # 259 "blend.h" } if (Verbose > 0) { cout << endl; } }; } # 38 "enblend.h" 2 # 1 "bounds.h" 1 # 24 "bounds.h" # 1 "../config.h" 1 # 25 "bounds.h" 2 # 1 "pyramid.h" 1 # 24 "pyramid.h" # 1 "../config.h" 1 # 25 "pyramid.h" 2 # 1 "../include/vigra/convolution.hxx" 1 # 42 "../include/vigra/convolution.hxx" # 1 "../include/vigra/stdconvolution.hxx" 1 # 43 "../include/vigra/stdconvolution.hxx" # 1 "../include/vigra/bordertreatment.hxx" 1 # 41 "../include/vigra/bordertreatment.hxx" namespace vigra { # 76 "../include/vigra/bordertreatment.hxx" enum BorderTreatmentMode { BORDER_TREATMENT_AVOID, BORDER_TREATMENT_CLIP, BORDER_TREATMENT_REPEAT, BORDER_TREATMENT_REFLECT, BORDER_TREATMENT_WRAP }; } # 44 "../include/vigra/stdconvolution.hxx" 2 # 1 "../include/vigra/separableconvolution.hxx" 1 # 46 "../include/vigra/separableconvolution.hxx" # 1 "../include/vigra/gaussians.hxx" 1 # 46 "../include/vigra/gaussians.hxx" namespace vigra { # 63 "../include/vigra/gaussians.hxx" template class Gaussian { public: typedef T value_type; typedef T argument_type; typedef T result_type; # 90 "../include/vigra/gaussians.hxx" explicit Gaussian(T sigma = 1.0, unsigned int derivativeOrder = 0) : sigma_(sigma), sigma2_(-0.5 / sigma / sigma), norm_(0.0), order_(derivativeOrder), hermitePolynomial_(derivativeOrder / 2 + 1) { vigra::throw_precondition_error((sigma_ > 0.0), "Gaussian::Gaussian(): sigma > 0 required."); switch(order_) { case 1: case 2: norm_ = -1.0 / (std::sqrt(2.0 * 3.14159265358979323846) * sq(sigma) * sigma); break; case 3: norm_ = 1.0 / (std::sqrt(2.0 * 3.14159265358979323846) * sq(sigma) * sq(sigma) * sigma); break; default: norm_ = 1.0 / std::sqrt(2.0 * 3.14159265358979323846) / sigma; } calculateHermitePolynomial(); } result_type operator()(argument_type x) const; value_type sigma() const { return sigma_; } unsigned int derivativeOrder() const { return order_; } double radius(double sigmaMultiple = 3.0) const { return std::ceil(sigma_ * (sigmaMultiple + 0.5 * derivativeOrder())); } private: void calculateHermitePolynomial(); T horner(T x) const; T sigma_, sigma2_, norm_; unsigned int order_; ArrayVector hermitePolynomial_; }; template typename Gaussian::result_type Gaussian::operator()(argument_type x) const { T x2 = x * x; T g = norm_ * std::exp(x2 * sigma2_); switch(order_) { case 0: return g; case 1: return x * g; case 2: return (1.0 - sq(x / sigma_)) * g; case 3: return (3.0 - sq(x / sigma_)) * x * g; default: return order_ % 2 == 0 ? g * horner(x2) : x * g * horner(x2); } } template T Gaussian::horner(T x) const { int i = order_ / 2; T res = hermitePolynomial_[i]; for(--i; i >= 0; --i) res = x * res + hermitePolynomial_[i]; return res; } template void Gaussian::calculateHermitePolynomial() { if(order_ == 0) { hermitePolynomial_[0] = 1.0; } else if(order_ == 1) { hermitePolynomial_[0] = -1.0 / sigma_ / sigma_; } else { # 203 "../include/vigra/gaussians.hxx" T s2 = -1.0 / sigma_ / sigma_; ArrayVector hn(3*order_+3, 0.0); typename ArrayVector::iterator hn0 = hn.begin(), hn1 = hn0 + order_+1, hn2 = hn1 + order_+1, ht; hn2[0] = 1.0; hn1[1] = s2; for(unsigned int i = 2; i <= order_; ++i) { hn0[0] = s2 * (i-1) * hn2[0]; for(unsigned int j = 1; j <= i; ++j) hn0[j] = s2 * (hn1[j-1] + (i-1) * hn2[j]); ht = hn2; hn2 = hn1; hn1 = hn0; hn0 = ht; } for(unsigned int i = 0; i < hermitePolynomial_.size(); ++i) hermitePolynomial_[i] = order_ % 2 == 0 ? hn1[2*i] : hn1[2*i+1]; } } } # 47 "../include/vigra/separableconvolution.hxx" 2 namespace vigra { template void internalConvolveLineWrap(SrcIterator is, SrcIterator iend, SrcAccessor sa, DestIterator id, DestAccessor da, KernelIterator kernel, KernelAccessor ka, int kleft, int kright) { int w = std::distance( is, iend ); typedef typename NumericTraits::RealPromote SumType; SrcIterator ibegin = is; for(int x=0; x::zero(); if(x < kright) { int x0 = x - kright; SrcIterator iss = iend + x0; for(; x0; ++x0, --ik, ++iss) { sum += ka(ik) * sa(iss); } iss = ibegin; SrcIterator isend = is + (1 - kleft); for(; iss != isend ; --ik, ++iss) { sum += ka(ik) * sa(iss); } } else if(w-x <= -kleft) { SrcIterator iss = is + (-kright); SrcIterator isend = iend; for(; iss != isend ; --ik, ++iss) { sum += ka(ik) * sa(iss); } int x0 = -kleft - w + x + 1; iss = ibegin; for(; x0; --x0, --ik, ++iss) { sum += ka(ik) * sa(iss); } } else { SrcIterator iss = is - kright; SrcIterator isend = is + (1 - kleft); for(; iss != isend ; --ik, ++iss) { sum += ka(ik) * sa(iss); } } da.set(NumericTraits::fromRealPromote(sum), id); } } template void internalConvolveLineClip(SrcIterator is, SrcIterator iend, SrcAccessor sa, DestIterator id, DestAccessor da, KernelIterator kernel, KernelAccessor ka, int kleft, int kright, Norm norm) { int w = std::distance( is, iend ); typedef typename NumericTraits::RealPromote SumType; SrcIterator ibegin = is; for(int x=0; x::zero(); if(x < kright) { int x0 = x - kright; Norm clipped = NumericTraits::zero(); for(; x0; ++x0, --ik) { clipped += ka(ik); } SrcIterator iss = ibegin; SrcIterator isend = is + (1 - kleft); for(; iss != isend ; --ik, ++iss) { sum += ka(ik) * sa(iss); } sum = norm / (norm - clipped) * sum; } else if(w-x <= -kleft) { SrcIterator iss = is + (-kright); SrcIterator isend = iend; for(; iss != isend ; --ik, ++iss) { sum += ka(ik) * sa(iss); } Norm clipped = NumericTraits::zero(); int x0 = -kleft - w + x + 1; for(; x0; --x0, --ik) { clipped += ka(ik); } sum = norm / (norm - clipped) * sum; } else { SrcIterator iss = is + (-kright); SrcIterator isend = is + (1 - kleft); for(; iss != isend ; --ik, ++iss) { sum += ka(ik) * sa(iss); } } da.set(NumericTraits::fromRealPromote(sum), id); } } template void internalConvolveLineReflect(SrcIterator is, SrcIterator iend, SrcAccessor sa, DestIterator id, DestAccessor da, KernelIterator kernel, KernelAccessor ka, int kleft, int kright) { int w = std::distance( is, iend ); typedef typename NumericTraits::RealPromote SumType; SrcIterator ibegin = is; for(int x=0; x::zero(); if(x < kright) { int x0 = x - kright; SrcIterator iss = ibegin - x0; for(; x0; ++x0, --ik, --iss) { sum += ka(ik) * sa(iss); } SrcIterator isend = is + (1 - kleft); for(; iss != isend ; --ik, ++iss) { sum += ka(ik) * sa(iss); } } else if(w-x <= -kleft) { SrcIterator iss = is + (-kright); SrcIterator isend = iend; for(; iss != isend ; --ik, ++iss) { sum += ka(ik) * sa(iss); } int x0 = -kleft - w + x + 1; iss = iend - 2; for(; x0; --x0, --ik, --iss) { sum += ka(ik) * sa(iss); } } else { SrcIterator iss = is + (-kright); SrcIterator isend = is + (1 - kleft); for(; iss != isend ; --ik, ++iss) { sum += ka(ik) * sa(iss); } } da.set(NumericTraits::fromRealPromote(sum), id); } } template void internalConvolveLineRepeat(SrcIterator is, SrcIterator iend, SrcAccessor sa, DestIterator id, DestAccessor da, KernelIterator kernel, KernelAccessor ka, int kleft, int kright) { int w = std::distance( is, iend ); typedef typename NumericTraits::RealPromote SumType; SrcIterator ibegin = is; for(int x=0; x::zero(); if(x < kright) { int x0 = x - kright; SrcIterator iss = ibegin; for(; x0; ++x0, --ik) { sum += ka(ik) * sa(iss); } SrcIterator isend = is + (1 - kleft); for(; iss != isend ; --ik, ++iss) { sum += ka(ik) * sa(iss); } } else if(w-x <= -kleft) { SrcIterator iss = is + (-kright); SrcIterator isend = iend; for(; iss != isend ; --ik, ++iss) { sum += ka(ik) * sa(iss); } int x0 = -kleft - w + x + 1; iss = iend - 1; for(; x0; --x0, --ik) { sum += ka(ik) * sa(iss); } } else { SrcIterator iss = is + (-kright); SrcIterator isend = is + (1 - kleft); for(; iss != isend ; --ik, ++iss) { sum += ka(ik) * sa(iss); } } da.set(NumericTraits::fromRealPromote(sum), id); } } template void internalConvolveLineAvoid(SrcIterator is, SrcIterator iend, SrcAccessor sa, DestIterator id, DestAccessor da, KernelIterator kernel, KernelAccessor ka, int kleft, int kright) { int w = std::distance( is, iend ); typedef typename NumericTraits::RealPromote SumType; is += kright; id += kright; for(int x=kright; x::zero(); SrcIterator iss = is + (-kright); SrcIterator isend = is + (1 - kleft); for(; iss != isend ; --ik, ++iss) { sum += ka(ik) * sa(iss); } da.set(NumericTraits::fromRealPromote(sum), id); } } # 531 "../include/vigra/separableconvolution.hxx" template void convolveLine(SrcIterator is, SrcIterator iend, SrcAccessor sa, DestIterator id, DestAccessor da, KernelIterator ik, KernelAccessor ka, int kleft, int kright, BorderTreatmentMode border) { typedef typename KernelAccessor::value_type KernelValue; vigra::throw_precondition_error((kleft <= 0), "convolveLine(): kleft must be <= 0.\n"); vigra::throw_precondition_error((kright >= 0), "convolveLine(): kright must be >= 0.\n"); int w = std::distance( is, iend ); vigra::throw_precondition_error((w >= kright - kleft + 1), "convolveLine(): kernel longer than line\n"); switch(border) { case BORDER_TREATMENT_WRAP: { internalConvolveLineWrap(is, iend, sa, id, da, ik, ka, kleft, kright); break; } case BORDER_TREATMENT_AVOID: { internalConvolveLineAvoid(is, iend, sa, id, da, ik, ka, kleft, kright); break; } case BORDER_TREATMENT_REFLECT: { internalConvolveLineReflect(is, iend, sa, id, da, ik, ka, kleft, kright); break; } case BORDER_TREATMENT_REPEAT: { internalConvolveLineRepeat(is, iend, sa, id, da, ik, ka, kleft, kright); break; } case BORDER_TREATMENT_CLIP: { typedef typename KernelAccessor::value_type KT; KT norm = NumericTraits::zero(); KernelIterator iik = ik + kleft; for(int i=kleft; i<=kright; ++i, ++iik) norm += ka(iik); vigra::throw_precondition_error((norm != NumericTraits::zero()), "convolveLine(): Norm of kernel must be != 0" " in mode BORDER_TREATMENT_CLIP.\n"); internalConvolveLineClip(is, iend, sa, id, da, ik, ka, kleft, kright, norm); break; } default: { vigra::throw_precondition_error((0), "convolveLine(): Unknown border treatment mode.\n"); } } } template inline void convolveLine(triple src, pair dest, tuple5 kernel) { convolveLine(src.first, src.second, src.third, dest.first, dest.second, kernel.first, kernel.second, kernel.third, kernel.fourth, kernel.fifth); } # 672 "../include/vigra/separableconvolution.hxx" template void separableConvolveX(SrcIterator supperleft, SrcIterator slowerright, SrcAccessor sa, DestIterator dupperleft, DestAccessor da, KernelIterator ik, KernelAccessor ka, int kleft, int kright, BorderTreatmentMode border) { typedef typename KernelAccessor::value_type KernelValue; vigra::throw_precondition_error((kleft <= 0), "separableConvolveX(): kleft must be <= 0.\n"); vigra::throw_precondition_error((kright >= 0), "separableConvolveX(): kright must be >= 0.\n"); int w = slowerright.x - supperleft.x; int h = slowerright.y - supperleft.y; vigra::throw_precondition_error((w >= kright - kleft + 1), "separableConvolveX(): kernel longer than line\n"); int y; for(y=0; y inline void separableConvolveX(triple src, pair dest, tuple5 kernel) { separableConvolveX(src.first, src.second, src.third, dest.first, dest.second, kernel.first, kernel.second, kernel.third, kernel.fourth, kernel.fifth); } # 783 "../include/vigra/separableconvolution.hxx" template void separableConvolveY(SrcIterator supperleft, SrcIterator slowerright, SrcAccessor sa, DestIterator dupperleft, DestAccessor da, KernelIterator ik, KernelAccessor ka, int kleft, int kright, BorderTreatmentMode border) { typedef typename KernelAccessor::value_type KernelValue; vigra::throw_precondition_error((kleft <= 0), "separableConvolveY(): kleft must be <= 0.\n"); vigra::throw_precondition_error((kright >= 0), "separableConvolveY(): kright must be >= 0.\n"); int w = slowerright.x - supperleft.x; int h = slowerright.y - supperleft.y; vigra::throw_precondition_error((h >= kright - kleft + 1), "separableConvolveY(): kernel longer than line\n"); int x; for(x=0; x inline void separableConvolveY(triple src, pair dest, tuple5 kernel) { separableConvolveY(src.first, src.second, src.third, dest.first, dest.second, kernel.first, kernel.second, kernel.third, kernel.fourth, kernel.fifth); } # 885 "../include/vigra/separableconvolution.hxx" template class Kernel1D { public: typedef ArrayVector InternalVector; typedef typename InternalVector::value_type value_type; typedef typename InternalVector::reference reference; typedef typename InternalVector::const_reference const_reference; typedef typename InternalVector::iterator Iterator; typedef typename InternalVector::iterator iterator; typedef typename InternalVector::const_iterator const_iterator; typedef StandardAccessor Accessor; typedef StandardConstAccessor ConstAccessor; struct InitProxy { InitProxy(Iterator i, int count, value_type & norm) : iter_(i), base_(i), count_(count), sum_(count), norm_(norm) {} ~InitProxy() { vigra::throw_precondition_error((count_ == 1 || count_ == sum_), "Kernel1D::initExplicitly(): " "Too few init values."); } InitProxy & operator,(value_type const & v) { if(sum_ == count_) norm_ = *iter_; norm_ += v; --count_; vigra::throw_precondition_error((count_ > 0), "Kernel1D::initExplicitly(): " "Too many init values."); ++iter_; *iter_ = v; return *this; } Iterator iter_, base_; int count_, sum_; value_type & norm_; }; static value_type one() { return NumericTraits::one(); } Kernel1D() : kernel_(), left_(0), right_(0), border_treatment_(BORDER_TREATMENT_CLIP), norm_(one()) { kernel_.push_back(norm_); } Kernel1D(Kernel1D const & k) : kernel_(k.kernel_), left_(k.left_), right_(k.right_), border_treatment_(k.border_treatment_), norm_(k.norm_) {} Kernel1D & operator=(Kernel1D const & k) { if(this != &k) { left_ = k.left_; right_ = k.right_; border_treatment_ = k.border_treatment_; norm_ = k.norm_; kernel_ = k.kernel_; } return *this; } # 1017 "../include/vigra/separableconvolution.hxx" InitProxy operator=(value_type const & v) { int size = right_ - left_ + 1; for(unsigned int i=0; i= 0), "Kernel1D::initExplicitly(): right border must be <= 0."); right_ = right; left_ = left; kernel_.resize(right - left + 1); return *this; } # 1260 "../include/vigra/separableconvolution.hxx" iterator center() { return kernel_.begin() - left(); } const_iterator center() const { return kernel_.begin() - left(); } # 1278 "../include/vigra/separableconvolution.hxx" reference operator[](int location) { return kernel_[location - left()]; } const_reference operator[](int location) const { return kernel_[location - left()]; } int left() const { return left_; } int right() const { return right_; } int size() const { return right_ - left_ + 1; } BorderTreatmentMode borderTreatment() const { return border_treatment_; } void setBorderTreatment( BorderTreatmentMode new_mode) { border_treatment_ = new_mode; } value_type norm() const { return norm_; } void normalize(value_type norm, unsigned int derivativeOrder = 0, double offset = 0.0); void normalize() { normalize(one()); } ConstAccessor accessor() const { return ConstAccessor(); } Accessor accessor() { return Accessor(); } private: InternalVector kernel_; int left_, right_; BorderTreatmentMode border_treatment_; value_type norm_; }; template void Kernel1D::normalize(value_type norm, unsigned int derivativeOrder, double offset) { typedef typename NumericTraits::RealPromote TmpType; Iterator k = kernel_.begin(); TmpType sum = NumericTraits::zero(); if(derivativeOrder == 0) { for(; k < kernel_.end(); ++k) { sum += *k; } } else { unsigned int faculty = 1; for(unsigned int i = 2; i <= derivativeOrder; ++i) faculty *= i; for(double x = left() + offset; k < kernel_.end(); ++x, ++k) { sum += *k * std::pow(-x, int(derivativeOrder)) / faculty; } } vigra::throw_precondition_error((sum != NumericTraits::zero()), "Kernel1D::normalize(): " "Cannot normalize a kernel with sum = 0"); sum = norm / sum; k = kernel_.begin(); for(; k != kernel_.end(); ++k) { *k = *k * sum; } norm_ = norm; } template void Kernel1D::initGaussian(double std_dev, value_type norm) { vigra::throw_precondition_error((std_dev >= 0.0), "Kernel1D::initGaussian(): Standard deviation must be >= 0."); if(std_dev > 0.0) { Gaussian gauss(std_dev); int radius = (int)(3.0 * std_dev + 0.5); if(radius == 0) radius = 1; kernel_.erase(kernel_.begin(), kernel_.end()); kernel_.reserve(radius*2+1); for(ARITHTYPE x = -radius; x <= radius; ++x) { kernel_.push_back(gauss(x)); } left_ = -radius; right_ = radius; } else { kernel_.erase(kernel_.begin(), kernel_.end()); kernel_.push_back(1.0); left_ = 0; right_ = 0; } if(norm != 0.0) normalize(norm); else norm_ = 1.0; border_treatment_ = BORDER_TREATMENT_CLIP; } template void Kernel1D::initDiscreteGaussian(double std_dev, value_type norm) { vigra::throw_precondition_error((std_dev >= 0.0), "Kernel1D::initDiscreteGaussian(): Standard deviation must be >= 0."); if(std_dev > 0.0) { int radius = (int)(3.0*std_dev + 0.5); if(radius == 0) radius = 1; double f = 2.0 / std_dev / std_dev; int maxIndex = (int)(2.0 * (radius + 5.0 * std::sqrt((double)radius)) + 0.5); InternalVector warray(maxIndex+1); warray[maxIndex] = 0.0; warray[maxIndex-1] = 1.0; for(int i = maxIndex-2; i >= radius; --i) { warray[i] = warray[i+2] + f * (i+1) * warray[i+1]; if(warray[i] > 1.0e40) { warray[i+1] /= warray[i]; warray[i] = 1.0; } } double er = std::exp(-radius*radius / (2.0*std_dev*std_dev)); warray[radius+1] = er * warray[radius+1] / warray[radius]; warray[radius] = er; for(int i = radius-1; i >= 0; --i) { warray[i] = warray[i+2] + f * (i+1) * warray[i+1]; er += warray[i]; } double scale = norm / (2*er - warray[0]); initExplicitly(-radius, radius); iterator c = center(); for(int i=0; i<=radius; ++i) { c[i] = c[-i] = warray[i] * scale; } } else { kernel_.erase(kernel_.begin(), kernel_.end()); kernel_.push_back(norm); left_ = 0; right_ = 0; } norm_ = norm; border_treatment_ = BORDER_TREATMENT_REFLECT; } template void Kernel1D::initGaussianDerivative(double std_dev, int order, value_type norm) { vigra::throw_precondition_error((order >= 0), "Kernel1D::initGaussianDerivative(): Order must be >= 0."); if(order == 0) { initGaussian(std_dev, norm); return; } vigra::throw_precondition_error((std_dev > 0.0), "Kernel1D::initGaussianDerivative(): " "Standard deviation must be > 0."); Gaussian gauss(std_dev, order); int radius = (int)(3.0 * std_dev + 0.5 * order + 0.5); if(radius == 0) radius = 1; kernel_.clear(); kernel_.reserve(radius*2+1); ARITHTYPE dc = 0.0; for(ARITHTYPE x = -radius; x <= radius; ++x) { kernel_.push_back(gauss(x)); dc += kernel_[kernel_.size()-1]; } dc /= (2.0*radius + 1.0); if(norm != 0.0) { for(unsigned int i=0; i < kernel_.size(); ++i) { kernel_[i] -= dc; } } left_ = -radius; right_ = radius; if(norm != 0.0) normalize(norm, order); else norm_ = 1.0; border_treatment_ = BORDER_TREATMENT_REPEAT; } template void Kernel1D::initBinomial(int radius, value_type norm) { vigra::throw_precondition_error((radius > 0), "Kernel1D::initBinomial(): Radius must be > 0."); InternalVector kernel(radius*2+1); int i,j; for(i=0; i=-radius; --j) { for(i=j; i void Kernel1D::initAveraging(int radius, value_type norm) { vigra::throw_precondition_error((radius > 0), "Kernel1D::initAveraging(): Radius must be > 0."); double scale = 1.0 / (radius * 2 + 1); kernel_.erase(kernel_.begin(), kernel_.end()); kernel_.reserve(radius*2+1); for(int i=0; i<=radius*2+1; ++i) { kernel_.push_back(scale * norm); } left_ = -radius; right_ = radius; norm_ = norm; border_treatment_ = BORDER_TREATMENT_CLIP; } template void Kernel1D::initSymmetricGradient(value_type norm) { kernel_.erase(kernel_.begin(), kernel_.end()); kernel_.reserve(3); kernel_.push_back(0.5 * norm); kernel_.push_back(0.0 * norm); kernel_.push_back(-0.5 * norm); left_ = -1; right_ = 1; norm_ = norm; border_treatment_ = BORDER_TREATMENT_REPEAT; } # 1672 "../include/vigra/separableconvolution.hxx" template inline tuple5 kernel1d(KernelIterator ik, KernelAccessor ka, int kleft, int kright, BorderTreatmentMode border) { return tuple5( ik, ka, kleft, kright, border); } template inline tuple5::const_iterator, typename Kernel1D::ConstAccessor, int, int, BorderTreatmentMode> kernel1d(Kernel1D const & k) { return tuple5::const_iterator, typename Kernel1D::ConstAccessor, int, int, BorderTreatmentMode>( k.center(), k.accessor(), k.left(), k.right(), k.borderTreatment()); } template inline tuple5::const_iterator, typename Kernel1D::ConstAccessor, int, int, BorderTreatmentMode> kernel1d(Kernel1D const & k, BorderTreatmentMode border) { return tuple5::const_iterator, typename Kernel1D::ConstAccessor, int, int, BorderTreatmentMode>( k.center(), k.accessor(), k.left(), k.right(), border); } } # 45 "../include/vigra/stdconvolution.hxx" 2 namespace vigra { template void internalPixelEvaluationByClip(int x, int y, int w, int h, SrcIterator xs, SrcAccessor src_acc, DestIterator xd, DestAccessor dest_acc, KernelIterator ki, Diff2D kul, Diff2D klr, KernelAccessor ak, KSumType norm) { typedef typename NumericTraits::RealPromote SumType; typedef NumericTraits DestTraits; int kernel_width = klr.x - kul.x + 1; int kernel_height = klr.y - kul.y + 1; SumType sum = NumericTraits::zero(); int xx, yy; int x0, y0, x1, y1; y0 = (y::zero(); kernel_width = x1 - x0 + 1; kernel_height = y1 - y0 + 1; for(yy=0; yy void internalPixelEvaluationByWrapReflectRepeat(SrcIterator xs, SrcAccessor src_acc, KernelIterator xk, KernelAccessor ak, int left, int right, int kleft, int kright, int borderskipx, int borderinc, SumType & sum) { SrcIterator xxs = xs + left; KernelIterator xxk = xk - left; for(int xx = left; xx <= right; ++xx, ++xxs, --xxk) { sum += ak(xxk) * src_acc(xxs); } xxs = xs + left - borderskipx; xxk = xk - left + 1; for(int xx = left - 1; xx >= -kright; --xx, xxs -= borderinc, ++xxk) { sum += ak(xxk) * src_acc(xxs); } xxs = xs + right + borderskipx; xxk = xk - right - 1; for(int xx = right + 1; xx <= -kleft; ++xx, xxs += borderinc, --xxk) { sum += ak(xxk) * src_acc(xxs); } } # 452 "../include/vigra/stdconvolution.hxx" template void convolveImage(SrcIterator src_ul, SrcIterator src_lr, SrcAccessor src_acc, DestIterator dest_ul, DestAccessor dest_acc, KernelIterator ki, KernelAccessor ak, Diff2D kul, Diff2D klr, BorderTreatmentMode border) { vigra::throw_precondition_error(((border == BORDER_TREATMENT_CLIP || border == BORDER_TREATMENT_AVOID || border == BORDER_TREATMENT_REFLECT || border == BORDER_TREATMENT_REPEAT || border == BORDER_TREATMENT_WRAP)), "convolveImage():\n" " Border treatment must be one of follow treatments:\n" " - BORDER_TREATMENT_CLIP\n" " - BORDER_TREATMENT_AVOID\n" " - BORDER_TREATMENT_REFLECT\n" " - BORDER_TREATMENT_REPEAT\n" " - BORDER_TREATMENT_WRAP\n"); # 473 "../include/vigra/stdconvolution.hxx" vigra::throw_precondition_error((kul.x <= 0 && kul.y <= 0), "convolveImage(): coordinates of " "kernel's upper left must be <= 0."); vigra::throw_precondition_error((klr.x >= 0 && klr.y >= 0), "convolveImage(): coordinates of " "kernel's lower right must be >= 0."); typedef typename PromoteTraits::Promote SumType; typedef typename NumericTraits::RealPromote KernelSumType; typedef NumericTraits DestTraits; int w = src_lr.x - src_ul.x; int h = src_lr.y - src_ul.y; int kernel_width = klr.x - kul.x + 1; int kernel_height = klr.y - kul.y + 1; vigra::throw_precondition_error((w >= kernel_width && h >= kernel_height), "convolveImage(): kernel larger than image."); int x,y; x = 0; y = 0; KernelSumType norm = NumericTraits::zero(); if(border == BORDER_TREATMENT_CLIP) { KernelIterator yk = ki + klr; for(y=0; y::zero()), "convolveImage(): Cannot use BORDER_TREATMENT_CLIP with a DC-free kernel"); } DestIterator yd = dest_ul + Diff2D(klr.x, klr.y); SrcIterator ys = src_ul + Diff2D(klr.x, klr.y); SrcIterator send = src_lr + Diff2D(kul.x, kul.y); for(; ys.y < send.y; ++ys.y, ++yd.y) { DestIterator xd(yd); SrcIterator xs(ys); for(; xs.x < send.x; ++x, ++xs.x, ++xd.x) { SumType sum = NumericTraits::zero(); SrcIterator yys = xs - klr; SrcIterator yyend = xs - kul; KernelIterator yk = ki + klr; for(; yys.y <= yyend.y; ++yys.y, --yk.y) { typename SrcIterator::row_iterator xxs = yys.rowIterator(); typename SrcIterator::row_iterator xxe = xxs + kernel_width; typename KernelIterator::row_iterator xk = yk.rowIterator(); for(; xxs < xxe; ++xxs, --xk) { sum += ak(xk) * src_acc(xxs); } } dest_acc.set(DestTraits::fromRealPromote(sum), xd); } } if(border == BORDER_TREATMENT_AVOID) return; int interiorskip = w + kul.x - klr.x - 1; int borderskipx; int borderskipy; int borderinc; if(border == BORDER_TREATMENT_REPEAT) { borderskipx = 0; borderskipy = 0; borderinc = 0; } else if(border == BORDER_TREATMENT_REFLECT) { borderskipx = -1; borderskipy = -1; borderinc = -1; } else if(border == BORDER_TREATMENT_WRAP) { borderskipx = -w+1; borderskipy = -h+1; borderinc = 1; } yd = dest_ul; ys = src_ul; for(y=0; y < h; ++y, ++ys.y, ++yd.y) { int top = std::max(static_cast(-klr.y), static_cast(src_ul.y - ys.y)); int bottom = std::min(static_cast(-kul.y), static_cast(src_lr.y - ys.y - 1)); DestIterator xd(yd); SrcIterator xs(ys); for(x=0; x < w; ++x, ++xs.x, ++xd.x) { if(y >= klr.y && y < h+kul.y && x == klr.x) { x += interiorskip; xs.x += interiorskip; xd.x += interiorskip; continue; } if (border == BORDER_TREATMENT_CLIP) { internalPixelEvaluationByClip(x, y, w, h, xs, src_acc, xd, dest_acc, ki, kul, klr, ak, norm); } else { int left = std::max(-klr.x, src_ul.x - xs.x); int right = std::min(-kul.x, src_lr.x - xs.x - 1); SumType sum = NumericTraits::zero(); SrcIterator yys = xs + Size2D(0, top); KernelIterator yk = ki - Size2D(0, top); int yy; for(yy = top; yy <= bottom; ++yy, ++yys.y, --yk.y) { internalPixelEvaluationByWrapReflectRepeat(yys.rowIterator(), src_acc, yk.rowIterator(), ak, left, right, kul.x, klr.x, borderskipx, borderinc, sum); } yys = xs + Size2D(0, top - borderskipy); yk = ki - Size2D(0, top - 1); for(yy = top - 1; yy >= -klr.y; --yy, yys.y -= borderinc, ++yk.y) { internalPixelEvaluationByWrapReflectRepeat(yys.rowIterator(), src_acc, yk.rowIterator(), ak, left, right, kul.x, klr.x, borderskipx, borderinc, sum); } yys = xs + Size2D(0, bottom + borderskipy); yk = ki - Size2D(0, bottom + 1); for(yy = bottom + 1; yy <= -kul.y; ++yy, yys.y += borderinc, --yk.y) { internalPixelEvaluationByWrapReflectRepeat(yys.rowIterator(), src_acc, yk.rowIterator(), ak, left, right, kul.x, klr.x, borderskipx, borderinc, sum); } dest_acc.set(DestTraits::fromRealPromote(sum), xd); } } } } template inline void convolveImage( triple src, pair dest, tuple5 kernel) { convolveImage(src.first, src.second, src.third, dest.first, dest.second, kernel.first, kernel.second, kernel.third, kernel.fourth, kernel.fifth); } # 818 "../include/vigra/stdconvolution.hxx" template void normalizedConvolveImage(SrcIterator src_ul, SrcIterator src_lr, SrcAccessor src_acc, MaskIterator mul, MaskAccessor am, DestIterator dest_ul, DestAccessor dest_acc, KernelIterator ki, KernelAccessor ak, Diff2D kul, Diff2D klr, BorderTreatmentMode border) { vigra::throw_precondition_error(((border == BORDER_TREATMENT_CLIP || border == BORDER_TREATMENT_AVOID)), "normalizedConvolveImage(): " "Border treatment must be BORDER_TREATMENT_CLIP or BORDER_TREATMENT_AVOID."); vigra::throw_precondition_error((kul.x <= 0 && kul.y <= 0), "normalizedConvolveImage(): left borders must be <= 0."); vigra::throw_precondition_error((klr.x >= 0 && klr.y >= 0), "normalizedConvolveImage(): right borders must be >= 0."); typedef typename NumericTraits::RealPromote SumType; typedef typename NumericTraits::RealPromote KSumType; typedef NumericTraits DestTraits; int w = src_lr.x - src_ul.x; int h = src_lr.y - src_ul.y; int kernel_width = klr.x - kul.x + 1; int kernel_height = klr.y - kul.y + 1; int x,y; int ystart = (border == BORDER_TREATMENT_AVOID) ? klr.y : 0; int yend = (border == BORDER_TREATMENT_AVOID) ? h+kul.y : h; int xstart = (border == BORDER_TREATMENT_AVOID) ? klr.x : 0; int xend = (border == BORDER_TREATMENT_AVOID) ? w+kul.x : w; DestIterator yd = dest_ul + Diff2D(xstart, ystart); SrcIterator ys = src_ul + Diff2D(xstart, ystart); MaskIterator ym = mul + Diff2D(xstart, ystart); KSumType norm = ak(ki); int xx, yy; KernelIterator yk = ki + klr; for(yy=0; yy::zero()) { dest_acc.set(DestTraits::fromRealPromote((norm / ksum) * sum), xd); } } } } template inline void normalizedConvolveImage( triple src, pair mask, pair dest, tuple5 kernel) { normalizedConvolveImage(src.first, src.second, src.third, mask.first, mask.second, dest.first, dest.second, kernel.first, kernel.second, kernel.third, kernel.fourth, kernel.fifth); } # 1001 "../include/vigra/stdconvolution.hxx" template inline void convolveImageWithMask(SrcIterator src_ul, SrcIterator src_lr, SrcAccessor src_acc, MaskIterator mul, MaskAccessor am, DestIterator dest_ul, DestAccessor dest_acc, KernelIterator ki, KernelAccessor ak, Diff2D kul, Diff2D klr, BorderTreatmentMode border) { normalizedConvolveImage(src_ul, src_lr, src_acc, mul, am, dest_ul, dest_acc, ki, ak, kul, klr, border); } template inline void convolveImageWithMask( triple src, pair mask, pair dest, tuple5 kernel) { normalizedConvolveImage(src.first, src.second, src.third, mask.first, mask.second, dest.first, dest.second, kernel.first, kernel.second, kernel.third, kernel.fourth, kernel.fifth); } # 1093 "../include/vigra/stdconvolution.hxx" template class Kernel2D { public: typedef ARITHTYPE value_type; typedef typename BasicImage::traverser Iterator; typedef typename BasicImage::const_traverser ConstIterator; typedef typename BasicImage::Accessor Accessor; typedef typename BasicImage::ConstAccessor ConstAccessor; struct InitProxy { typedef typename BasicImage::ScanOrderIterator Iterator; InitProxy(Iterator i, int count, value_type & norm) : iter_(i), base_(i), count_(count), sum_(count), norm_(norm) {} ~InitProxy() { vigra::throw_precondition_error((count_ == 1 || count_ == sum_), "Kernel2D::initExplicitly(): " "Too few init values."); } InitProxy & operator,(value_type const & v) { if(count_ == sum_) norm_ = *iter_; --count_; vigra::throw_precondition_error((count_ > 0), "Kernel2D::initExplicitly(): " "Too many init values."); norm_ += v; ++iter_; *iter_ = v; return *this; } Iterator iter_, base_; int count_, sum_; value_type & norm_; }; static value_type one() { return NumericTraits::one(); } Kernel2D() : kernel_(1, 1, one()), left_(0, 0), right_(0, 0), norm_(one()), border_treatment_(BORDER_TREATMENT_CLIP) {} Kernel2D(Kernel2D const & k) : kernel_(k.kernel_), left_(k.left_), right_(k.right_), norm_(k.norm_), border_treatment_(k.border_treatment_) {} Kernel2D & operator=(Kernel2D const & k) { if(this != &k) { kernel_ = k.kernel_; left_ = k.left_; right_ = k.right_; norm_ = k.norm_; border_treatment_ = k.border_treatment_; } return *this; } # 1215 "../include/vigra/stdconvolution.hxx" InitProxy operator=(value_type const & v) { int size = (right_.x - left_.x + 1) * (right_.y - left_.y + 1); kernel_ = v; norm_ = (double)size*v; return InitProxy(kernel_.begin(), size, norm_); } ~Kernel2D() {} # 1243 "../include/vigra/stdconvolution.hxx" void initSeparable(Kernel1D & kx, Kernel1D & ky) { left_ = Diff2D(kx.left(), ky.left()); right_ = Diff2D(kx.right(), ky.right()); int w = right_.x - left_.x + 1; int h = right_.y - left_.y + 1; kernel_.resize(w, h); norm_ = kx.norm() * ky.norm(); typedef typename Kernel1D::Iterator KIter; typename Kernel1D::Accessor ka; KIter kiy = ky.center() + left_.y; Iterator iy = center() + left_; for(int y=left_.y; y<=right_.y; ++y, ++kiy, ++iy.y) { KIter kix = kx.center() + left_.x; Iterator ix = iy; for(int x=left_.x; x<=right_.x; ++x, ++kix, ++ix.x) { *ix = ka(kix) * ka(kiy); } } } # 1294 "../include/vigra/stdconvolution.hxx" template void initSeparable(KernelIterator kxcenter, int xleft, int xright, KernelIterator kycenter, int yleft, int yright) { vigra::throw_precondition_error((xleft <= 0 && yleft <= 0), "Kernel2D::initSeparable(): left borders must be <= 0."); vigra::throw_precondition_error((xright >= 0 && yright >= 0), "Kernel2D::initSeparable(): right borders must be >= 0."); left_ = Point2D(xleft, yleft); right_ = Point2D(xright, yright); int w = right_.x - left_.x + 1; int h = right_.y - left_.y + 1; kernel_.resize(w, h); KernelIterator kiy = kycenter + left_.y; Iterator iy = center() + left_; for(int y=left_.y; y<=right_.y; ++y, ++kiy, ++iy.y) { KernelIterator kix = kxcenter + left_.x; Iterator ix = iy; for(int x=left_.x; x<=right_.x; ++x, ++kix, ++ix.x) { *ix = *kix * *kiy; } } typename BasicImage::iterator i = kernel_.begin(); typename BasicImage::iterator iend = kernel_.end(); norm_ = *i; ++i; for(; i!= iend; ++i) { norm_ += *i; } } # 1354 "../include/vigra/stdconvolution.hxx" void initDisk(int radius) { vigra::throw_precondition_error((radius > 0), "Kernel2D::initDisk(): radius must be > 0."); left_ = Point2D(-radius, -radius); right_ = Point2D(radius, radius); int w = right_.x - left_.x + 1; int h = right_.y - left_.y + 1; kernel_.resize(w, h); norm_ = NumericTraits::one(); kernel_ = NumericTraits::zero(); double count = 0.0; Iterator k = center(); double r2 = (double)radius*radius; int i; for(i=0; i<= radius; ++i) { double r = (double) i - 0.5; int w = (int)(std::sqrt(r2 - r*r) + 0.5); for(int j=-w; j<=w; ++j) { k(j, i) = NumericTraits::one(); k(j, -i) = NumericTraits::one(); count += (i != 0) ? 2.0 : 1.0; } } count = 1.0 / count; for(int y=-radius; y<=radius; ++y) { for(int x=-radius; x<=radius; ++x) { k(x,y) = count * k(x,y); } } } # 1434 "../include/vigra/stdconvolution.hxx" Kernel2D & initExplicitly(Diff2D upperleft, Diff2D lowerright) { vigra::throw_precondition_error((upperleft.x <= 0 && upperleft.y <= 0), "Kernel2D::initExplicitly(): left borders must be <= 0."); vigra::throw_precondition_error((lowerright.x >= 0 && lowerright.y >= 0), "Kernel2D::initExplicitly(): right borders must be >= 0."); left_ = Point2D(upperleft); right_ = Point2D(lowerright); int w = right_.x - left_.x + 1; int h = right_.y - left_.y + 1; kernel_.resize(w, h); return *this; } Point2D upperLeft() const { return left_; } Point2D lowerRight() const { return right_; } int width() const { return right_.x - left_.x + 1; } int height() const { return right_.y - left_.y + 1; } Iterator center() { return kernel_.upperLeft() - left_; } ConstIterator center() const { return kernel_.upperLeft() - left_; } value_type & operator()(int x, int y) { return kernel_[Diff2D(x,y) - left_]; } value_type operator()(int x, int y) const { return kernel_[Diff2D(x,y) - left_]; } value_type & operator[](Diff2D const & d) { return kernel_[d - left_]; } value_type operator[](Diff2D const & d) const { return kernel_[d - left_]; } value_type norm() const { return norm_; } Accessor accessor() { return Accessor(); } ConstAccessor accessor() const { return ConstAccessor(); } # 1522 "../include/vigra/stdconvolution.hxx" void normalize(value_type norm) { typename BasicImage::iterator i = kernel_.begin(); typename BasicImage::iterator iend = kernel_.end(); typename NumericTraits::RealPromote sum = *i; ++i; for(; i!= iend; ++i) { sum += *i; } sum = norm / sum; i = kernel_.begin(); for(; i != iend; ++i) { *i = *i * sum; } norm_ = norm; } void normalize() { normalize(one()); } BorderTreatmentMode borderTreatment() const { return border_treatment_; } void setBorderTreatment( BorderTreatmentMode new_mode) { vigra::throw_precondition_error(((new_mode == BORDER_TREATMENT_CLIP || new_mode == BORDER_TREATMENT_AVOID || new_mode == BORDER_TREATMENT_REFLECT || new_mode == BORDER_TREATMENT_REPEAT || new_mode == BORDER_TREATMENT_WRAP)), "convolveImage():\n" " Border treatment must be one of follow treatments:\n" " - BORDER_TREATMENT_CLIP\n" " - BORDER_TREATMENT_AVOID\n" " - BORDER_TREATMENT_REFLECT\n" " - BORDER_TREATMENT_REPEAT\n" " - BORDER_TREATMENT_WRAP\n"); # 1575 "../include/vigra/stdconvolution.hxx" border_treatment_ = new_mode; } private: BasicImage kernel_; Point2D left_, right_; value_type norm_; BorderTreatmentMode border_treatment_; }; # 1594 "../include/vigra/stdconvolution.hxx" template inline tuple5 kernel2d(KernelIterator ik, KernelAccessor ak, Diff2D kul, Diff2D klr, BorderTreatmentMode border) { return tuple5 ( ik, ak, kul, klr, border); } template inline tuple5::ConstIterator, typename Kernel2D::ConstAccessor, Diff2D, Diff2D, BorderTreatmentMode> kernel2d(Kernel2D const & k) { return tuple5::ConstIterator, typename Kernel2D::ConstAccessor, Diff2D, Diff2D, BorderTreatmentMode>( k.center(), k.accessor(), k.upperLeft(), k.lowerRight(), k.borderTreatment()); } template inline tuple5::ConstIterator, typename Kernel2D::ConstAccessor, Diff2D, Diff2D, BorderTreatmentMode> kernel2d(Kernel2D const & k, BorderTreatmentMode border) { return tuple5::ConstIterator, typename Kernel2D::ConstAccessor, Diff2D, Diff2D, BorderTreatmentMode>( k.center(), k.accessor(), k.upperLeft(), k.lowerRight(), border); } } # 43 "../include/vigra/convolution.hxx" 2 # 1 "../include/vigra/recursiveconvolution.hxx" 1 # 48 "../include/vigra/recursiveconvolution.hxx" namespace vigra { # 162 "../include/vigra/recursiveconvolution.hxx" template void recursiveFilterLine(SrcIterator is, SrcIterator isend, SrcAccessor as, DestIterator id, DestAccessor ad, double b, BorderTreatmentMode border) { int w = isend - is; SrcIterator istart = is; int x; vigra::throw_precondition_error((-1.0 < b && b < 1.0), "recursiveFilterLine(): -1 < factor < 1 required.\n"); if(b == 0.0) { for(; is != isend; ++is, ++id) { ad.set(as(is), id); } return; } double eps = 0.00001; int kernelw = std::min(w-1, (int)(std::log(eps)/std::log(std::fabs(b)))); typedef typename NumericTraits::RealPromote TempType; typedef NumericTraits DestTraits; std::vector vline(w); typename std::vector::iterator line = vline.begin(); double norm = (1.0 - b) / (1.0 + b); TempType old; if(border == BORDER_TREATMENT_REPEAT || border == BORDER_TREATMENT_AVOID) { old = (1.0 / (1.0 - b)) * as(is); } else if(border == BORDER_TREATMENT_REFLECT) { is += kernelw; old = (1.0 / (1.0 - b)) * as(is); for(x = 0; x < kernelw; ++x, --is) old = as(is) + b * old; } else if(border == BORDER_TREATMENT_WRAP) { is = isend - kernelw; old = (1.0 / (1.0 - b)) * as(is); for(x = 0; x < kernelw; ++x, ++is) old = as(is) + b * old; } else if(border == BORDER_TREATMENT_CLIP) { old = NumericTraits::zero(); } else throw std::runtime_error("recursiveFilterLine(): Unknown border treatment mode.\n"); for(x=0, is = istart; x < w; ++x, ++is) { old = as(is) + b * old; line[x] = old; } if(border == BORDER_TREATMENT_REPEAT || border == BORDER_TREATMENT_AVOID) { is = isend - 1; old = (1.0 / (1.0 - b)) * as(is); } else if(border == BORDER_TREATMENT_REFLECT) { old = line[w-2]; } else if(border == BORDER_TREATMENT_WRAP) { is = istart + kernelw - 1; old = (1.0 / (1.0 - b)) * as(is); for(x = 0; x < kernelw; ++x, --is) old = as(is) + b * old; } else if(border == BORDER_TREATMENT_CLIP) { old = NumericTraits::zero(); } is = isend - 1; id += w - 1; if(border == BORDER_TREATMENT_CLIP) { double bright = b; double bleft = std::pow(b, w); for(x=w-1; x>=0; --x, --is, --id) { TempType f = b * old; old = as(is) + f; double norm = (1.0 - b) / (1.0 + b - bleft - bright); bleft /= b; bright *= b; ad.set(norm * (line[x] + f), id); } } else if(border == BORDER_TREATMENT_AVOID) { for(x=w-1; x >= kernelw; --x, --is, --id) { TempType f = b * old; old = as(is) + f; if(x < w - kernelw) ad.set(DestTraits::fromRealPromote(norm * (line[x] + f)), id); } } else { for(x=w-1; x>=0; --x, --is, --id) { TempType f = b * old; old = as(is) + f; ad.set(DestTraits::fromRealPromote(norm * (line[x] + f)), id); } } } template void recursiveFilterLine(SrcIterator is, SrcIterator isend, SrcAccessor as, DestIterator id, DestAccessor ad, double b1, double b2) { int w = isend - is; SrcIterator istart = is; int x; typedef typename NumericTraits::RealPromote TempType; typedef NumericTraits DestTraits; std::vector vline(w+1); typename std::vector::iterator line = vline.begin(); double norm = 1.0 - b1 - b2; double norm1 = (1.0 - b1 - b2) / (1.0 + b1 + b2); double norm2 = norm * norm; int kernelw = std::min(w-1, std::max(8, (int)(1.0 / norm + 0.5))); is += (kernelw - 2); line[kernelw] = as(is); line[kernelw-1] = as(is); for(x = kernelw - 2; x > 0; --x, --is) { line[x] = as(is) + b1 * line[x+1] + b2 * line[x+2]; } line[0] = as(is) + b1 * line[1] + b2 * line[2]; ++is; line[1] = as(is) + b1 * line[0] + b2 * line[1]; ++is; for(x=2; x < w; ++x, ++is) { line[x] = as(is) + b1 * line[x-1] + b2 * line[x-2]; } line[w] = line[w-1]; line[w-1] = norm1 * (line[w-1] + b1 * line[w-2] + b2 * line[w-3]); line[w-2] = norm1 * (line[w-2] + b1 * line[w] + b2 * line[w-2]); id += w-1; ad.set(line[w-1], id); --id; ad.set(line[w-2], id); --id; for(x=w-3; x>=0; --x, --id, --is) { line[x] = norm2 * line[x] + b1 * line[x+1] + b2 * line[x+2]; ad.set(line[x], id); } } # 423 "../include/vigra/recursiveconvolution.hxx" template inline void recursiveSmoothLine(SrcIterator is, SrcIterator isend, SrcAccessor as, DestIterator id, DestAccessor ad, double scale) { vigra::throw_precondition_error((scale >= 0), "recursiveSmoothLine(): scale must be >= 0.\n"); double b = (scale == 0.0) ? 0.0 : std::exp(-1.0/scale); recursiveFilterLine(is, isend, as, id, ad, b, BORDER_TREATMENT_REPEAT); } # 510 "../include/vigra/recursiveconvolution.hxx" template void recursiveFirstDerivativeLine(SrcIterator is, SrcIterator isend, SrcAccessor as, DestIterator id, DestAccessor ad, double scale) { vigra::throw_precondition_error((scale > 0), "recursiveFirstDerivativeLine(): scale must be > 0.\n"); int w = isend -is; int x; typedef typename NumericTraits::RealPromote TempType; typedef NumericTraits DestTraits; std::vector vline(w); typename std::vector::iterator line = vline.begin(); double b = std::exp(-1.0/scale); double norm = (1.0 - b) * (1.0 - b) / 2.0 / b; TempType old = (1.0 / (1.0 - b)) * as(is); for(x=0; x=0; --x) { --is; --id; old = as(is) + b * old; ad.set(DestTraits::fromRealPromote(norm * (line[x] + old)), id); } } # 629 "../include/vigra/recursiveconvolution.hxx" template void recursiveSecondDerivativeLine(SrcIterator is, SrcIterator isend, SrcAccessor as, DestIterator id, DestAccessor ad, double scale) { vigra::throw_precondition_error((scale > 0), "recursiveSecondDerivativeLine(): scale must be > 0.\n"); int w = isend -is; int x; typedef typename NumericTraits::RealPromote TempType; typedef NumericTraits DestTraits; std::vector vline(w); typename std::vector::iterator line = vline.begin(); double b = std::exp(-1.0/scale); double a = -2.0 / (1.0 - b); double norm = (1.0 - b) * (1.0 - b) * (1.0 - b) / (1.0 + b); TempType old = (1.0 / (1.0 - b)) * as(is); for(x=0; x=0; --x) { --is; --id; TempType f = old + a * as(is); old = as(is) + b * old; ad.set(DestTraits::fromRealPromote(norm * (line[x] + f)), id); } } # 750 "../include/vigra/recursiveconvolution.hxx" template void recursiveFilterX(SrcImageIterator supperleft, SrcImageIterator slowerright, SrcAccessor as, DestImageIterator dupperleft, DestAccessor ad, double b, BorderTreatmentMode border) { int w = slowerright.x - supperleft.x; int h = slowerright.y - supperleft.y; int y; for(y=0; y inline void recursiveFilterX( triple src, pair dest, double b, BorderTreatmentMode border) { recursiveFilterX(src.first, src.second, src.third, dest.first, dest.second, b, border); } template void recursiveFilterX(SrcImageIterator supperleft, SrcImageIterator slowerright, SrcAccessor as, DestImageIterator dupperleft, DestAccessor ad, double b1, double b2) { int w = slowerright.x - supperleft.x; int h = slowerright.y - supperleft.y; int y; for(y=0; y inline void recursiveFilterX( triple src, pair dest, double b1, double b2) { recursiveFilterX(src.first, src.second, src.third, dest.first, dest.second, b1, b2); } # 877 "../include/vigra/recursiveconvolution.hxx" template void recursiveSmoothX(SrcImageIterator supperleft, SrcImageIterator slowerright, SrcAccessor as, DestImageIterator dupperleft, DestAccessor ad, double scale) { int w = slowerright.x - supperleft.x; int h = slowerright.y - supperleft.y; int y; for(y=0; y inline void recursiveSmoothX( triple src, pair dest, double scale) { recursiveSmoothX(src.first, src.second, src.third, dest. first, dest.second, scale); } # 982 "../include/vigra/recursiveconvolution.hxx" template void recursiveFilterY(SrcImageIterator supperleft, SrcImageIterator slowerright, SrcAccessor as, DestImageIterator dupperleft, DestAccessor ad, double b, BorderTreatmentMode border) { int w = slowerright.x - supperleft.x; int h = slowerright.y - supperleft.y; int x; for(x=0; x inline void recursiveFilterY( triple src, pair dest, double b, BorderTreatmentMode border) { recursiveFilterY(src.first, src.second, src.third, dest.first, dest.second, b, border); } template void recursiveFilterY(SrcImageIterator supperleft, SrcImageIterator slowerright, SrcAccessor as, DestImageIterator dupperleft, DestAccessor ad, double b1, double b2) { int w = slowerright.x - supperleft.x; int h = slowerright.y - supperleft.y; int x; for(x=0; x inline void recursiveFilterY( triple src, pair dest, double b1, double b2) { recursiveFilterY(src.first, src.second, src.third, dest.first, dest.second, b1, b2); } # 1109 "../include/vigra/recursiveconvolution.hxx" template void recursiveSmoothY(SrcImageIterator supperleft, SrcImageIterator slowerright, SrcAccessor as, DestImageIterator dupperleft, DestAccessor ad, double scale) { int w = slowerright.x - supperleft.x; int h = slowerright.y - supperleft.y; int x; for(x=0; x inline void recursiveSmoothY( triple src, pair dest, double scale) { recursiveSmoothY(src.first, src.second, src.third, dest. first, dest.second, scale); } # 1197 "../include/vigra/recursiveconvolution.hxx" template void recursiveFirstDerivativeX(SrcImageIterator supperleft, SrcImageIterator slowerright, SrcAccessor as, DestImageIterator dupperleft, DestAccessor ad, double scale) { int w = slowerright.x - supperleft.x; int h = slowerright.y - supperleft.y; int y; for(y=0; y inline void recursiveFirstDerivativeX( triple src, pair dest, double scale) { recursiveFirstDerivativeX(src.first, src.second, src.third, dest. first, dest.second, scale); } # 1285 "../include/vigra/recursiveconvolution.hxx" template void recursiveFirstDerivativeY(SrcImageIterator supperleft, SrcImageIterator slowerright, SrcAccessor as, DestImageIterator dupperleft, DestAccessor ad, double scale) { int w = slowerright.x - supperleft.x; int h = slowerright.y - supperleft.y; int x; for(x=0; x inline void recursiveFirstDerivativeY( triple src, pair dest, double scale) { recursiveFirstDerivativeY(src.first, src.second, src.third, dest. first, dest.second, scale); } # 1373 "../include/vigra/recursiveconvolution.hxx" template void recursiveSecondDerivativeX(SrcImageIterator supperleft, SrcImageIterator slowerright, SrcAccessor as, DestImageIterator dupperleft, DestAccessor ad, double scale) { int w = slowerright.x - supperleft.x; int h = slowerright.y - supperleft.y; int y; for(y=0; y inline void recursiveSecondDerivativeX( triple src, pair dest, double scale) { recursiveSecondDerivativeX(src.first, src.second, src.third, dest. first, dest.second, scale); } # 1461 "../include/vigra/recursiveconvolution.hxx" template void recursiveSecondDerivativeY(SrcImageIterator supperleft, SrcImageIterator slowerright, SrcAccessor as, DestImageIterator dupperleft, DestAccessor ad, double scale) { int w = slowerright.x - supperleft.x; int h = slowerright.y - supperleft.y; int x; for(x=0; x inline void recursiveSecondDerivativeY( triple src, pair dest, double scale) { recursiveSecondDerivativeY(src.first, src.second, src.third, dest. first, dest.second, scale); } } # 45 "../include/vigra/convolution.hxx" 2 # 1 "../include/vigra/nonlineardiffusion.hxx" 1 # 42 "../include/vigra/nonlineardiffusion.hxx" # 1 "../include/vigra/stdimagefunctions.hxx" 1 # 92 "../include/vigra/stdimagefunctions.hxx" # 1 "../include/vigra/combineimages.hxx" 1 # 93 "../include/vigra/stdimagefunctions.hxx" 2 # 1 "../include/vigra/resizeimage.hxx" 1 # 47 "../include/vigra/resizeimage.hxx" # 1 "../include/vigra/resampling_convolution.hxx" 1 # 43 "../include/vigra/resampling_convolution.hxx" # 1 "../include/vigra/rational.hxx" 1 # 60 "../include/vigra/rational.hxx" namespace vigra { # 81 "../include/vigra/rational.hxx" template IntType gcd(IntType n, IntType m) { IntType zero(0); if (n < zero) n = -n; if (m < zero) m = -m; for(;;) { if(m == zero) return n; n %= m; if(n == zero) return m; m %= n; } } # 122 "../include/vigra/rational.hxx" template IntType lcm(IntType n, IntType m) { IntType zero(0); if (n == zero || m == zero) return zero; n /= gcd(n, m); n *= m; if (n < zero) n = -n; return n; } class bad_rational : public std::domain_error { public: explicit bad_rational() : std::domain_error("bad rational: zero denominator") {} }; template class Rational; template Rational abs(const Rational& r); template Rational pow(const Rational& r, int n); template Rational floor(const Rational& r); template Rational ceil(const Rational& r); # 193 "../include/vigra/rational.hxx" template class Rational { public: typedef IntType value_type; typedef typename If::isBuiltinType, IntType, IntType const &>::type param_type; Rational() : num(0), den(1) {} template Rational(Rational const & r) : num(r.numerator()), den(r.denominator()) {} Rational(param_type n) : num(n), den(IntType(1)) {} # 237 "../include/vigra/rational.hxx" Rational(param_type n, param_type d, bool doNormalize = true) : num(n), den(d) { if(doNormalize) normalize(); } explicit Rational(double v, double epsilon = 1e-4) : num(IntType(v < 0.0 ? v/epsilon - 0.5 : v/epsilon + 0.5)), den(IntType(1.0/epsilon + 0.5)) { normalize(); } Rational& operator=(param_type n) { return assign(n, 1); } Rational& assign(param_type n, param_type d, bool doNormalize = true); param_type numerator() const { return num; } param_type denominator() const { return den; } Rational& operator+= (const Rational& r); Rational& operator-= (const Rational& r); Rational& operator*= (const Rational& r); Rational& operator/= (const Rational& r); Rational& operator+= (param_type i); Rational& operator-= (param_type i); Rational& operator*= (param_type i); Rational& operator/= (param_type i); Rational& operator++(); Rational& operator--(); Rational operator++(int) { Rational res(*this); operator++(); return res; } Rational operator--(int) { Rational res(*this); operator--(); return res; } bool operator!() const { return !num; } bool is_pinf() const { IntType zero(0); return den == zero && num > zero; } bool is_ninf() const { IntType zero(0); return den == zero && num < zero; } bool is_inf() const { IntType zero(0); return den == zero && num != zero; } int sign() const { IntType zero(0); return num == zero ? 0 : num < zero ? -1 : 1; } private: IntType num; IntType den; void normalize(); }; template inline Rational& Rational::assign(param_type n, param_type d, bool doNormalize) { num = n; den = d; if(doNormalize) normalize(); return *this; } template Rational& Rational::operator+= (const Rational& r) { IntType zero(0); if(den == zero) { if(r.den == zero && sign()*r.sign() < 0) throw bad_rational(); return *this; } if(r.den == zero) { assign(r.num, zero, false); return *this; } # 439 "../include/vigra/rational.hxx" IntType r_num = r.num; IntType r_den = r.den; IntType g = gcd(den, r_den); den /= g; num = num * (r_den / g) + r_num * den; g = gcd(num, g); num /= g; den *= r_den/g; return *this; } template Rational& Rational::operator-= (const Rational& r) { IntType zero(0); if(den == zero) { if(r.den == zero && sign()*r.sign() > 0) throw bad_rational(); return *this; } if(r.den == zero) { assign(-r.num, zero, false); return *this; } IntType r_num = r.num; IntType r_den = r.den; IntType g = gcd(den, r_den); den /= g; num = num * (r_den / g) - r_num * den; g = gcd(num, g); num /= g; den *= r_den/g; return *this; } template Rational& Rational::operator*= (const Rational& r) { IntType zero(0); if(den == zero) { if(r.num == zero) throw bad_rational(); num *= r.sign(); return *this; } if(r.den == zero) { if(num == zero) throw bad_rational(); num = r.num * sign(); den = zero; return *this; } IntType r_num = r.num; IntType r_den = r.den; IntType gcd1 = gcd(num, r_den); IntType gcd2 = gcd(r_num, den); num = (num/gcd1) * (r_num/gcd2); den = (den/gcd2) * (r_den/gcd1); return *this; } template Rational& Rational::operator/= (const Rational& r) { IntType zero(0); if(den == zero) { if(r.den == zero) throw bad_rational(); if(r.num != zero) num *= r.sign(); return *this; } if(r.num == zero) { if(num == zero) throw bad_rational(); num = IntType(sign()); den = zero; return *this; } if (num == zero) return *this; IntType r_num = r.num; IntType r_den = r.den; IntType gcd1 = gcd(num, r_num); IntType gcd2 = gcd(r_den, den); num = (num/gcd1) * (r_den/gcd2); den = (den/gcd2) * (r_num/gcd1); if (den < zero) { num = -num; den = -den; } return *this; } template inline Rational& Rational::operator+= (param_type i) { num += i * den; return *this; } template inline Rational& Rational::operator-= (param_type i) { num -= i * den; return *this; } template Rational& Rational::operator*= (param_type i) { if(i == IntType(1)) return *this; IntType zero(0); if(i == zero) { if(den == zero) { throw bad_rational(); } else { num = zero; den = IntType(1); return *this; } } IntType g = gcd(i, den); den /= g; num *= i / g; return *this; } template Rational& Rational::operator/= (param_type i) { if(i == IntType(1)) return *this; IntType zero(0); if(i == zero) { if(num == zero) throw bad_rational(); num = IntType(sign()); den = zero; return *this; } IntType g = gcd(i, num); if(i < zero) { num /= -g; den *= -i / g; } else { num /= g; den *= i / g; } return *this; } template inline Rational& Rational::operator++() { num += den; return *this; } template inline Rational& Rational::operator--() { num -= den; return *this; } template void Rational::normalize() { IntType zero(0); if (den == zero) { if(num == zero) throw bad_rational(); if(num < zero) num = IntType(-1); else num = IntType(1); return; } if (num == zero) { den = IntType(1); return; } IntType g = gcd(num, den); num /= g; den /= g; if (den < zero) { num = -num; den = -den; } } # 741 "../include/vigra/rational.hxx" template struct NumericTraits > { typedef Rational Type; typedef Rational::Promote> Promote; typedef Rational::RealPromote> RealPromote; typedef std::complex > ComplexPromote; typedef T ValueType; typedef typename NumericTraits::isIntegral isIntegral; typedef VigraTrueType isScalar; typedef typename NumericTraits::isSigned isSigned; typedef VigraTrueType isOrdered; typedef VigraFalseType isComplex; static Type zero() { return Type(0); } static Type one() { return Type(1); } static Type nonZero() { return one(); } static Promote toPromote(Type const & v) { return Promote(v.numerator(), v.denominator(), false); } static RealPromote toRealPromote(Type const & v) { return RealPromote(v.numerator(), v.denominator(), false); } static Type fromPromote(Promote const & v) { return Type(NumericTraits::fromPromote(v.numerator()), NumericTraits::fromPromote(v.denominator()), false); } static Type fromRealPromote(RealPromote const & v) { return Type(NumericTraits::fromRealPromote(v.numerator()), NumericTraits::fromRealPromote(v.denominator()), false); } }; template struct NormTraits > { typedef Rational Type; typedef typename NumericTraits::Promote SquaredNormType; typedef Type NormType; }; template struct PromoteTraits, Rational > { typedef Rational::Promote> Promote; static Promote toPromote(Rational const & v) { return v; } }; template struct PromoteTraits, Rational > { typedef Rational::Promote> Promote; static Promote toPromote(Rational const & v) { return v; } static Promote toPromote(Rational const & v) { return v; } }; template struct PromoteTraits, T2 > { typedef Rational::Promote> Promote; static Promote toPromote(Rational const & v) { return v; } static Promote toPromote(T2 const & v) { return Promote(v); } }; template struct PromoteTraits > { typedef Rational::Promote> Promote; static Promote toPromote(T1 const & v) { return Promote(v); } static Promote toPromote(Rational const & v) { return v; } }; # 838 "../include/vigra/rational.hxx" template inline Rational operator+ (const Rational& r) { return r; } template inline Rational operator- (const Rational& r) { return Rational(-r.numerator(), r.denominator(), false); } template inline Rational operator+(Rational l, Rational const & r) { return l += r; } template inline Rational operator-(Rational l, Rational const & r) { return l -= r; } template inline Rational operator*(Rational l, Rational const & r) { return l *= r; } template inline Rational operator/(Rational l, Rational const & r) { return l /= r; } template inline Rational operator+(Rational l, typename Rational::param_type r) { return l += r; } template inline Rational operator-(Rational l, typename Rational::param_type r) { return l -= r; } template inline Rational operator*(Rational l, typename Rational::param_type r) { return l *= r; } template inline Rational operator/(Rational l, typename Rational::param_type r) { return l /= r; } template inline Rational operator+(typename Rational::param_type l, Rational r) { return r += l; } template inline Rational operator-(typename Rational::param_type l, Rational const & r) { return (-r) += l; } template inline Rational operator*(typename Rational::param_type l, Rational r) { return r *= l; } template inline Rational operator/(typename Rational::param_type l, Rational const & r) { if(r.numerator() < IntType(0)) return Rational(-r.denominator(), -r.numerator(), false) *= l; else return Rational(r.denominator(), r.numerator(), false) *= l; } # 954 "../include/vigra/rational.hxx" template inline bool operator== (const Rational & l, const Rational& r) { return l.denominator() == r.denominator() && l.numerator() == r.numerator(); } template inline bool operator== (const Rational & l, IntType2 const & i) { return ((l.denominator() == IntType1(1)) && (l.numerator() == i)); } template inline bool operator==(IntType1 const & l, Rational const & r) { return r == l; } template inline bool operator!=(Rational const & l, Rational const & r) { return l.denominator() != r.denominator() || l.numerator() != r.numerator(); } template inline bool operator!= (const Rational & l, IntType2 const & i) { return ((l.denominator() != IntType1(1)) || (l.numerator() != i)); } template inline bool operator!=(IntType1 const & l, Rational const & r) { return r != l; } template bool operator< (const Rational & l, const Rational& r) { typedef typename PromoteTraits::Promote IntType; IntType zero(0); if(l.denominator() == zero) if(r.denominator() == zero) return l.numerator() < r.numerator(); else return l.numerator() < zero; if(r.denominator() == zero) return r.numerator() > zero; if(l.numerator() >= zero && r.numerator() <= zero) return false; if(l.numerator() <= zero && r.numerator() >= zero) return true; IntType gcd1 = gcd(l.numerator(), r.numerator()); IntType gcd2 = gcd(r.denominator(), l.denominator()); return (l.numerator()/gcd1) * (r.denominator()/gcd2) < (l.denominator()/gcd2) * (r.numerator()/gcd1); } template bool operator< (const Rational & l, IntType2 const & i) { typedef typename PromoteTraits::Promote IntType; IntType zero(0); if(l.denominator() == zero) return l.numerator() < zero; if(l.numerator() >= zero && i <= zero) return false; if(l.numerator() <= zero && i >= zero) return true; if (l.numerator() > zero) return (l.numerator()/l.denominator()) < i; else return -i < (-l.numerator()/l.denominator()); } template inline bool operator<(IntType1 const & l, Rational const & r) { return r > l; } template inline bool operator>(Rational const & l, Rational const & r) { return r < l; } template bool operator> (const Rational & l, IntType2 const & i) { if (l.numerator() == i && l.denominator() == IntType1(1)) return false; return !(l < i); } template inline bool operator>(IntType1 const & l, Rational const & r) { return r < l; } template inline bool operator<=(Rational const & l, Rational const & r) { return !(r < l); } template inline bool operator<=(Rational const & l, IntType2 const & r) { return !(l > r); } template inline bool operator<=(IntType1 const & l, Rational const & r) { return r >= l; } template inline bool operator>=(Rational const & l, Rational const & r) { return !(l < r); } template inline bool operator>=(Rational const & l, IntType2 const & r) { return !(l < r); } template inline bool operator>=(IntType1 const & l, Rational const & r) { return r <= l; } # 1167 "../include/vigra/rational.hxx" template inline Rational abs(const Rational& r) { if (r.numerator() >= IntType(0)) return r; return Rational(-r.numerator(), r.denominator(), false); } template inline Rational norm(const Rational& r) { return abs(r); } template inline typename NormTraits >::SquaredNormType squaredNorm(const Rational& r) { return typename NormTraits >::SquaredNormType(sq(r.numerator()), sq(r.denominator()), false); } template Rational pow(const Rational& r, int e) { IntType zero(0); int ae; if(e == 0) { if(r.denominator() == zero) throw bad_rational(); return Rational(IntType(1)); } else if(e < 0) { if(r.numerator() == zero) return Rational(IntType(1), zero, false); if(r.denominator() == zero) return Rational(zero); ae = -e; } else { if(r.denominator() == zero || r.numerator() == zero) return r; ae = e; } IntType nold = r.numerator(), dold = r.denominator(), nnew = IntType(1), dnew = IntType(1); for(; ae != 0; ae >>= 1, nold *= nold, dold *= dold) { if(ae % 2 != 0) { nnew *= nold; dnew *= dold; } } if(e < 0) { if(nnew < zero) return Rational(-dnew, -nnew, false); else return Rational(dnew, nnew, false); } else return Rational(nnew, dnew, false); } template Rational floor(const Rational& r) { IntType zero(0), one(1); if(r.denominator() == zero || r.denominator() == one) return r; return r.numerator() < zero ? Rational(r.numerator() / r.denominator() - one) : Rational(r.numerator() / r.denominator()); } template Rational ceil(const Rational& r) { IntType zero(0), one(1); if(r.denominator() == zero || r.denominator() == one) return r; return r.numerator() < IntType(0) ? Rational(r.numerator() / r.denominator()) : Rational(r.numerator() / r.denominator() + one); } # 1287 "../include/vigra/rational.hxx" template inline T rational_cast(const Rational& src) { return static_cast(src.numerator())/src.denominator(); } template inline T const & rational_cast(T const & v) { return v; } template std::ostream& operator<< (std::ostream& os, const vigra::Rational& r) { os << r.numerator() << '/' << r.denominator(); return os; } } # 44 "../include/vigra/resampling_convolution.hxx" 2 namespace vigra { namespace resampling_detail { struct MapTargetToSourceCoordinate { MapTargetToSourceCoordinate(Rational const & samplingRatio, Rational const & offset) : a(samplingRatio.denominator()*offset.denominator()), b(samplingRatio.numerator()*offset.numerator()), c(samplingRatio.numerator()*offset.denominator()) {} int operator()(int i) const { return (i * a + b) / c; } double toDouble(int i) const { return double(i * a + b) / c; } Rational toRational(int i) const { return Rational(i * a + b, c); } int a, b, c; }; } template <> class FunctorTraits : public FunctorTraitsBase { public: typedef VigraTrueType isUnaryFunctor; }; template void resamplingConvolveLine(SrcIter s, SrcIter send, SrcAcc src, DestIter d, DestIter dend, DestAcc dest, KernelArray const & kernels, Functor mapTargetToSourceCoordinate) { typedef typename NumericTraits::RealPromote TmpType; typedef typename KernelArray::value_type Kernel; typedef typename Kernel::const_iterator KernelIter; int wo = send - s; int wn = dend - d; int wo2 = 2*wo - 2; int i; typename KernelArray::const_iterator kernel = kernels.begin(); for(i=0; i::zero(); int lbound = is - kernel->right(), hbound = is - kernel->left(); KernelIter k = kernel->center() + kernel->right(); if(lbound < 0 || hbound >= wo) { vigra::throw_precondition_error((-lbound < wo && wo2 - hbound >= 0), "resamplingConvolveLine(): kernel or offset larger than image."); for(int m=lbound; m <= hbound; ++m, --k) { int mm = (m < 0) ? -m : (m >= wo) ? wo2 - m : m; sum += *k * src(s, mm); } } else { SrcIter ss = s + lbound; SrcIter ssend = s + hbound; for(; ss <= ssend; ++ss, --k) { sum += *k * src(ss); } } dest.set(sum, d); } } template void createResamplingKernels(Kernel const & kernel, MapCoordinate const & mapCoordinate, KernelArray & kernels) { for(unsigned int idest = 0; idest < kernels.size(); ++idest) { int isrc = mapCoordinate(idest); double idsrc = mapCoordinate.toDouble(idest); double offset = idsrc - isrc; double radius = kernel.radius(); int left = int(ceil(-radius - offset)); int right = int(floor(radius - offset)); kernels[idest].initExplicitly(left, right); double x = left + offset; for(int i = left; i <= right; ++i, ++x) kernels[idest][i] = kernel(x); kernels[idest].normalize(1.0, kernel.derivativeOrder(), offset); } } # 280 "../include/vigra/resampling_convolution.hxx" template void resamplingConvolveX(SrcIter sul, SrcIter slr, SrcAcc src, DestIter dul, DestIter dlr, DestAcc dest, Kernel const & kernel, Rational const & samplingRatio, Rational const & offset) { int wold = slr.x - sul.x; int wnew = dlr.x - dul.x; vigra::throw_precondition_error((!samplingRatio.is_inf() && samplingRatio > 0), "resamplingConvolveX(): sampling ratio must be > 0 and < infinity"); vigra::throw_precondition_error((!offset.is_inf()), "resamplingConvolveX(): offset must be < infinity"); int period = lcm(samplingRatio.numerator(), samplingRatio.denominator()); resampling_detail::MapTargetToSourceCoordinate mapCoordinate(samplingRatio, offset); ArrayVector > kernels(period); createResamplingKernels(kernel, mapCoordinate, kernels); for(; sul.y < slr.y; ++sul.y, ++dul.y) { typename SrcIter::row_iterator sr = sul.rowIterator(); typename DestIter::row_iterator dr = dul.rowIterator(); resamplingConvolveLine(sr, sr+wold, src, dr, dr+wnew, dest, kernels, mapCoordinate); } } template inline void resamplingConvolveX(triple src, triple dest, Kernel const & kernel, Rational const & samplingRatio, Rational const & offset) { resamplingConvolveX(src.first, src.second, src.third, dest.first, dest.second, dest.third, kernel, samplingRatio, offset); } # 417 "../include/vigra/resampling_convolution.hxx" template void resamplingConvolveY(SrcIter sul, SrcIter slr, SrcAcc src, DestIter dul, DestIter dlr, DestAcc dest, Kernel const & kernel, Rational const & samplingRatio, Rational const & offset) { int hold = slr.y - sul.y; int hnew = dlr.y - dul.y; vigra::throw_precondition_error((!samplingRatio.is_inf() && samplingRatio > 0), "resamplingConvolveY(): sampling ratio must be > 0 and < infinity"); vigra::throw_precondition_error((!offset.is_inf()), "resamplingConvolveY(): offset must be < infinity"); int period = lcm(samplingRatio.numerator(), samplingRatio.denominator()); resampling_detail::MapTargetToSourceCoordinate mapCoordinate(samplingRatio, offset); ArrayVector > kernels(period); createResamplingKernels(kernel, mapCoordinate, kernels); for(; sul.x < slr.x; ++sul.x, ++dul.x) { typename SrcIter::column_iterator sc = sul.columnIterator(); typename DestIter::column_iterator dc = dul.columnIterator(); resamplingConvolveLine(sc, sc+hold, src, dc, dc+hnew, dest, kernels, mapCoordinate); } } template inline void resamplingConvolveY(triple src, triple dest, Kernel const & kernel, Rational const & samplingRatio, Rational const & offset) { resamplingConvolveY(src.first, src.second, src.third, dest.first, dest.second, dest.third, kernel, samplingRatio, offset); } # 536 "../include/vigra/resampling_convolution.hxx" template void resamplingConvolveImage(SrcIterator sul,SrcIterator slr, SrcAccessor src, DestIterator dul, DestIterator dlr, DestAccessor dest, KernelX const & kx, Rational const & samplingRatioX, Rational const & offsetX, KernelY const & ky, Rational const & samplingRatioY, Rational const & offsetY) { typedef typename NumericTraits::RealPromote TmpType; BasicImage tmp(dlr.x - dul.x, slr.y - sul.y); resamplingConvolveX(srcIterRange(sul, slr, src), destImageRange(tmp), kx, samplingRatioX, offsetX); resamplingConvolveY(srcImageRange(tmp), destIterRange(dul, dlr, dest), ky, samplingRatioY, offsetY); } template inline void resamplingConvolveImage(triple src, triple dest, KernelX const & kx, Rational const & samplingRatioX, Rational const & offsetX, KernelY const & ky, Rational const & samplingRatioY, Rational const & offsetY) { resamplingConvolveImage(src.first, src.second, src.third, dest.first, dest.second, dest.third, kx, samplingRatioX, offsetX, ky, samplingRatioY, offsetY); } } # 48 "../include/vigra/resizeimage.hxx" 2 # 1 "../include/vigra/splines.hxx" 1 # 43 "../include/vigra/splines.hxx" # 1 "../include/vigra/polynomial.hxx" 1 # 50 "../include/vigra/polynomial.hxx" namespace vigra { template class Polynomial; template class StaticPolynomial; # 73 "../include/vigra/polynomial.hxx" template class PolynomialView { public: typedef T value_type; typedef typename NumericTraits::RealPromote RealPromote; typedef typename NumericTraits::ValueType Real; typedef typename NumericTraits::ComplexPromote Complex; typedef T * iterator; typedef T const * const_iterator; typedef Polynomial RealPolynomial; typedef Polynomial ComplexPolynomial; # 121 "../include/vigra/polynomial.hxx" PolynomialView(T * coeffs, unsigned int order, double epsilon = 1.0e-14) : coeffs_(coeffs), order_(order), epsilon_(epsilon) {} T & operator[](unsigned int i) { return coeffs_[i]; } T const & operator[](unsigned int i) const { return coeffs_[i]; } # 142 "../include/vigra/polynomial.hxx" template typename PromoteTraits::Promote operator()(V v) const; void differentiate(unsigned int n = 1); # 157 "../include/vigra/polynomial.hxx" void deflate(T const & r, unsigned int multiplicity = 1); void forwardDeflate(T const & v); # 174 "../include/vigra/polynomial.hxx" void forwardBackwardDeflate(T v); void backwardDeflate(T v); void deflateConjugatePair(Complex const & v); void minimizeOrder(double epsilon = 0.0); void normalize(); void balance(); iterator begin() { return coeffs_; } iterator end() { return begin() + size(); } const_iterator begin() const { return coeffs_; } const_iterator end() const { return begin() + size(); } unsigned int size() const { return order_ + 1; } unsigned int order() const { return order_; } double epsilon() const { return epsilon_; } void setEpsilon(double eps) { epsilon_ = eps; } protected: PolynomialView(double epsilon = 1e-14) : coeffs_(0), order_(0), epsilon_(epsilon) {} void setCoeffs(T * coeffs, unsigned int order) { coeffs_ = coeffs; order_ = order; } T * coeffs_; unsigned int order_; double epsilon_; }; template template typename PromoteTraits::Promote PolynomialView::operator()(U v) const { typename PromoteTraits::Promote p(coeffs_[order_]); for(int i = order_ - 1; i >= 0; --i) { p = v * p + coeffs_[i]; } return p; } # 291 "../include/vigra/polynomial.hxx" template void PolynomialView::differentiate(unsigned int n) { if(n == 0) return; if(order_ == 0) { coeffs_[0] = 0.0; return; } for(unsigned int i = 1; i <= order_; ++i) { coeffs_[i-1] = double(i)*coeffs_[i]; } --order_; if(n > 1) differentiate(n-1); } template void PolynomialView::deflate(T const & v, unsigned int multiplicity) { vigra::throw_precondition_error((order_ > 0), "PolynomialView::deflate(): cannot deflate 0th order polynomial."); if(v == 0.0) { ++coeffs_; --order_; } else { forwardBackwardDeflate(v); } if(multiplicity > 1) deflate(v, multiplicity-1); } template void PolynomialView::forwardDeflate(T const & v) { for(int i = order_-1; i > 0; --i) { coeffs_[i] += v * coeffs_[i+1]; } ++coeffs_; --order_; } template void PolynomialView::forwardBackwardDeflate(T v) { unsigned int order2 = order_ / 2; T tmp = coeffs_[order_]; for(unsigned int i = order_-1; i >= order2; --i) { T tmp1 = coeffs_[i]; coeffs_[i] = tmp; tmp = tmp1 + v * tmp; } v = -1.0 / v; coeffs_[0] *= v; for(unsigned int i = 1; i < order2; ++i) { coeffs_[i] = v * (coeffs_[i] - coeffs_[i-1]); } --order_; } template void PolynomialView::backwardDeflate(T v) { v = -1.0 / v; coeffs_[0] *= v; for(unsigned int i = 1; i < order_; ++i) { coeffs_[i] = v * (coeffs_[i] - coeffs_[i-1]); } --order_; } template void PolynomialView::deflateConjugatePair(Complex const & v) { vigra::throw_precondition_error((order_ > 1), "PolynomialView::deflateConjugatePair(): cannot deflate 2 roots " "from 1st order polynomial."); Real a = 2.0*v.real(); Real b = -sq(v.real()) - sq(v.imag()); coeffs_[order_-1] += a * coeffs_[order_]; for(int i = order_-2; i > 1; --i) { coeffs_[i] += a * coeffs_[i+1] + b*coeffs_[i+2]; } coeffs_ += 2; order_ -= 2; } template void PolynomialView::minimizeOrder(double epsilon) { while(std::abs(coeffs_[order_]) <= epsilon && order_ > 0) --order_; } template void PolynomialView::normalize() { for(unsigned int i = 0; i void PolynomialView::balance() { Real p0 = abs(coeffs_[0]), po = abs(coeffs_[order_]); Real norm = (p0 > 0.0) ? std::sqrt(p0*po) : po; for(unsigned int i = 0; i<=order_; ++i) coeffs_[i] /= norm; } # 443 "../include/vigra/polynomial.hxx" template class Polynomial : public PolynomialView { typedef PolynomialView BaseType; public: typedef typename BaseType::Real Real; typedef typename BaseType::Complex Complex; typedef Polynomial RealPolynomial; typedef Polynomial ComplexPolynomial; typedef T value_type; typedef T * iterator; typedef T const * const_iterator; Polynomial(unsigned int order = 0, double epsilon = 1.0e-14) : BaseType(epsilon), polynomial_(order + 1, T()) { this->setCoeffs(&polynomial_[0], order); } Polynomial(Polynomial const & p) : BaseType(p.epsilon()), polynomial_(p.begin(), p.end()) { this->setCoeffs(&polynomial_[0], p.order()); } template Polynomial(ITER i, unsigned int order) : BaseType(), polynomial_(i, i + order + 1) { this->setCoeffs(&polynomial_[0], order); } template Polynomial(ITER i, unsigned int order, double epsilon) : BaseType(epsilon), polynomial_(i, i + order + 1) { this->setCoeffs(&polynomial_[0], order); } Polynomial & operator=(Polynomial const & p) { if(this == &p) return *this; ArrayVector tmp(p.begin(), p.end()); polynomial_.swap(tmp); this->setCoeffs(&polynomial_[0], p.order()); this->epsilon_ = p.epsilon_; return *this; } Polynomial getDerivative(unsigned int n = 1) const { Polynomial res(*this); res.differentiate(n); return res; } Polynomial getDeflated(Real r) const { Polynomial res(*this); res.deflate(r); return res; } Polynomial getDeflated(Complex const & r) const { Polynomial res(this->begin(), this->order(), this->epsilon()); res.deflate(r); return res; } protected: ArrayVector polynomial_; }; # 574 "../include/vigra/polynomial.hxx" template class StaticPolynomial : public PolynomialView { typedef PolynomialView BaseType; public: typedef typename BaseType::Real Real; typedef typename BaseType::Complex Complex; typedef StaticPolynomial RealPolynomial; typedef StaticPolynomial ComplexPolynomial; typedef T value_type; typedef T * iterator; typedef T const * const_iterator; # 597 "../include/vigra/polynomial.hxx" StaticPolynomial(unsigned int order = 0, double epsilon = 1.0e-14) : BaseType(epsilon) { vigra::throw_precondition_error((order <= MAXORDER), "StaticPolynomial(): order exceeds MAXORDER."); std::fill_n(polynomial_, order+1, T()); this->setCoeffs(polynomial_, order); } StaticPolynomial(StaticPolynomial const & p) : BaseType(p.epsilon()) { std::copy(p.begin(), p.end(), polynomial_); this->setCoeffs(polynomial_, p.order()); } template StaticPolynomial(ITER i, unsigned int order) : BaseType() { vigra::throw_precondition_error((order <= MAXORDER), "StaticPolynomial(): order exceeds MAXORDER."); std::copy(i, i + order + 1, polynomial_); this->setCoeffs(polynomial_, order); } template StaticPolynomial(ITER i, unsigned int order, double epsilon) : BaseType(epsilon) { vigra::throw_precondition_error((order <= MAXORDER), "StaticPolynomial(): order exceeds MAXORDER."); std::copy(i, i + order + 1, polynomial_); this->setCoeffs(polynomial_, order); } StaticPolynomial & operator=(StaticPolynomial const & p) { if(this == &p) return *this; std::copy(p.begin(), p.end(), polynomial_); this->setCoeffs(polynomial_, p.order()); this->epsilon_ = p.epsilon_; return *this; } StaticPolynomial getDerivative(unsigned int n = 1) const { StaticPolynomial res(*this); res.differentiate(n); return res; } StaticPolynomial getDeflated(Real r) const { StaticPolynomial res(*this); res.deflate(r); return res; } StaticPolynomial getDeflated(Complex const & r) const { StaticPolynomial res(this->begin(), this->order(), this->epsilon()); res.deflate(r); return res; } void setOrder(unsigned int order) { vigra::throw_precondition_error((order <= MAXORDER), "taticPolynomial::setOrder(): order exceeds MAXORDER."); this->order_ = order; } protected: T polynomial_[MAXORDER+1]; }; namespace detail { template std::complex complexDiv(std::complex const & a, std::complex const & b) { const double abs_breal = b.real() < 0 ? -b.real() : b.real(); const double abs_bimag = b.imag() < 0 ? -b.imag() : b.imag(); if (abs_breal >= abs_bimag) { if (abs_breal == 0.0) { return std::complex(a.real() / abs_breal, a.imag() / abs_breal); } else { const double ratio = b.imag() / b.real(); const double denom = b.real() + b.imag() * ratio; return std::complex((a.real() + a.imag() * ratio) / denom, (a.imag() - a.real() * ratio) / denom); } } else { const double ratio = b.real() / b.imag(); const double denom = b.real() * ratio + b.imag(); return std::complex((a.real() * ratio + a.imag()) / denom, (a.imag() * ratio - a.real()) / denom); } } template std::complex deleteBelowEpsilon(std::complex const & x, double eps) { return std::abs(x.imag()) <= 2.0*eps*std::abs(x.real()) ? std::complex(x.real()) : std::abs(x.real()) <= 2.0*eps*std::abs(x.imag()) ? std::complex(NumericTraits::zero(), x.imag()) : x; } template typename POLYNOMIAL::value_type laguerreStartingGuess(POLYNOMIAL const & p) { double N = p.order(); typename POLYNOMIAL::value_type centroid = -p[p.order()-1] / N / p[p.order()]; double dist = std::pow(std::abs(p(centroid) / p[p.order()]), 1.0 / N); return centroid + dist; } template int laguerre1Root(POLYNOMIAL const & p, Complex & x, unsigned int multiplicity) { typedef typename NumericTraits::ValueType Real; static double frac[] = {0.0, 0.5, 0.25, 0.75, 0.13, 0.38, 0.62, 0.88, 1.0}; int maxiter = 80, count; double N = p.order(); double eps = p.epsilon(), eps2 = std::sqrt(eps); if(multiplicity == 0) x = laguerreStartingGuess(p); bool mayTryDerivative = true; for(count = 0; count < maxiter; ++count) { Complex p0(p[p.order()]); Complex p1(0.0); Complex p2(0.0); Real ax = std::abs(x); Real err = std::abs(p0); for(int i = p.order()-1; i >= 0; --i) { p2 = p2 * x + p1; p1 = p1 * x + p0; p0 = p0 * x + p[i]; err = err * ax + std::abs(p0); } p2 *= 2.0; err *= eps; Real ap0 = std::abs(p0); if(ap0 <= err) { break; } Complex g = complexDiv(p1, p0); Complex g2 = g * g; Complex h = g2 - complexDiv(p2, p0); if(g2 != 0.0) { multiplicity = (unsigned int)std::floor(N / (std::abs(N * complexDiv(h, g2) - 1.0) + 1.0) + 0.5); if(multiplicity < 1) multiplicity = 1; } if(mayTryDerivative && multiplicity > 1 && ap0 < eps2) { Complex x1 = x; int derivativeMultiplicity = laguerre1Root(p.getDerivative(), x1, multiplicity-1); if(derivativeMultiplicity && std::abs(p(x1)) < std::abs(p(x))) { x = x1; return derivativeMultiplicity + 1; } else { mayTryDerivative = false; } } Complex sq = std::sqrt((N - 1.0) * (N * h - g2)); Complex gp = g + sq; Complex gm = g - sq; if(std::abs(gp) < std::abs(gm)) gp = gm; Complex dx; if(gp != 0.0) { dx = complexDiv(Complex(N) , gp); } else { dx = (1.0 + ax) * Complex(std::cos(double(count)), std::sin(double(count))); } Complex x1 = x - dx; if(x1 - x == 0.0) { break; } if((count + 1) % 10) x = x1; else x = x - frac[(count+1)/10] * dx; } return count < maxiter ? multiplicity : 0; } template struct PolynomialRootCompare { Real epsilon; PolynomialRootCompare(Real eps) : epsilon(eps) {} template bool operator()(T const & l, T const & r) { return closeAtTolerance(l.real(), r.real(), epsilon) ? l.imag() < r.imag() : l.real() < r.real(); } }; } # 939 "../include/vigra/polynomial.hxx" template bool polynomialRoots(POLYNOMIAL const & poriginal, VECTOR & roots, bool polishRoots) { typedef typename POLYNOMIAL::value_type T; typedef typename POLYNOMIAL::Real Real; typedef typename POLYNOMIAL::Complex Complex; typedef typename POLYNOMIAL::ComplexPolynomial WorkPolynomial; double eps = poriginal.epsilon(); WorkPolynomial p(poriginal.begin(), poriginal.order(), eps); p.minimizeOrder(); if(p.order() == 0) return true; Complex x = detail::laguerreStartingGuess(p); unsigned int multiplicity = 1; bool triedConjugate = false; while(p.order() > 2) { p.balance(); multiplicity = detail::laguerre1Root(p, x, multiplicity); if(multiplicity == 0) return false; if(polishRoots && !detail::laguerre1Root(poriginal, x, multiplicity)) return false; x = detail::deleteBelowEpsilon(x, eps); roots.push_back(x); p.deflate(x); if(multiplicity > 1) { --multiplicity; triedConjugate = false; } else { if(x.imag() != 0.0 && !triedConjugate) { triedConjugate = true; x = conj(x); } else { triedConjugate = false; x = detail::laguerreStartingGuess(p); } } } if(p.order() == 2) { Complex a = p[2]; Complex b = p[1]; Complex c = p[0]; Complex b2 = std::sqrt(b*b - 4.0*a*c); Complex q; if((conj(b)*b2).real() >= 0.0) q = -0.5 * (b + b2); else q = -0.5 * (b - b2); x = detail::complexDiv(q, a); if(polishRoots) detail::laguerre1Root(poriginal, x, 1); roots.push_back(detail::deleteBelowEpsilon(x, eps)); x = detail::complexDiv(c, q); if(polishRoots) detail::laguerre1Root(poriginal, x, 1); roots.push_back(detail::deleteBelowEpsilon(x, eps)); } else if(p.order() == 1) { x = detail::complexDiv(-p[0], p[1]); if(polishRoots) detail::laguerre1Root(poriginal, x, 1); roots.push_back(detail::deleteBelowEpsilon(x, eps)); } std::sort(roots.begin(), roots.end(), detail::PolynomialRootCompare(eps)); return true; } template inline bool polynomialRoots(POLYNOMIAL const & poriginal, VECTOR & roots) { return polynomialRoots(poriginal, roots, true); } # 1077 "../include/vigra/polynomial.hxx" template bool polynomialRealRoots(POLYNOMIAL const & p, VECTOR & roots, bool polishRoots) { typedef typename NumericTraits::ComplexPromote Complex; ArrayVector croots; if(!polynomialRoots(p, croots, polishRoots)) return false; for(unsigned int i = 0; i < croots.size(); ++i) if(croots[i].imag() == 0.0) roots.push_back(croots[i].real()); return true; } template inline bool polynomialRealRoots(POLYNOMIAL const & poriginal, VECTOR & roots) { return polynomialRealRoots(poriginal, roots, true); } } namespace std { template ostream & operator<<(ostream & o, vigra::PolynomialView const & p) { for(unsigned int k=0; k < p.order(); ++k) o << p[k] << " "; o << p[p.order()]; return o; } } # 44 "../include/vigra/splines.hxx" 2 # 1 "../include/vigra/fixedpoint.hxx" 1 # 45 "../include/vigra/fixedpoint.hxx" namespace vigra { template class FixedPoint; struct Error_FixedPointTraits_not_specialized_for_this_case; template class FixedPointTraits { public: typedef Error_FixedPointTraits_not_specialized_for_this_case PlusType; typedef Error_FixedPointTraits_not_specialized_for_this_case MinusType; typedef Error_FixedPointTraits_not_specialized_for_this_case MultipliesType; }; template class FixedPointTraits, FixedPoint > { enum { MaxIntBits = (IntBits1 < IntBits2) ? IntBits2 : IntBits1, MaxFracBits = (FracBits1 < FracBits2) ? FracBits2 : FracBits1, PlusMinusIntBits = (MaxIntBits + 1 + MaxFracBits < 32) ? MaxIntBits + 1 : MaxIntBits, MultipliesFracBits = (IntBits1 + IntBits2 < 31) ? (FracBits1 + FracBits2) > (31 - IntBits1 - IntBits2) ? 31 - IntBits1 - IntBits2 : FracBits1 + FracBits2 : 0 }; public: typedef FixedPoint PlusType; typedef FixedPoint MinusType; typedef FixedPoint MultipliesType; }; template struct SquareRootTraits > { enum { SRTotalBits = (IntBits + FracBits + 1) / 2, SRIntBits = (IntBits + 1) / 2, SRFracBits = SRTotalBits - SRIntBits }; public: typedef FixedPoint Type; typedef FixedPoint SquareRootResult; typedef Type SquareRootArgument; }; template struct FixedPoint_overflow_error__More_than_31_bits_requested : staticAssert::AssertBool<(N < 32)> {}; template struct FixedPoint_assignment_error__Target_object_has_too_few_integer_bits : staticAssert::AssertBool {}; enum FixedPointNoShift { FPNoShift }; namespace detail { template struct FPAssignWithRound; template <> struct FPAssignWithRound { template static inline int exec(int v) { return v << (-N); } }; template <> struct FPAssignWithRound { template static inline int exec(int const v) { return (v + (1 << (N - 1))) >> (N); } }; template struct FPMulImplementation; template <> struct FPMulImplementation { template static inline int exec(int l, int r) { return (l * r) << (-N); } }; template <> struct FPMulImplementation { template static inline int exec(int l, int r) { enum { diffl = N / 2, diffr = N - diffl, maskl = (1 << diffl) - 1, maskr = (1 << diffr) - 1 }; int shiftl = l >> diffl; int shiftr = r >> diffr; return shiftl * shiftr + (((l & maskl) * shiftr) >> diffl) + (((r & maskr) * shiftl) >> diffr); } }; } # 217 "../include/vigra/fixedpoint.hxx" template class FixedPoint { public: enum { INT_BITS = IntBits, FRACTIONAL_BITS = FractionalBits, TOTAL_BITS = IntBits + FractionalBits, MAX = (int)(((unsigned)1 << TOTAL_BITS) - 1), ONE = 1 << FractionalBits, ONE_HALF = ONE >> 1, FRACTIONAL_MASK = ONE - 1, INT_MASK = MAX ^ FRACTIONAL_MASK }; Int32 value; FixedPoint() { enum { vigra_assertion_in_line_236 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (FixedPoint_overflow_error__More_than_31_bits_requested<(IntBits + FractionalBits)>))0, 1 ) ) ) }; } explicit FixedPoint(int v) : value(v << FractionalBits) { enum { vigra_assertion_in_line_244 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (FixedPoint_overflow_error__More_than_31_bits_requested<(IntBits + FractionalBits)>))0, 1 ) ) ) }; } FixedPoint(int v, FixedPointNoShift) : value(v) { enum { vigra_assertion_in_line_252 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (FixedPoint_overflow_error__More_than_31_bits_requested<(IntBits + FractionalBits)>))0, 1 ) ) ) }; } explicit FixedPoint(double rhs) : value((int)round(rhs * ONE)) { enum { vigra_assertion_in_line_262 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (FixedPoint_overflow_error__More_than_31_bits_requested<(IntBits + FractionalBits)>))0, 1 ) ) ) }; vigra::throw_precondition_error((abs(rhs * ONE) <= (double)MAX), "FixedPoint(double rhs): Too few integer bits to convert rhs."); } FixedPoint(const FixedPoint &other) : value(other.value) {} template FixedPoint(const FixedPoint &other) : value(detail::FPAssignWithRound<(Frac2 > FractionalBits)>::template exec(other.value)) { enum { vigra_assertion_in_line_280 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (FixedPoint_overflow_error__More_than_31_bits_requested<(IntBits + FractionalBits)>))0, 1 ) ) ) }; enum { vigra_assertion_in_line_281 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (FixedPoint_assignment_error__Target_object_has_too_few_integer_bits<(IntBits >= Int2)>))0, 1 ) ) ) }; } FixedPoint &operator=(int rhs) { vigra::throw_precondition_error((abs(rhs) < (1 << IntBits)), "FixedPoint::operator=(int rhs): Too few integer bits to represent rhs."); value = rhs << FractionalBits; return *this; } FixedPoint &operator=(double rhs) { vigra::throw_precondition_error((abs(rhs) <= ((1 << IntBits) - 1)), "FixedPoint::operator=(double rhs): Too few integer bits to convert rhs."); value = (int)round(rhs * ONE); return *this; } FixedPoint & operator=(const FixedPoint &other) { value = other.value; return *this; } template FixedPoint & operator=(const FixedPoint &other) { enum { vigra_assertion_in_line_322 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (FixedPoint_assignment_error__Target_object_has_too_few_integer_bits<(IntBits >= Int2)>))0, 1 ) ) ) }; value = detail::FPAssignWithRound<(Frac2 > FractionalBits)>::template exec(other.value); return *this; } FixedPoint operator-() const { return FixedPoint(-value, FPNoShift); } FixedPoint & operator++() { value += ONE; return *this; } FixedPoint operator++(int) { FixedPoint old(*this); value += ONE; return old; } FixedPoint & operator--() { value -= ONE; return *this; } FixedPoint operator--(int) { FixedPoint old(*this); value -= ONE; return old; } template FixedPoint & operator+=(const FixedPoint &other) { enum { vigra_assertion_in_line_374 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (FixedPoint_assignment_error__Target_object_has_too_few_integer_bits<(IntBits >= Int2)>))0, 1 ) ) ) }; value += detail::FPAssignWithRound<(Frac2 > FractionalBits)>::template exec(other.value); return *this; } template FixedPoint & operator-=(const FixedPoint &other) { enum { vigra_assertion_in_line_385 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (FixedPoint_assignment_error__Target_object_has_too_few_integer_bits<(IntBits >= Int2)>))0, 1 ) ) ) }; value -= detail::FPAssignWithRound<(Frac2 > FractionalBits)>::template exec(other.value); return *this; } template FixedPoint & operator*=(const FixedPoint &other) { enum { vigra_assertion_in_line_396 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (FixedPoint_assignment_error__Target_object_has_too_few_integer_bits<(IntBits >= Int2)>))0, 1 ) ) ) }; value = detail::FPMulImplementation<(Frac2 > 0)>::template exec(value, other.value); return *this; } }; inline FixedPoint<8, 0> fixedPoint(unsigned char t) { return FixedPoint<8, 0>(t, FPNoShift); } inline FixedPoint<7, 0> fixedPoint(signed char t) { return FixedPoint<7, 0>(t, FPNoShift); } inline FixedPoint<16, 0> fixedPoint(unsigned short t) { return FixedPoint<16, 0>(t, FPNoShift); } inline FixedPoint<15, 0> fixedPoint(signed short t) { return FixedPoint<15, 0>(t, FPNoShift); } inline FixedPoint<31, 0> fixedPoint(int t) { return FixedPoint<31, 0>(t, FPNoShift); } template struct FixedPointCast; # 430 "../include/vigra/fixedpoint.hxx" template <> struct FixedPointCast { template static Int8 cast(FixedPoint v) { return round(v); } }; template <> struct FixedPointCast { template static UInt8 cast(FixedPoint v) { return round(v); } }; template <> struct FixedPointCast { template static Int16 cast(FixedPoint v) { return round(v); } }; template <> struct FixedPointCast { template static UInt16 cast(FixedPoint v) { return round(v); } }; template <> struct FixedPointCast { template static Int32 cast(FixedPoint v) { return round(v); } }; template <> struct FixedPointCast { template static UInt32 cast(FixedPoint v) { return round(v); } }; template <> struct FixedPointCast { template static float cast(FixedPoint v) { return (float)v.value / FixedPoint::ONE; } }; template <> struct FixedPointCast { template static double cast(FixedPoint v) { return (double)v.value / FixedPoint::ONE; } }; # 486 "../include/vigra/fixedpoint.hxx" template TARGET fixed_point_cast(FixedPoint v) { return FixedPointCast::cast(v); } template inline bool operator==(FixedPoint l, FixedPoint r) { enum { MaxFracBits = (FracBits1 < FracBits2) ? FracBits2 : FracBits1 }; return (l.value << (MaxFracBits - FracBits1)) == (r.value << (MaxFracBits - FracBits2)); } template inline bool operator!=(FixedPoint l, FixedPoint r) { enum { MaxFracBits = (FracBits1 < FracBits2) ? FracBits2 : FracBits1 }; return (l.value << (MaxFracBits - FracBits1)) != (r.value << (MaxFracBits - FracBits2)); } template inline bool operator<(FixedPoint l, FixedPoint r) { enum { MaxFracBits = (FracBits1 < FracBits2) ? FracBits2 : FracBits1 }; return (l.value << (MaxFracBits - FracBits1)) < (r.value << (MaxFracBits - FracBits2)); } template inline bool operator<=(FixedPoint l, FixedPoint r) { enum { MaxFracBits = (FracBits1 < FracBits2) ? FracBits2 : FracBits1 }; return (l.value << (MaxFracBits - FracBits1)) <= (r.value << (MaxFracBits - FracBits2)); } template inline bool operator>(FixedPoint l, FixedPoint r) { enum { MaxFracBits = (FracBits1 < FracBits2) ? FracBits2 : FracBits1 }; return (l.value << (MaxFracBits - FracBits1)) > (r.value << (MaxFracBits - FracBits2)); } template inline bool operator>=(FixedPoint l, FixedPoint r) { enum { MaxFracBits = (FracBits1 < FracBits2) ? FracBits2 : FracBits1 }; return (l.value << (MaxFracBits - FracBits1)) >= (r.value << (MaxFracBits - FracBits2)); } template inline typename FixedPointTraits, FixedPoint >::PlusType operator+(FixedPoint l, FixedPoint r) { enum { MaxFracBits = (FracBits1 < FracBits2) ? FracBits2 : FracBits1 }; return typename FixedPointTraits, FixedPoint >:: PlusType((l.value << (MaxFracBits - FracBits1)) + (r.value << (MaxFracBits - FracBits2)), FPNoShift); } template inline void add(FixedPoint l, FixedPoint r, FixedPoint & result) { result = l + r; } template inline typename FixedPointTraits, FixedPoint >::MinusType operator-(FixedPoint l, FixedPoint r) { enum { MaxFracBits = (FracBits1 < FracBits2) ? FracBits2 : FracBits1 }; return typename FixedPointTraits, FixedPoint >:: MinusType((l.value << (MaxFracBits - FracBits1)) - (r.value << (MaxFracBits - FracBits2)), FPNoShift); } template inline void sub(FixedPoint l, FixedPoint r, FixedPoint & result) { result = l - r; } template inline typename FixedPointTraits, FixedPoint >::MultipliesType operator*(FixedPoint l, FixedPoint r) { typename FixedPointTraits, FixedPoint >:: MultipliesType res; mul(l, r, res); return res; } template inline void mul(FixedPoint l, FixedPoint r, FixedPoint & result) { enum { vigra_assertion_in_line_609 = sizeof( staticAssert::check( staticAssert::assertImpl( (void (*) (FixedPoint_assignment_error__Target_object_has_too_few_integer_bits<(IntBits1 + IntBits2 <= IntBits3)>))0, 1 ) ) ) }; enum { diff = FracBits1 + FracBits2 - FracBits3 }; result.value = detail::FPMulImplementation<(diff > 0)>::template exec(l.value, r.value); } template inline typename SquareRootTraits >::SquareRootResult sqrt(FixedPoint v) { return typename SquareRootTraits >::SquareRootResult(sqrti(v.value), FPNoShift); } template inline FixedPoint abs(FixedPoint v) { return FixedPoint(abs(v.value), FPNoShift); } template inline typename FixedPointTraits, FixedPoint >::MultipliesType squaredNorm(FixedPoint v) { return v*v; } template inline FixedPoint norm(FixedPoint const & v) { return abs(v); } template inline FixedPoint<0, FracBits> frac(FixedPoint v) { return FixedPoint<0, FracBits>(v.value & FixedPoint::FRACTIONAL_MASK, FPNoShift); } template inline FixedPoint<0, FracBits> dual_frac(FixedPoint v) { return FixedPoint<0, FracBits>(FixedPoint<0, FracBits>::ONE - (v.value & FixedPoint::FRACTIONAL_MASK), FPNoShift); } template inline int floor(FixedPoint v) { return(v.value >> FracBits); } template inline int ceil(FixedPoint v) { return((v.value + FixedPoint::FRACTIONAL_MASK) >> FracBits); } template inline int round(FixedPoint v) { return((v.value + FixedPoint::ONE_HALF) >> FracBits); } # 764 "../include/vigra/fixedpoint.hxx" template struct NumericTraits > { typedef FixedPoint Type; typedef Type ValueType; typedef VigraFalseType isIntegral; typedef VigraTrueType isScalar; typedef VigraTrueType isSigned; typedef VigraTrueType isOrdered; typedef VigraFalseType isComplex; static Type zero() { return Type(0, FPNoShift); } static Type one() { return Type(Type::ONE, FPNoShift); } static Type nonZero() { return one(); } static Type epsilon() { return Type(1, FPNoShift); } static Type smallestPositive() { return Type(1, FPNoShift); } static Type max() { return Type( Type::MAX, FPNoShift); } static Type min() { return -max(); } }; template struct NormTraits > { typedef FixedPoint Type; typedef typename FixedPointTraits, FixedPoint >::MultipliesType SquaredNormType; typedef Type NormType; }; template struct PromoteTraits, FixedPoint > { typedef typename FixedPointTraits, FixedPoint >::PlusType Promote; }; } # 46 "../include/vigra/splines.hxx" 2 namespace vigra { # 83 "../include/vigra/splines.hxx" template class BSplineBase { public: typedef T value_type; typedef T argument_type; typedef T first_argument_type; typedef unsigned int second_argument_type; typedef T result_type; enum StaticOrder { order = ORDER }; explicit BSplineBase(unsigned int derivativeOrder = 0) : s1_(derivativeOrder) {} result_type operator()(argument_type x) const { return exec(x, derivativeOrder()); } result_type operator()(first_argument_type x, second_argument_type derivative_order) const { return exec(x, derivativeOrder() + derivative_order); } value_type operator[](value_type x) const { return operator()(x); } double radius() const { return (ORDER + 1) * 0.5; } unsigned int derivativeOrder() const { return s1_.derivativeOrder(); } # 158 "../include/vigra/splines.hxx" ArrayVector const & prefilterCoefficients() const { static ArrayVector const & b = calculatePrefilterCoefficients(); return b; } static ArrayVector const & calculatePrefilterCoefficients(); typedef T WeightMatrix[ORDER+1][ORDER+1]; static WeightMatrix & weights() { static WeightMatrix & b = calculateWeightMatrix(); return b; } static WeightMatrix & calculateWeightMatrix(); protected: result_type exec(first_argument_type x, second_argument_type derivative_order) const; BSplineBase s1_; }; template typename BSplineBase::result_type BSplineBase::exec(first_argument_type x, second_argument_type derivative_order) const { if(derivative_order == 0) { T n12 = (ORDER + 1.0) / 2.0; return ((n12 + x) * s1_(x + 0.5) + (n12 - x) * s1_(x - 0.5)) / ORDER; } else { --derivative_order; return s1_(x + 0.5, derivative_order) - s1_(x - 0.5, derivative_order); } } template ArrayVector const & BSplineBase::calculatePrefilterCoefficients() { static ArrayVector b; if(ORDER > 1) { static const int r = ORDER / 2; StaticPolynomial<2*r, double> p(2*r); BSplineBase spline; for(int i = 0; i <= 2*r; ++i) p[i] = spline(T(i-r)); ArrayVector roots; polynomialRealRoots(p, roots); for(unsigned int i = 0; i < roots.size(); ++i) if(std::fabs(roots[i]) < 1.0) b.push_back(roots[i]); } return b; } template typename BSplineBase::WeightMatrix & BSplineBase::calculateWeightMatrix() { static WeightMatrix b; double faculty = 1.0; for(int d = 0; d <= ORDER; ++d) { if(d > 1) faculty *= d; double x = ORDER / 2; BSplineBase spline; for(int i = 0; i <= ORDER; ++i, --x) b[d][i] = spline(x, d) / faculty; } return b; } # 252 "../include/vigra/splines.hxx" template class BSpline : public BSplineBase { public: explicit BSpline(unsigned int derivativeOrder = 0) : BSplineBase(derivativeOrder) {} }; template class BSplineBase<0, T> { public: typedef T value_type; typedef T argument_type; typedef T first_argument_type; typedef unsigned int second_argument_type; typedef T result_type; enum StaticOrder { order = 0 }; explicit BSplineBase(unsigned int derivativeOrder = 0) : derivativeOrder_(derivativeOrder) {} result_type operator()(argument_type x) const { return exec(x, derivativeOrder_); } template FixedPoint operator()(FixedPoint x) const { typedef FixedPoint Value; return x.value < Value::ONE_HALF && -Value::ONE_HALF <= x.value ? Value(Value::ONE, FPNoShift) : Value(0, FPNoShift); } result_type operator()(first_argument_type x, second_argument_type derivative_order) const { return exec(x, derivativeOrder_ + derivative_order); } value_type operator[](value_type x) const { return operator()(x); } double radius() const { return 0.5; } unsigned int derivativeOrder() const { return derivativeOrder_; } ArrayVector const & prefilterCoefficients() const { static ArrayVector b; return b; } typedef T WeightMatrix[1][1]; static WeightMatrix & weights() { static T b[1][1] = {{ 1.0}}; return b; } protected: result_type exec(first_argument_type x, second_argument_type derivative_order) const { if(derivative_order == 0) return x < 0.5 && -0.5 <= x ? 1.0 : 0.0; else return 0.0; } unsigned int derivativeOrder_; }; template class BSpline<1, T> { public: typedef T value_type; typedef T argument_type; typedef T first_argument_type; typedef unsigned int second_argument_type; typedef T result_type; enum StaticOrder { order = 1 }; explicit BSpline(unsigned int derivativeOrder = 0) : derivativeOrder_(derivativeOrder) {} result_type operator()(argument_type x) const { return exec(x, derivativeOrder_); } template FixedPoint operator()(FixedPoint x) const { typedef FixedPoint Value; int v = abs(x.value); return v < Value::ONE ? Value(Value::ONE - v, FPNoShift) : Value(0, FPNoShift); } result_type operator()(first_argument_type x, second_argument_type derivative_order) const { return exec(x, derivativeOrder_ + derivative_order); } value_type operator[](value_type x) const { return operator()(x); } double radius() const { return 1.0; } unsigned int derivativeOrder() const { return derivativeOrder_; } ArrayVector const & prefilterCoefficients() const { static ArrayVector b; return b; } typedef T WeightMatrix[2][2]; static WeightMatrix & weights() { static T b[2][2] = {{ 1.0, 0.0}, {-1.0, 1.0}}; return b; } protected: T exec(T x, unsigned int derivative_order) const; unsigned int derivativeOrder_; }; template T BSpline<1, T>::exec(T x, unsigned int derivative_order) const { switch(derivative_order) { case 0: { x = std::fabs(x); return x < 1.0 ? 1.0 - x : 0.0; } case 1: { return x < 0.0 ? -1.0 <= x ? 1.0 : 0.0 : x < 1.0 ? -1.0 : 0.0; } default: return 0.0; } } template class BSpline<2, T> { public: typedef T value_type; typedef T argument_type; typedef T first_argument_type; typedef unsigned int second_argument_type; typedef T result_type; enum StaticOrder { order = 2 }; explicit BSpline(unsigned int derivativeOrder = 0) : derivativeOrder_(derivativeOrder) {} result_type operator()(argument_type x) const { return exec(x, derivativeOrder_); } template FixedPoint operator()(FixedPoint x) const { typedef FixedPoint Value; enum { ONE_HALF = Value::ONE_HALF, THREE_HALVES = ONE_HALF * 3, THREE_QUARTERS = THREE_HALVES / 2, PREMULTIPLY_SHIFT1 = FracBits <= 16 ? 0 : FracBits - 16, PREMULTIPLY_SHIFT2 = FracBits - 1 <= 16 ? 0 : FracBits - 17, POSTMULTIPLY_SHIFT1 = FracBits - 2*PREMULTIPLY_SHIFT1, POSTMULTIPLY_SHIFT2 = FracBits - 2*PREMULTIPLY_SHIFT2 }; int v = abs(x.value); return v == ONE_HALF ? Value(ONE_HALF, FPNoShift) : v <= ONE_HALF ? Value(THREE_QUARTERS - (int)(sq((unsigned)v >> PREMULTIPLY_SHIFT2) >> POSTMULTIPLY_SHIFT2), FPNoShift) : v < THREE_HALVES ? Value((int)(sq((unsigned)(THREE_HALVES-v) >> PREMULTIPLY_SHIFT1) >> (POSTMULTIPLY_SHIFT1 + 1)), FPNoShift) : Value(0, FPNoShift); } result_type operator()(first_argument_type x, second_argument_type derivative_order) const { return exec(x, derivativeOrder_ + derivative_order); } value_type operator[](value_type x) const { return operator()(x); } double radius() const { return 1.5; } unsigned int derivativeOrder() const { return derivativeOrder_; } ArrayVector const & prefilterCoefficients() const { static ArrayVector b(1, 2.0*1.41421356237309504880 - 3.0); return b; } typedef T WeightMatrix[3][3]; static WeightMatrix & weights() { static T b[3][3] = {{ 0.125, 0.75, 0.125}, {-0.5, 0.0, 0.5}, { 0.5, -1.0, 0.5}}; return b; } protected: result_type exec(first_argument_type x, second_argument_type derivative_order) const; unsigned int derivativeOrder_; }; template typename BSpline<2, T>::result_type BSpline<2, T>::exec(first_argument_type x, second_argument_type derivative_order) const { switch(derivative_order) { case 0: { x = std::fabs(x); return x < 0.5 ? 0.75 - x*x : x < 1.5 ? 0.5 * sq(1.5 - x) : 0.0; } case 1: { return x >= -0.5 ? x <= 0.5 ? -2.0 * x : x < 1.5 ? x - 1.5 : 0.0 : x > -1.5 ? x + 1.5 : 0.0; } case 2: { return x >= -0.5 ? x < 0.5 ? -2.0 : x < 1.5 ? 1.0 : 0.0 : x >= -1.5 ? 1.0 : 0.0; } default: return 0.0; } } template class BSpline<3, T> { public: typedef T value_type; typedef T argument_type; typedef T first_argument_type; typedef unsigned int second_argument_type; typedef T result_type; enum StaticOrder { order = 3 }; explicit BSpline(unsigned int derivativeOrder = 0) : derivativeOrder_(derivativeOrder) {} result_type operator()(argument_type x) const { return exec(x, derivativeOrder_); } template FixedPoint operator()(FixedPoint x) const { typedef FixedPoint Value; enum { ONE = Value::ONE, TWO = 2 * ONE, TWO_THIRDS = TWO / 3, ONE_SIXTH = ONE / 6, PREMULTIPLY_SHIFT = FracBits <= 16 ? 0 : FracBits - 16, POSTMULTIPLY_SHIFT = FracBits - 2*PREMULTIPLY_SHIFT }; int v = abs(x.value); return v == ONE ? Value(ONE_SIXTH, FPNoShift) : v < ONE ? Value(TWO_THIRDS + (((int)(sq((unsigned)v >> PREMULTIPLY_SHIFT) >> (POSTMULTIPLY_SHIFT + PREMULTIPLY_SHIFT)) * (((v >> 1) - ONE) >> PREMULTIPLY_SHIFT)) >> POSTMULTIPLY_SHIFT), FPNoShift) : v < TWO ? Value((int)((sq((unsigned)(TWO-v) >> PREMULTIPLY_SHIFT) >> (POSTMULTIPLY_SHIFT + PREMULTIPLY_SHIFT)) * ((unsigned)(TWO-v) >> PREMULTIPLY_SHIFT) / 6) >> POSTMULTIPLY_SHIFT, FPNoShift) : Value(0, FPNoShift); } result_type operator()(first_argument_type x, second_argument_type derivative_order) const { return exec(x, derivativeOrder_ + derivative_order); } result_type dx(argument_type x) const { return operator()(x, 1); } result_type dxx(argument_type x) const { return operator()(x, 2); } value_type operator[](value_type x) const { return operator()(x); } double radius() const { return 2.0; } unsigned int derivativeOrder() const { return derivativeOrder_; } ArrayVector const & prefilterCoefficients() const { static ArrayVector b(1, std::sqrt(3.0) - 2.0); return b; } typedef T WeightMatrix[4][4]; static WeightMatrix & weights() { static T b[4][4] = {{ 1.0 / 6.0, 2.0 / 3.0, 1.0 / 6.0, 0.0}, {-0.5, 0.0, 0.5, 0.0}, { 0.5, -1.0, 0.5, 0.0}, {-1.0 / 6.0, 0.5, -0.5, 1.0 / 6.0}}; return b; } protected: result_type exec(first_argument_type x, second_argument_type derivative_order) const; unsigned int derivativeOrder_; }; template typename BSpline<3, T>::result_type BSpline<3, T>::exec(first_argument_type x, second_argument_type derivative_order) const { switch(derivative_order) { case 0: { x = std::fabs(x); if(x < 1.0) { return 2.0/3.0 + x*x*(-1.0 + 0.5*x); } else if(x < 2.0) { x = 2.0 - x; return x*x*x/6.0; } else return 0.0; } case 1: { double s = x < 0.0 ? -1.0 : 1.0; x = std::fabs(x); return x < 1.0 ? s*x*(-2.0 + 1.5*x) : x < 2.0 ? -0.5*s*sq(2.0 - x) : 0.0; } case 2: { x = std::fabs(x); return x < 1.0 ? 3.0*x - 2.0 : x < 2.0 ? 2.0 - x : 0.0; } case 3: { return x < 0.0 ? x < -1.0 ? x < -2.0 ? 0.0 : 1.0 : -3.0 : x < 1.0 ? 3.0 : x < 2.0 ? -1.0 : 0.0; } default: return 0.0; } } typedef BSpline<3, double> CubicBSplineKernel; template class BSpline<5, T> { public: typedef T value_type; typedef T argument_type; typedef T first_argument_type; typedef unsigned int second_argument_type; typedef T result_type; enum StaticOrder { order = 5 }; explicit BSpline(unsigned int derivativeOrder = 0) : derivativeOrder_(derivativeOrder) {} result_type operator()(argument_type x) const { return exec(x, derivativeOrder_); } result_type operator()(first_argument_type x, second_argument_type derivative_order) const { return exec(x, derivativeOrder_ + derivative_order); } result_type dx(argument_type x) const { return operator()(x, 1); } result_type dxx(argument_type x) const { return operator()(x, 2); } result_type dx3(argument_type x) const { return operator()(x, 3); } result_type dx4(argument_type x) const { return operator()(x, 4); } value_type operator[](value_type x) const { return operator()(x); } double radius() const { return 3.0; } unsigned int derivativeOrder() const { return derivativeOrder_; } ArrayVector const & prefilterCoefficients() const { static ArrayVector const & b = initPrefilterCoefficients(); return b; } static ArrayVector const & initPrefilterCoefficients() { static ArrayVector b(2); b[0] = -0.43057534709997114; b[1] = -0.043096288203264652; return b; } typedef T WeightMatrix[6][6]; static WeightMatrix & weights() { static T b[6][6] = {{ 1.0/120.0, 13.0/60.0, 11.0/20.0, 13.0/60.0, 1.0/120.0, 0.0}, {-1.0/24.0, -5.0/12.0, 0.0, 5.0/12.0, 1.0/24.0, 0.0}, { 1.0/12.0, 1.0/6.0, -0.5, 1.0/6.0, 1.0/12.0, 0.0}, {-1.0/12.0, 1.0/6.0, 0.0, -1.0/6.0, 1.0/12.0, 0.0}, { 1.0/24.0, -1.0/6.0, 0.25, -1.0/6.0, 1.0/24.0, 0.0}, {-1.0/120.0, 1.0/24.0, -1.0/12.0, 1.0/12.0, -1.0/24.0, 1.0/120.0}}; return b; } protected: result_type exec(first_argument_type x, second_argument_type derivative_order) const; unsigned int derivativeOrder_; }; template typename BSpline<5, T>::result_type BSpline<5, T>::exec(first_argument_type x, second_argument_type derivative_order) const { switch(derivative_order) { case 0: { x = std::fabs(x); if(x <= 1.0) { return 0.55 + x*x*(-0.5 + x*x*(0.25 - x/12.0)); } else if(x < 2.0) { return 17.0/40.0 + x*(0.625 + x*(-1.75 + x*(1.25 + x*(-0.375 + x/24.0)))); } else if(x < 3.0) { x = 3.0 - x; return x*sq(x*x) / 120.0; } else return 0.0; } case 1: { double s = x < 0.0 ? -1.0 : 1.0; x = std::fabs(x); if(x <= 1.0) { return s*x*(-1.0 + x*x*(1.0 - 5.0/12.0*x)); } else if(x < 2.0) { return s*(0.625 + x*(-3.5 + x*(3.75 + x*(-1.5 + 5.0/24.0*x)))); } else if(x < 3.0) { x = 3.0 - x; return s*sq(x*x) / -24.0; } else return 0.0; } case 2: { x = std::fabs(x); if(x <= 1.0) { return -1.0 + x*x*(3.0 -5.0/3.0*x); } else if(x < 2.0) { return -3.5 + x*(7.5 + x*(-4.5 + 5.0/6.0*x)); } else if(x < 3.0) { x = 3.0 - x; return x*x*x / 6.0; } else return 0.0; } case 3: { double s = x < 0.0 ? -1.0 : 1.0; x = std::fabs(x); if(x <= 1.0) { return s*x*(6.0 - 5.0*x); } else if(x < 2.0) { return s*(7.5 + x*(-9.0 + 2.5*x)); } else if(x < 3.0) { x = 3.0 - x; return -0.5*s*x*x; } else return 0.0; } case 4: { x = std::fabs(x); if(x <= 1.0) { return 6.0 - 10.0*x; } else if(x < 2.0) { return -9.0 + 5.0*x; } else if(x < 3.0) { return 3.0 - x; } else return 0.0; } case 5: { return x < 0.0 ? x < -2.0 ? x < -3.0 ? 0.0 : 1.0 : x < -1.0 ? -5.0 : 10.0 : x < 2.0 ? x < 1.0 ? -10.0 : 5.0 : x < 3.0 ? -1.0 : 0.0; } default: return 0.0; } } typedef BSpline<5, double> QuinticBSplineKernel; # 960 "../include/vigra/splines.hxx" template class CatmullRomSpline { public: typedef T value_type; typedef T argument_type; typedef T result_type; enum StaticOrder { order = 3 }; result_type operator()(argument_type x) const; T operator[] (T x) const { return operator()(x); } int radius() const {return 2;} unsigned int derivativeOrder() const { return 0; } ArrayVector const & prefilterCoefficients() const { static ArrayVector b; return b; } }; template typename CatmullRomSpline::result_type CatmullRomSpline::operator()(argument_type x) const { x = std::fabs(x); if (x <= 1.0) { return 1.0 + x * x * (-2.5 + 1.5 * x); } else if (x >= 2.0) { return 0.0; } else { return 2.0 + x * (-4.0 + x * (2.5 - 0.5 * x)); } } } # 49 "../include/vigra/resizeimage.hxx" 2 namespace vigra { # 81 "../include/vigra/resizeimage.hxx" template class CoscotFunction { public: typedef T value_type; typedef T argument_type; typedef T result_type; CoscotFunction(unsigned int m = 3, double h = 0.5) : m_(m), h_(h) {} result_type operator()(argument_type x) const { return x == 0.0 ? 1.0 : abs(x) < m_ ? std::sin(3.14159265358979323846*x) / std::tan(3.14159265358979323846 * x / 2.0 / m_) * (h_ + (1.0 - h_) * std::cos(3.14159265358979323846 * x / m_)) / 2.0 / m_ : 0.0; } value_type operator[](value_type x) const { return operator()(x); } double radius() const { return m_; } unsigned int derivativeOrder() const { return 0; } ArrayVector const & prefilterCoefficients() const { static ArrayVector b; return b; } protected: unsigned int m_; double h_; }; # 161 "../include/vigra/resizeimage.hxx" template void resizeLineNoInterpolation(SrcIterator i1, SrcIterator iend, SrcAccessor as, DestIterator id, DestIterator idend, DestAccessor ad) { int wold = iend - i1; int wnew = idend - id; if((wold <= 1) || (wnew <= 1)) return; ad.set(as(i1), id); ++id; --iend, --idend; ad.set(as(iend), idend); double dx = (double)(wold - 1) / (wnew - 1); double x = dx; for(; id != idend; ++id, x += dx) { if(x >= 1.0) { int xx = (int)x; i1 += xx; x -= (double)xx; } ad.set(as(i1), id); } } # 274 "../include/vigra/resizeimage.hxx" template void resizeImageNoInterpolation(SrcIterator is, SrcIterator iend, SrcAccessor sa, DestIterator id, DestIterator idend, DestAccessor da) { int w = iend.x - is.x; int h = iend.y - is.y; int wnew = idend.x - id.x; int hnew = idend.y - id.y; vigra::throw_precondition_error(((w > 1) && (h > 1)), "resizeImageNoInterpolation(): " "Source image to small.\n"); vigra::throw_precondition_error(((wnew > 1) && (hnew > 1)), "resizeImageNoInterpolation(): " "Destination image to small.\n"); typedef BasicImage TmpImage; typedef typename TmpImage::traverser TmpImageIterator; TmpImage tmp(w, hnew); TmpImageIterator yt = tmp.upperLeft(); for(int x=0; x inline void resizeImageNoInterpolation(triple src, triple dest) { resizeImageNoInterpolation(src.first, src.second, src.third, dest.first, dest.second, dest.third); } template void resizeLineLinearInterpolation(SrcIterator i1, SrcIterator iend, SrcAccessor as, DestIterator id, DestIterator idend, DestAccessor ad) { int wold = iend - i1; int wnew = idend - id; if((wold <= 1) || (wnew <= 1)) return; typedef NumericTraits DestTraits; ad.set(DestTraits::fromRealPromote(as(i1)), id); ++id; --iend, --idend; ad.set(DestTraits::fromRealPromote(as(iend)), idend); double dx = (double)(wold - 1) / (wnew - 1); double x = dx; for(; id != idend; ++id, x += dx) { if(x >= 1.0) { int xx = (int)x; i1 += xx; x -= (double)xx; } double x1 = 1.0 - x; ad.set(DestTraits::fromRealPromote(x1 * as(i1) + x * as(i1, 1)), id); } } # 466 "../include/vigra/resizeimage.hxx" template void resizeImageLinearInterpolation(SrcIterator is, SrcIterator iend, SrcAccessor sa, DestIterator id, DestIterator idend, DestAccessor da) { int w = iend.x - is.x; int h = iend.y - is.y; int wnew = idend.x - id.x; int hnew = idend.y - id.y; vigra::throw_precondition_error(((w > 1) && (h > 1)), "resizeImageLinearInterpolation(): " "Source image to small.\n"); vigra::throw_precondition_error(((wnew > 1) && (hnew > 1)), "resizeImageLinearInterpolation(): " "Destination image to small.\n"); double const scale = 2.0; typedef typename SrcAccessor::value_type SRCVT; typedef typename NumericTraits::RealPromote TMPTYPE; typedef BasicImage TmpImage; typedef typename TmpImage::traverser TmpImageIterator; BasicImage tmp(w, hnew); BasicImage line((h > w) ? h : w, 1); int x,y; typename BasicImage::Iterator yt = tmp.upperLeft(); typename TmpImageIterator::row_iterator lt = line.upperLeft().rowIterator(); for(x=0; x inline void resizeImageLinearInterpolation(triple src, triple dest) { resizeImageLinearInterpolation(src.first, src.second, src.third, dest.first, dest.second, dest.third); } # 668 "../include/vigra/resizeimage.hxx" template void resizeImageSplineInterpolation( SrcIterator src_iter, SrcIterator src_iter_end, SrcAccessor src_acc, DestIterator dest_iter, DestIterator dest_iter_end, DestAccessor dest_acc, SPLINE const & spline) { int width_old = src_iter_end.x - src_iter.x; int height_old = src_iter_end.y - src_iter.y; int width_new = dest_iter_end.x - dest_iter.x; int height_new = dest_iter_end.y - dest_iter.y; vigra::throw_precondition_error(((width_old > 1) && (height_old > 1)), "resizeImageSplineInterpolation(): " "Source image to small.\n"); vigra::throw_precondition_error(((width_new > 1) && (height_new > 1)), "resizeImageSplineInterpolation(): " "Destination image to small.\n"); Rational xratio(width_new - 1, width_old - 1); Rational yratio(height_new - 1, height_old - 1); Rational offset(0); resampling_detail::MapTargetToSourceCoordinate xmapCoordinate(xratio, offset); resampling_detail::MapTargetToSourceCoordinate ymapCoordinate(yratio, offset); int xperiod = lcm(xratio.numerator(), xratio.denominator()); int yperiod = lcm(yratio.numerator(), yratio.denominator()); double const scale = 2.0; typedef typename SrcAccessor::value_type SRCVT; typedef typename NumericTraits::RealPromote TMPTYPE; typedef BasicImage TmpImage; typedef typename TmpImage::traverser TmpImageIterator; BasicImage tmp(width_old, height_new); BasicImage line((height_old > width_old) ? height_old : width_old, 1); typename BasicImage::Accessor tmp_acc = tmp.accessor(); ArrayVector const & prefilterCoeffs = spline.prefilterCoefficients(); int x,y; ArrayVector > kernels(yperiod); createResamplingKernels(spline, ymapCoordinate, kernels); typename BasicImage::Iterator y_tmp = tmp.upperLeft(); typename TmpImageIterator::row_iterator line_tmp = line.upperLeft().rowIterator(); for(x=0; x= height_old) { resamplingConvolveLine(c_src, c_src + height_old, src_acc, c_tmp, c_tmp + height_new, tmp_acc, kernels, ymapCoordinate); } else { recursiveSmoothLine(c_src, c_src + height_old, src_acc, line_tmp, line.accessor(), (double)height_old/height_new/scale); resamplingConvolveLine(line_tmp, line_tmp + height_old, line.accessor(), c_tmp, c_tmp + height_new, tmp_acc, kernels, ymapCoordinate); } } else { recursiveFilterLine(c_src, c_src + height_old, src_acc, line_tmp, line.accessor(), prefilterCoeffs[0], BORDER_TREATMENT_REFLECT); for(unsigned int b = 1; b < prefilterCoeffs.size(); ++b) { recursiveFilterLine(line_tmp, line_tmp + height_old, line.accessor(), line_tmp, line.accessor(), prefilterCoeffs[b], BORDER_TREATMENT_REFLECT); } if(height_new < height_old) { recursiveSmoothLine(line_tmp, line_tmp + height_old, line.accessor(), line_tmp, line.accessor(), (double)height_old/height_new/scale); } resamplingConvolveLine(line_tmp, line_tmp + height_old, line.accessor(), c_tmp, c_tmp + height_new, tmp_acc, kernels, ymapCoordinate); } } y_tmp = tmp.upperLeft(); DestIterator dest = dest_iter; kernels.resize(xperiod); createResamplingKernels(spline, xmapCoordinate, kernels); for(y=0; y < height_new; ++y, ++y_tmp.y, ++dest_iter.y) { typename DestIterator::row_iterator r_dest = dest_iter.rowIterator(); typename TmpImageIterator::row_iterator r_tmp = y_tmp.rowIterator(); if(prefilterCoeffs.size() == 0) { if(width_new >= width_old) { resamplingConvolveLine(r_tmp, r_tmp + width_old, tmp.accessor(), r_dest, r_dest + width_new, dest_acc, kernels, xmapCoordinate); } else { recursiveSmoothLine(r_tmp, r_tmp + width_old, tmp.accessor(), line_tmp, line.accessor(), (double)width_old/width_new/scale); resamplingConvolveLine(line_tmp, line_tmp + width_old, line.accessor(), r_dest, r_dest + width_new, dest_acc, kernels, xmapCoordinate); } } else { recursiveFilterLine(r_tmp, r_tmp + width_old, tmp.accessor(), line_tmp, line.accessor(), prefilterCoeffs[0], BORDER_TREATMENT_REFLECT); for(unsigned int b = 1; b < prefilterCoeffs.size(); ++b) { recursiveFilterLine(line_tmp, line_tmp + width_old, line.accessor(), line_tmp, line.accessor(), prefilterCoeffs[b], BORDER_TREATMENT_REFLECT); } if(width_new < width_old) { recursiveSmoothLine(line_tmp, line_tmp + width_old, line.accessor(), line_tmp, line.accessor(), (double)width_old/width_new/scale); } resamplingConvolveLine(line_tmp, line_tmp + width_old, line.accessor(), r_dest, r_dest + width_new, dest_acc, kernels, xmapCoordinate); } } } template inline void resizeImageSplineInterpolation(triple src, triple dest, SPLINE const & spline) { resizeImageSplineInterpolation(src.first, src.second, src.third, dest.first, dest.second, dest.third, spline); } template void resizeImageSplineInterpolation(SrcIterator is, SrcIterator iend, SrcAccessor sa, DestIterator id, DestIterator idend, DestAccessor da) { resizeImageSplineInterpolation(is, iend, sa, id, idend, da, BSpline<3, double>()); } template inline void resizeImageSplineInterpolation(triple src, triple dest) { resizeImageSplineInterpolation(src.first, src.second, src.third, dest.first, dest.second, dest.third); } # 894 "../include/vigra/resizeimage.hxx" template void resizeImageCatmullRomInterpolation(SrcIterator src_iter, SrcIterator src_iter_end, SrcAccessor src_acc, DestIterator dest_iter, DestIterator dest_iter_end, DestAccessor dest_acc) { resizeImageSplineInterpolation(src_iter, src_iter_end, src_acc, dest_iter, dest_iter_end, dest_acc, CatmullRomSpline()); } template inline void resizeImageCatmullRomInterpolation(triple src, triple dest) { resizeImageCatmullRomInterpolation(src.first, src.second, src.third, dest.first, dest.second, dest.third); } # 998 "../include/vigra/resizeimage.hxx" template void resizeImageCoscotInterpolation(SrcIterator src_iter, SrcIterator src_iter_end, SrcAccessor src_acc, DestIterator dest_iter, DestIterator dest_iter_end, DestAccessor dest_acc) { resizeImageSplineInterpolation(src_iter, src_iter_end, src_acc, dest_iter, dest_iter_end, dest_acc, CoscotFunction()); } template inline void resizeImageCoscotInterpolation(triple src, triple dest) { resizeImageCoscotInterpolation(src.first, src.second, src.third, dest.first, dest.second, dest.third); } # 1398 "../include/vigra/resizeimage.hxx" } # 94 "../include/vigra/stdimagefunctions.hxx" 2 # 43 "../include/vigra/nonlineardiffusion.hxx" 2 namespace vigra { template void internalNonlinearDiffusionDiagonalSolver( SrcIterator sbegin, SrcIterator send, SrcAccessor sa, CoeffIterator diag, CoeffIterator upper, CoeffIterator lower, DestIterator dbegin) { int w = send - sbegin - 1; int i; for(i=0; i=0; --i) { dbegin[i] = (dbegin[i] - upper[i] * dbegin[i+1]) / diag[i]; } } template void internalNonlinearDiffusionAOSStep( SrcIterator sul, SrcIterator slr, SrcAccessor as, WeightIterator wul, WeightAccessor aw, DestIterator dul, DestAccessor ad, double timestep) { typedef typename NumericTraits::RealPromote DestType; typedef typename NumericTraits::RealPromote WeightType; int w = slr.x - sul.x; int h = slr.y - sul.y; int d = (w < h) ? h : w; std::vector lower(d), diag(d), upper(d); std::vector res(d); int x,y; WeightType one = NumericTraits::one(); SrcIterator ys = sul; WeightIterator yw = wul; DestIterator yd = dul; for(y=0; y void nonlinearDiffusion(SrcIterator sul, SrcIterator slr, SrcAccessor as, DestIterator dul, DestAccessor ad, DiffusivityFunc const & weight, double scale) { vigra::throw_precondition_error((scale > 0.0), "nonlinearDiffusion(): scale must be > 0"); double total_time = scale*scale/2.0; static const double time_step = 5.0; int number_of_steps = (int)(total_time / time_step); double rest_time = total_time - time_step * number_of_steps; Size2D size(slr.x - sul.x, slr.y - sul.y); typedef typename NumericTraits::RealPromote TmpType; typedef typename DiffusivityFunc::value_type WeightType; BasicImage smooth1(size); BasicImage smooth2(size); BasicImage weights(size); typename BasicImage::Iterator s1 = smooth1.upperLeft(), s2 = smooth2.upperLeft(); typename BasicImage::Accessor a = smooth1.accessor(); typename BasicImage::Iterator wi = weights.upperLeft(); typename BasicImage::Accessor wa = weights.accessor(); gradientBasedTransform(sul, slr, as, wi, wa, weight); internalNonlinearDiffusionAOSStep(sul, slr, as, wi, wa, s1, a, rest_time); for(int i = 0; i < number_of_steps; ++i) { gradientBasedTransform(s1, s1+size, a, wi, wa, weight); internalNonlinearDiffusionAOSStep(s1, s1+size, a, wi, wa, s2, a, time_step); std::swap(s1, s2); } copyImage(s1, s1+size, a, dul, ad); } template inline void nonlinearDiffusion( triple src, pair dest, DiffusivityFunc const & weight, double scale) { nonlinearDiffusion(src.first, src.second, src.third, dest.first, dest.second, weight, scale); } template void internalNonlinearDiffusionExplicitStep( SrcIterator sul, SrcIterator slr, SrcAccessor as, WeightIterator wul, WeightAccessor aw, DestIterator dul, DestAccessor ad, double time_step) { typedef typename NumericTraits::RealPromote SumType; typedef typename NumericTraits::RealPromote WeightType; int w = slr.x - sul.x; int h = slr.y - sul.y; int x,y; static const Diff2D left(-1, 0); static const Diff2D right(1, 0); static const Diff2D top(0, -1); static const Diff2D bottom(0, 1); WeightType gt, gb, gl, gr, g0; WeightType one = NumericTraits::one(); SumType sum; time_step /= 2.0; SrcIterator ys = sul; WeightIterator yw = wul; DestIterator yd = dul; SrcIterator xs = ys; WeightIterator xw = yw; DestIterator xd = yd; gt = (aw(xw) + aw(xw, bottom)) * time_step; gb = (aw(xw) + aw(xw, bottom)) * time_step; gl = (aw(xw) + aw(xw, right)) * time_step; gr = (aw(xw) + aw(xw, right)) * time_step; g0 = one - gt - gb - gr - gl; sum = g0 * as(xs); sum += gt * as(xs, bottom); sum += gb * as(xs, bottom); sum += gl * as(xs, right); sum += gr * as(xs, right); ad.set(sum, xd); for(x=2, ++xs.x, ++xd.x, ++xw.x; x void nonlinearDiffusionExplicit(SrcIterator sul, SrcIterator slr, SrcAccessor as, DestIterator dul, DestAccessor ad, DiffusivityFunc const & weight, double scale) { vigra::throw_precondition_error((scale > 0.0), "nonlinearDiffusionExplicit(): scale must be > 0"); double total_time = scale*scale/2.0; static const double time_step = 0.25; int number_of_steps = total_time / time_step; double rest_time = total_time - time_step * number_of_steps; Size2D size(slr.x - sul.x, slr.y - sul.y); typedef typename NumericTraits::RealPromote TmpType; typedef typename DiffusivityFunc::value_type WeightType; BasicImage smooth1(size); BasicImage smooth2(size); BasicImage weights(size); typename BasicImage::Iterator s1 = smooth1.upperLeft(), s2 = smooth2.upperLeft(); typename BasicImage::Accessor a = smooth1.accessor(); typename BasicImage::Iterator wi = weights.upperLeft(); typename BasicImage::Accessor wa = weights.accessor(); gradientBasedTransform(sul, slr, as, wi, wa, weight); internalNonlinearDiffusionExplicitStep(sul, slr, as, wi, wa, s1, a, rest_time); for(int i = 0; i < number_of_steps; ++i) { gradientBasedTransform(s1, s1+size, a, wi, wa, weight); internalNonlinearDiffusionExplicitStep(s1, s1+size, a, wi, wa, s2, a, time_step); swap(s1, s2); } copyImage(s1, s1+size, a, dul, ad); } template inline void nonlinearDiffusionExplicit( triple src, pair dest, DiffusivityFunc const & weight, double scale) { nonlinearDiffusionExplicit(src.first, src.second, src.third, dest.first, dest.second, weight, scale); } # 643 "../include/vigra/nonlineardiffusion.hxx" template class DiffusivityFunctor { public: typedef Value first_argument_type; typedef Value second_argument_type; typedef typename NumericTraits::RealPromote result_type; typedef Value value_type; DiffusivityFunctor(Value const & thresh) : weight_(thresh*thresh), one_(NumericTraits::one()), zero_(NumericTraits::zero()) {} result_type operator()(first_argument_type const & gx, second_argument_type const & gy) const { Value mag = (gx*gx + gy*gy) / weight_; return (mag == zero_) ? one_ : one_ - std::exp(-3.315 / mag / mag); } result_type operator()(RGBValue const & gx, RGBValue const & gy) const { result_type mag = (gx.red()*gx.red() + gx.green()*gx.green() + gx.blue()*gx.blue() + gy.red()*gy.red() + gy.green()*gy.green() + gy.blue()*gy.blue()) / weight_; return (mag == zero_) ? one_ : one_ - std::exp(-3.315 / mag / mag); } result_type weight_; result_type one_; result_type zero_; }; template class FunctorTraits > : public FunctorTraitsBase > { public: typedef VigraTrueType isBinaryFunctor; }; } # 46 "../include/vigra/convolution.hxx" 2 # 209 "../include/vigra/convolution.hxx" namespace vigra { # 289 "../include/vigra/convolution.hxx" template void convolveImage(SrcIterator supperleft, SrcIterator slowerright, SrcAccessor sa, DestIterator dupperleft, DestAccessor da, Kernel1D const & kx, Kernel1D const & ky) { typedef typename NumericTraits::RealPromote TmpType; BasicImage tmp(slowerright - supperleft); separableConvolveX(srcIterRange(supperleft, slowerright, sa), destImage(tmp), kernel1d(kx)); separableConvolveY(srcImageRange(tmp), destIter(dupperleft, da), kernel1d(ky)); } template inline void convolveImage(triple src, pair dest, Kernel1D const & kx, Kernel1D const & ky) { convolveImage(src.first, src.second, src.third, dest.first, dest.second, kx, ky); } # 391 "../include/vigra/convolution.hxx" template void simpleSharpening(SrcIterator src_ul, SrcIterator src_lr, SrcAccessor src_acc, DestIterator dest_ul, DestAccessor dest_acc, double sharpening_factor) { vigra::throw_precondition_error((sharpening_factor >= 0.0), "simpleSharpening(): amount of sharpening must be >= 0."); Kernel2D kernel; kernel.initExplicitly(Diff2D(-1,-1), Diff2D(1,1)) = -sharpening_factor/16.0, -sharpening_factor/8.0, -sharpening_factor/16.0, -sharpening_factor/8.0, 1.0+sharpening_factor*0.75, -sharpening_factor/8.0, -sharpening_factor/16.0, -sharpening_factor/8.0, -sharpening_factor/16.0; convolveImage(src_ul, src_lr, src_acc, dest_ul, dest_acc, kernel.center(), kernel.accessor(), kernel.upperLeft(), kernel.lowerRight() , BORDER_TREATMENT_REFLECT ); } template inline void simpleSharpening(triple src, pair dest, double sharpening_factor) { simpleSharpening(src.first, src.second, src.third, dest.first, dest.second, sharpening_factor); } # 489 "../include/vigra/convolution.hxx" template void gaussianSharpening(SrcIterator src_ul, SrcIterator src_lr, SrcAccessor src_acc, DestIterator dest_ul, DestAccessor dest_acc, double sharpening_factor, double scale) { vigra::throw_precondition_error((sharpening_factor >= 0.0), "gaussianSharpening(): amount of sharpening must be >= 0"); vigra::throw_precondition_error((scale >= 0.0), "gaussianSharpening(): scale parameter should be >= 0."); typedef typename NumericTraits::RealPromote ValueType; BasicImage tmp(src_lr - src_ul); gaussianSmoothing(src_ul, src_lr, src_acc, tmp.upperLeft(), tmp.accessor(), scale); SrcIterator i_src = src_ul; DestIterator i_dest = dest_ul; typename BasicImage::traverser tmp_ul = tmp.upperLeft(); typename BasicImage::traverser i_tmp = tmp_ul; typename BasicImage::Accessor tmp_acc = tmp.accessor(); for(; i_src.y != src_lr.y ; i_src.y++, i_dest.y++, i_tmp.y++ ) { for (;i_src.x != src_lr.x ; i_src.x++, i_dest.x++, i_tmp.x++ ) { dest_acc.set((1.0 + sharpening_factor)*src_acc(i_src) - sharpening_factor*tmp_acc(i_tmp), i_dest); } i_src.x = src_ul.x; i_dest.x = dest_ul.x; i_tmp.x = tmp_ul.x; } } template void gaussianSharpening(triple src, pair dest, double sharpening_factor, double scale) { gaussianSharpening(src.first, src.second, src.third, dest.first, dest.second, sharpening_factor, scale); } # 593 "../include/vigra/convolution.hxx" template void gaussianSmoothing(SrcIterator supperleft, SrcIterator slowerright, SrcAccessor sa, DestIterator dupperleft, DestAccessor da, double scale) { typedef typename NumericTraits::RealPromote TmpType; BasicImage tmp(slowerright - supperleft); Kernel1D smooth; smooth.initGaussian(scale); smooth.setBorderTreatment(BORDER_TREATMENT_REFLECT); separableConvolveX(srcIterRange(supperleft, slowerright, sa), destImage(tmp), kernel1d(smooth)); separableConvolveY(srcImageRange(tmp), destIter(dupperleft, da), kernel1d(smooth)); } template inline void gaussianSmoothing(triple src, pair dest, double scale) { gaussianSmoothing(src.first, src.second, src.third, dest.first, dest.second, scale); } # 707 "../include/vigra/convolution.hxx" template void gaussianGradient(SrcIterator supperleft, SrcIterator slowerright, SrcAccessor sa, DestIteratorX dupperleftx, DestAccessorX dax, DestIteratorY dupperlefty, DestAccessorY day, double scale) { typedef typename NumericTraits::RealPromote TmpType; BasicImage tmp(slowerright - supperleft); Kernel1D smooth, grad; smooth.initGaussian(scale); grad.initGaussianDerivative(scale, 1); separableConvolveX(srcIterRange(supperleft, slowerright, sa), destImage(tmp), kernel1d(grad)); separableConvolveY(srcImageRange(tmp), destIter(dupperleftx, dax), kernel1d(smooth)); separableConvolveX(srcIterRange(supperleft, slowerright, sa), destImage(tmp), kernel1d(smooth)); separableConvolveY(srcImageRange(tmp), destIter(dupperlefty, day), kernel1d(grad)); } template void gaussianGradient(SrcIterator supperleft, SrcIterator slowerright, SrcAccessor src, DestIterator dupperleft, DestAccessor dest, double scale) { VectorElementAccessor gradx(0, dest), grady(1, dest); gaussianGradient(supperleft, slowerright, src, dupperleft, gradx, dupperleft, grady, scale); } template inline void gaussianGradient(triple src, pair destx, pair desty, double scale) { gaussianGradient(src.first, src.second, src.third, destx.first, destx.second, desty.first, desty.second, scale); } template inline void gaussianGradient(triple src, pair dest, double scale) { gaussianGradient(src.first, src.second, src.third, dest.first, dest.second, scale); } # 827 "../include/vigra/convolution.hxx" template void laplacianOfGaussian(SrcIterator supperleft, SrcIterator slowerright, SrcAccessor sa, DestIterator dupperleft, DestAccessor da, double scale) { typedef typename NumericTraits::RealPromote TmpType; BasicImage tmp(slowerright - supperleft), tmpx(slowerright - supperleft), tmpy(slowerright - supperleft); Kernel1D smooth, deriv; smooth.initGaussian(scale); deriv.initGaussianDerivative(scale, 2); separableConvolveX(srcIterRange(supperleft, slowerright, sa), destImage(tmp), kernel1d(deriv)); separableConvolveY(srcImageRange(tmp), destImage(tmpx), kernel1d(smooth)); separableConvolveX(srcIterRange(supperleft, slowerright, sa), destImage(tmp), kernel1d(smooth)); separableConvolveY(srcImageRange(tmp), destImage(tmpy), kernel1d(deriv)); combineTwoImages(srcImageRange(tmpx), srcImage(tmpy), destIter(dupperleft, da), std::plus()); } template inline void laplacianOfGaussian(triple src, pair dest, double scale) { laplacianOfGaussian(src.first, src.second, src.third, dest.first, dest.second, scale); } # 949 "../include/vigra/convolution.hxx" template void hessianMatrixOfGaussian(SrcIterator supperleft, SrcIterator slowerright, SrcAccessor sa, DestIteratorX dupperleftx, DestAccessorX dax, DestIteratorXY dupperleftxy, DestAccessorXY daxy, DestIteratorY dupperlefty, DestAccessorY day, double scale) { typedef typename NumericTraits::RealPromote TmpType; BasicImage tmp(slowerright - supperleft); Kernel1D smooth, deriv1, deriv2; smooth.initGaussian(scale); deriv1.initGaussianDerivative(scale, 1); deriv2.initGaussianDerivative(scale, 2); separableConvolveX(srcIterRange(supperleft, slowerright, sa), destImage(tmp), kernel1d(deriv2)); separableConvolveY(srcImageRange(tmp), destIter(dupperleftx, dax), kernel1d(smooth)); separableConvolveX(srcIterRange(supperleft, slowerright, sa), destImage(tmp), kernel1d(smooth)); separableConvolveY(srcImageRange(tmp), destIter(dupperlefty, day), kernel1d(deriv2)); separableConvolveX(srcIterRange(supperleft, slowerright, sa), destImage(tmp), kernel1d(deriv1)); separableConvolveY(srcImageRange(tmp), destIter(dupperleftxy, daxy), kernel1d(deriv1)); } template inline void hessianMatrixOfGaussian(triple src, pair destx, pair destxy, pair desty, double scale) { hessianMatrixOfGaussian(src.first, src.second, src.third, destx.first, destx.second, destxy.first, destxy.second, desty.first, desty.second, scale); } # 1088 "../include/vigra/convolution.hxx" template void structureTensor(SrcIterator supperleft, SrcIterator slowerright, SrcAccessor sa, DestIteratorX dupperleftx, DestAccessorX dax, DestIteratorXY dupperleftxy, DestAccessorXY daxy, DestIteratorY dupperlefty, DestAccessorY day, double inner_scale, double outer_scale) { typedef typename NumericTraits::RealPromote TmpType; BasicImage tmp(slowerright - supperleft), tmpx(slowerright - supperleft), tmpy(slowerright - supperleft); gaussianGradient(srcIterRange(supperleft, slowerright, sa), destImage(tmpx), destImage(tmpy), inner_scale); combineTwoImages(srcImageRange(tmpx), srcImage(tmpx), destImage(tmp), std::multiplies()); gaussianSmoothing(srcImageRange(tmp), destIter(dupperleftx, dax), outer_scale); combineTwoImages(srcImageRange(tmpy), srcImage(tmpy), destImage(tmp), std::multiplies()); gaussianSmoothing(srcImageRange(tmp), destIter(dupperlefty, day), outer_scale); combineTwoImages(srcImageRange(tmpx), srcImage(tmpy), destImage(tmp), std::multiplies()); gaussianSmoothing(srcImageRange(tmp), destIter(dupperleftxy, daxy), outer_scale); } template inline void structureTensor(triple src, pair destx, pair destxy, pair desty, double inner_scale, double outer_scale) { structureTensor(src.first, src.second, src.third, destx.first, destx.second, destxy.first, destxy.second, desty.first, desty.second, inner_scale, outer_scale); } } # 31 "pyramid.h" 2 # 1 "../include/vigra/rgbvalue.hxx" 1 # 35 "pyramid.h" 2 # 1 "../include/vigra/sized_int.hxx" 1 # 36 "pyramid.h" 2 using std::cout; using std::vector; using vigra::linearRangeMapping; using vigra::NumericTraits; using vigra::transformImage; using vigra::triple; using vigra::UInt16; using vigra::UInt16Image; using vigra::UInt16RGBImage; namespace enblend { # 63 "pyramid.h" template unsigned int filterHalfWidth(const unsigned int levels) { vigra::throw_precondition_error(((levels >= 1 && levels <= 29)), "filterHalfWidth: levels outside of range [1,29]"); int halfWidth = (levels == 1) ? 0 : ((1 << (levels+1)) - 4); return halfWidth; } # 168 "pyramid.h" template inline void reduce(bool wraparound, SrcImageIterator src_upperleft, SrcImageIterator src_lowerright, SrcAccessor sa, AlphaIterator alpha_upperleft, AlphaAccessor aa, DestImageIterator dest_upperleft, DestImageIterator dest_lowerright, DestAccessor da, DestAlphaIterator dest_alpha_upperleft, DestAlphaIterator dest_alpha_lowerright, DestAlphaAccessor daa) { typedef typename DestAccessor::value_type DestPixelType; typedef typename DestAlphaAccessor::value_type DestAlphaPixelType; int src_w = src_lowerright.x - src_upperleft.x; int src_h = src_lowerright.y - src_upperleft.y; int dst_w = dest_lowerright.x - dest_upperleft.x; vigra::throw_precondition_error((src_w > 1 && src_h > 1), "src image too small in reduce"); SKIPSMImagePixelType isr0, isr1, isrp; SKIPSMImagePixelType *isc0 = new SKIPSMImagePixelType[dst_w + 1]; SKIPSMImagePixelType *isc1 = new SKIPSMImagePixelType[dst_w + 1]; SKIPSMImagePixelType *iscp = new SKIPSMImagePixelType[dst_w + 1]; SKIPSMAlphaPixelType asr0, asr1, asrp; SKIPSMAlphaPixelType *asc0 = new SKIPSMAlphaPixelType[dst_w + 1]; SKIPSMAlphaPixelType *asc1 = new SKIPSMAlphaPixelType[dst_w + 1]; SKIPSMAlphaPixelType *ascp = new SKIPSMAlphaPixelType[dst_w + 1]; const SKIPSMImagePixelType SKIPSMImageZero(NumericTraits::zero()); const SKIPSMAlphaPixelType SKIPSMAlphaZero(NumericTraits::zero()); const SKIPSMAlphaPixelType SKIPSMAlphaOne(NumericTraits::one()); const DestPixelType DestImageZero(NumericTraits::zero()); const DestAlphaPixelType DestAlphaZero(NumericTraits::zero()); const DestAlphaPixelType DestAlphaMax(NumericTraits::max()); DestImageIterator dy = dest_upperleft; DestImageIterator dx = dy; SrcImageIterator sy = src_upperleft; SrcImageIterator sx = sy; AlphaIterator ay = alpha_upperleft; AlphaIterator ax = ay; DestAlphaIterator day = dest_alpha_upperleft; DestAlphaIterator dax = day; bool evenY = true; bool evenX = true; int srcy = 0; int srcx = 0; int dstx = 0; { if (wraparound) { asr0 = aa(ay, Diff2D(src_w-2, 0)) ? SKIPSMAlphaOne : SKIPSMAlphaZero; asr1 = SKIPSMAlphaZero; asrp = aa(ay, Diff2D(src_w-1, 0)) ? (SKIPSMAlphaOne * 4) : SKIPSMAlphaZero; isr0 = aa(ay, Diff2D(src_w-2, 0)) ? SKIPSMImagePixelType(sa(sy, Diff2D(src_w-2, 0))) : SKIPSMImageZero; isr1 = SKIPSMImageZero; isrp = aa(ay, Diff2D(src_w-1, 0)) ? (SKIPSMImagePixelType(sa(sy, Diff2D(src_w-1, 0))) * 4) : SKIPSMImageZero; } else { asr0 = SKIPSMAlphaZero; asr1 = SKIPSMAlphaZero; asrp = SKIPSMAlphaZero; isr0 = SKIPSMImageZero; isr1 = SKIPSMImageZero; isrp = SKIPSMImageZero; } for (sx = sy, ax = ay, evenX = true, srcx = 0, dstx = 0; srcx < src_w; ++srcx, ++sx.x, ++ax.x) { SKIPSMAlphaPixelType mcurrent(aa(ax) ? SKIPSMAlphaOne : SKIPSMAlphaZero); SKIPSMImagePixelType icurrent(aa(ax) ? SKIPSMImagePixelType(sa(sx)) : SKIPSMImageZero); if (evenX) { asc1[dstx] = SKIPSMAlphaZero; asc0[dstx] = asr1 + (asr0 * SKIPSMAlphaPixelType(6)) + asrp + mcurrent; asr1 = asr0 + asrp; asr0 = mcurrent; isc1[dstx] = SKIPSMImageZero; isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + icurrent; isr1 = isr0 + isrp; isr0 = icurrent; } else { asrp = mcurrent * 4; isrp = icurrent * 4; ++dstx; } evenX = !evenX; } if (!evenX) { ++dstx; if (wraparound) { asc1[dstx] = SKIPSMAlphaZero; asc0[dstx] = asr1 + (asr0 * SKIPSMAlphaPixelType(6)) + (aa(ay) ? (SKIPSMAlphaOne * 4) : SKIPSMAlphaZero) + (aa(ay, Diff2D(1,0)) ? SKIPSMAlphaOne : SKIPSMAlphaZero); isc1[dstx] = SKIPSMImageZero; isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + (aa(ay) ? (SKIPSMImagePixelType(sa(sy)) * 4) : SKIPSMImageZero) + (aa(ay, Diff2D(1,0)) ? SKIPSMImagePixelType(sa(sy, Diff2D(1,0))) : SKIPSMImageZero); } else { asc1[dstx] = SKIPSMAlphaZero; asc0[dstx] = asr1 + (asr0 * SKIPSMAlphaPixelType(6)); isc1[dstx] = SKIPSMImageZero; isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)); } } else { if (wraparound) { asc1[dstx] = SKIPSMAlphaZero; asc0[dstx] = asr1 + (asr0 * SKIPSMAlphaPixelType(6)) + asrp + (aa(ay) ? SKIPSMAlphaOne : SKIPSMAlphaZero); isc1[dstx] = SKIPSMImageZero; isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + (aa(ay) ? SKIPSMImagePixelType(sa(sy)) : SKIPSMImageZero); } else { asc1[dstx] = SKIPSMAlphaZero; asc0[dstx] = asr1 + (asr0 * SKIPSMAlphaPixelType(6)) + asrp; isc1[dstx] = SKIPSMImageZero; isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp; } } } ++sy.y; ++ay.y; { for (evenY = false, srcy = 1; srcy < src_h; ++srcy, ++sy.y, ++ay.y) { if (wraparound) { asr0 = aa(ay, Diff2D(src_w-2, 0)) ? SKIPSMAlphaOne : SKIPSMAlphaZero; asr1 = SKIPSMAlphaZero; asrp = aa(ay, Diff2D(src_w-1, 0)) ? (SKIPSMAlphaOne * 4) : SKIPSMAlphaZero; isr0 = aa(ay, Diff2D(src_w-2, 0)) ? SKIPSMImagePixelType(sa(sy, Diff2D(src_w-2,0))) : SKIPSMImageZero; isr1 = SKIPSMImageZero; isrp = aa(ay, Diff2D(src_w-1, 0)) ? (SKIPSMImagePixelType(sa(sy, Diff2D(src_w-1,0))) * 4) : SKIPSMImageZero; } else { asr0 = SKIPSMAlphaZero; asr1 = SKIPSMAlphaZero; asrp = SKIPSMAlphaZero; isr0 = SKIPSMImageZero; isr1 = SKIPSMImageZero; isrp = SKIPSMImageZero; } if (evenY) { sx = sy; ax = ay; if (wraparound) { asr1 = asr0 + asrp; isr1 = isr0 + isrp; } asr0 = aa(ax) ? SKIPSMAlphaOne : SKIPSMAlphaZero; isr0 = aa(ax) ? SKIPSMImagePixelType(sa(sx)) : SKIPSMImageZero; ++sx.x; ++ax.x; dx = dy; dax = day; for (evenX = false, srcx = 1, dstx = 0; srcx < src_w; ++srcx, ++sx.x, ++ax.x) { SKIPSMAlphaPixelType mcurrent(aa(ax) ? SKIPSMAlphaOne : SKIPSMAlphaZero); SKIPSMImagePixelType icurrent(aa(ax) ? SKIPSMImagePixelType(sa(sx)) : SKIPSMImageZero); if (evenX) { SKIPSMAlphaPixelType ap = asc1[dstx] + (asc0[dstx] * SKIPSMAlphaPixelType(6)) + ascp[dstx]; asc1[dstx] = asc0[dstx] + ascp[dstx]; asc0[dstx] = asr1 + (asr0 * SKIPSMAlphaPixelType(6)) + asrp + mcurrent; asr1 = asr0 + asrp; asr0 = mcurrent; ap += asc0[dstx]; SKIPSMImagePixelType ip = isc1[dstx] + (isc0[dstx] * SKIPSMImagePixelType(6)) + iscp[dstx]; isc1[dstx] = isc0[dstx] + iscp[dstx]; isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + icurrent; isr1 = isr0 + isrp; isr0 = icurrent; if (ap) { ip += isc0[dstx]; ip /= SKIPSMImagePixelType(ap); da.set(DestPixelType(ip), dx); daa.set(DestAlphaMax, dax); } else { da.set(DestImageZero, dx); daa.set(DestAlphaZero, dax); } ++dx.x; ++dax.x; } else { asrp = mcurrent * 4; isrp = icurrent * 4; ++dstx; } evenX = !evenX; } if (!evenX) { ++dstx; SKIPSMAlphaPixelType ap = asc1[dstx] + (asc0[dstx] * SKIPSMAlphaPixelType(6)) + ascp[dstx]; asc1[dstx] = asc0[dstx] + ascp[dstx]; if (wraparound) { asc0[dstx] = asr1 + (asr0 * SKIPSMAlphaPixelType(6)) + (aa(ay) ? (SKIPSMAlphaOne * 4) : SKIPSMAlphaZero) + (aa(ay, Diff2D(1,0)) ? SKIPSMAlphaOne : SKIPSMAlphaZero); } else { asc0[dstx] = asr1 + (asr0 * SKIPSMAlphaPixelType(6)); } ap += asc0[dstx]; SKIPSMImagePixelType ip = isc1[dstx] + (isc0[dstx] * SKIPSMImagePixelType(6)) + iscp[dstx]; isc1[dstx] = isc0[dstx] + iscp[dstx]; if (wraparound) { isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + (aa(ay) ? (SKIPSMImagePixelType(sa(sy)) * 4) : SKIPSMImageZero) + (aa(ay, Diff2D(1,0)) ? SKIPSMImagePixelType(sa(sy, Diff2D(1,0))) : SKIPSMImageZero); } else { isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)); } if (ap) { ip += isc0[dstx]; ip /= SKIPSMImagePixelType(ap); da.set(DestPixelType(ip), dx); daa.set(DestAlphaMax, dax); } else { da.set(DestImageZero, dx); daa.set(DestAlphaZero, dax); } } else { SKIPSMAlphaPixelType ap = asc1[dstx] + (asc0[dstx] * SKIPSMAlphaPixelType(6)) + ascp[dstx]; asc1[dstx] = asc0[dstx] + ascp[dstx]; if (wraparound) { asc0[dstx] = asr1 + (asr0 * SKIPSMAlphaPixelType(6)) + asrp + (aa(ay) ? SKIPSMAlphaOne : SKIPSMAlphaZero); } else { asc0[dstx] = asr1 + (asr0 * SKIPSMAlphaPixelType(6)) + asrp; } ap += asc0[dstx]; SKIPSMImagePixelType ip = isc1[dstx] + (isc0[dstx] * SKIPSMImagePixelType(6)) + iscp[dstx]; isc1[dstx] = isc0[dstx] + iscp[dstx]; if (wraparound) { isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + (aa(ay) ? SKIPSMImagePixelType(sa(sy)) : SKIPSMImageZero); } else { isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp; } if (ap) { ip += isc0[dstx]; ip /= SKIPSMImagePixelType(ap); da.set(DestPixelType(ip), dx); daa.set(DestAlphaMax, dax); } else { da.set(DestImageZero, dx); daa.set(DestAlphaZero, dax); } } ++dy.y; ++day.y; } else { sx = sy; ax = ay; if (wraparound) { asr1 = asr0 + asrp; isr1 = isr0 + isrp; } asr0 = aa(ax) ? SKIPSMAlphaOne : SKIPSMAlphaZero; isr0 = aa(ax) ? SKIPSMImagePixelType(sa(sx)) : SKIPSMImageZero; ++sx.x; ++ax.x; for (evenX = false, srcx = 1, dstx = 0; srcx < src_w; ++srcx, ++sx.x, ++ax.x) { SKIPSMAlphaPixelType mcurrent(aa(ax) ? SKIPSMAlphaOne : SKIPSMAlphaZero); SKIPSMImagePixelType icurrent(aa(ax) ? SKIPSMImagePixelType(sa(sx)) : SKIPSMImageZero); if (evenX) { ascp[dstx] = (asr1 + (asr0 * SKIPSMAlphaPixelType(6)) + asrp + mcurrent) * 4; asr1 = asr0 + asrp; asr0 = mcurrent; iscp[dstx] = (isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + icurrent) * 4; isr1 = isr0 + isrp; isr0 = icurrent; } else { asrp = mcurrent * 4; isrp = icurrent * 4; ++dstx; } evenX = !evenX; } if (!evenX) { ++dstx; if (wraparound) { ascp[dstx] = (asr1 + (asr0 * SKIPSMAlphaPixelType(6)) + (aa(ay) ? (SKIPSMAlphaOne * 4) : SKIPSMAlphaZero) + (aa(ay, Diff2D(1,0)) ? SKIPSMAlphaOne : SKIPSMAlphaZero) ) * 4; iscp[dstx] = (isr1 + (isr0 * SKIPSMImagePixelType(6)) + (aa(ay) ? (SKIPSMImagePixelType(sa(sy)) * 4) : SKIPSMImageZero) + (aa(ay, Diff2D(1,0)) ? SKIPSMImagePixelType(sa(sy, Diff2D(1,0))) : SKIPSMImageZero) ) * 4; } else { ascp[dstx] = (asr1 + (asr0 * SKIPSMAlphaPixelType(6))) * 4; iscp[dstx] = (isr1 + (isr0 * SKIPSMImagePixelType(6))) * 4; } } else { if (wraparound) { ascp[dstx] = (asr1 + (asr0 * SKIPSMAlphaPixelType(6)) + asrp + (aa(ay) ? SKIPSMAlphaOne : SKIPSMAlphaZero)) * 4; iscp[dstx] = (isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + (aa(ay) ? SKIPSMImagePixelType(sa(sy)) : SKIPSMImageZero)) * 4; } else { ascp[dstx] = (asr1 + (asr0 * SKIPSMAlphaPixelType(6)) + asrp) * 4; iscp[dstx] = (isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp) * 4; } } } evenY = !evenY; } } { if (!evenY) { for (dstx = 1, dx = dy, dax = day; dstx < (dst_w + 1); ++dstx, ++dx.x, ++dax.x) { SKIPSMAlphaPixelType ap = asc1[dstx] + (asc0[dstx] * SKIPSMAlphaPixelType(6)); if (ap) { SKIPSMImagePixelType ip = (isc1[dstx] + (isc0[dstx] * SKIPSMImagePixelType(6))) / SKIPSMImagePixelType(ap); da.set(DestPixelType(ip), dx); daa.set(DestAlphaMax, dax); } else { da.set(DestImageZero, dx); daa.set(DestAlphaZero, dax); } } } else { for (dstx = 1, dx = dy, dax = day; dstx < (dst_w + 1); ++dstx, ++dx.x, ++dax.x) { SKIPSMAlphaPixelType ap = asc1[dstx] + (asc0[dstx] * SKIPSMAlphaPixelType(6)) + ascp[dstx]; if (ap) { SKIPSMImagePixelType ip = (isc1[dstx] + (isc0[dstx] * SKIPSMImagePixelType(6)) + iscp[dstx]) / SKIPSMImagePixelType(ap); da.set(DestPixelType(ip), dx); daa.set(DestAlphaMax, dax); } else { da.set(DestImageZero, dx); daa.set(DestAlphaZero, dax); } } } } delete[] isc0; delete[] isc1; delete[] iscp; delete[] asc0; delete[] asc1; delete[] ascp; }; template inline void reduce(bool wraparound, triple src, pair mask, triple dest, triple destMask) { reduce(wraparound, src.first, src.second, src.third, mask.first, mask.second, dest.first, dest.second, dest.third, destMask.first, destMask.second, destMask.third); }; template inline void reduce(bool wraparound, SrcImageIterator src_upperleft, SrcImageIterator src_lowerright, SrcAccessor sa, DestImageIterator dest_upperleft, DestImageIterator dest_lowerright, DestAccessor da) { typedef typename DestAccessor::value_type DestPixelType; int src_w = src_lowerright.x - src_upperleft.x; int src_h = src_lowerright.y - src_upperleft.y; int dst_w = dest_lowerright.x - dest_upperleft.x; vigra::throw_precondition_error((src_w > 1 && src_h > 1), "src image too small in reduce"); SKIPSMImagePixelType isr0, isr1, isrp; SKIPSMImagePixelType *isc0 = new SKIPSMImagePixelType[dst_w + 1]; SKIPSMImagePixelType *isc1 = new SKIPSMImagePixelType[dst_w + 1]; SKIPSMImagePixelType *iscp = new SKIPSMImagePixelType[dst_w + 1]; const SKIPSMImagePixelType SKIPSMImageZero(NumericTraits::zero()); DestImageIterator dy = dest_upperleft; DestImageIterator dx = dy; SrcImageIterator sy = src_upperleft; SrcImageIterator sx = sy; bool evenY = true; bool evenX = true; int srcy = 0; int srcx = 0; int dstx = 0; { if (wraparound) { isr0 = SKIPSMImagePixelType(sa(sy, Diff2D(src_w-2, 0))); isr1 = SKIPSMImageZero; isrp = SKIPSMImagePixelType(sa(sy, Diff2D(src_w-1, 0))) * 4; } else { isr0 = SKIPSMImagePixelType(sa(sy)); isr1 = SKIPSMImageZero; isrp = SKIPSMImagePixelType(sa(sy)) * 4; } for (sx = sy, evenX = true, srcx = 0, dstx = 0; srcx < src_w; ++srcx, ++sx.x) { SKIPSMImagePixelType icurrent(SKIPSMImagePixelType(sa(sx))); if (evenX) { isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + icurrent; isc1[dstx] = (isc0[dstx] * SKIPSMImagePixelType(5)); isr1 = isr0 + isrp; isr0 = icurrent; } else { isrp = icurrent * 4; ++dstx; } evenX = !evenX; } if (!evenX) { ++dstx; if (wraparound) { isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + (SKIPSMImagePixelType(sa(sy)) * 4) + SKIPSMImagePixelType(sa(sy, Diff2D(1,0))); isc1[dstx] = (isc0[dstx] * SKIPSMImagePixelType(5)); } else { isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(11)); isc1[dstx] = (isc0[dstx] * SKIPSMImagePixelType(5)); } } else { if (wraparound) { isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + SKIPSMImagePixelType(sa(sy)); isc1[dstx] = (isc0[dstx] * SKIPSMImagePixelType(5)); } else { isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + (isrp / 4); isc1[dstx] = (isc0[dstx] * SKIPSMImagePixelType(5)); } } } ++sy.y; { for (evenY = false, srcy = 1; srcy < src_h; ++srcy, ++sy.y) { if (wraparound) { isr0 = SKIPSMImagePixelType(sa(sy, Diff2D(src_w-2,0))); isr1 = SKIPSMImageZero; isrp = SKIPSMImagePixelType(sa(sy, Diff2D(src_w-1,0))) * 4; } else { isr0 = SKIPSMImagePixelType(sa(sy)); isr1 = SKIPSMImageZero; isrp = SKIPSMImagePixelType(sa(sy)) * 4; } if (evenY) { sx = sy; isr1 = isr0 + isrp; isr0 = SKIPSMImagePixelType(sa(sx)); ++sx.x; dx = dy; for (evenX = false, srcx = 1, dstx = 0; srcx < src_w; ++srcx, ++sx.x) { SKIPSMImagePixelType icurrent(SKIPSMImagePixelType(sa(sx))); if (evenX) { SKIPSMImagePixelType ip = isc1[dstx] + (isc0[dstx] * SKIPSMImagePixelType(6)) + iscp[dstx]; isc1[dstx] = isc0[dstx] + iscp[dstx]; isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + icurrent; isr1 = isr0 + isrp; isr0 = icurrent; ip += isc0[dstx]; ip /= 256; da.set(DestPixelType(ip), dx); ++dx.x; } else { isrp = icurrent * 4; ++dstx; } evenX = !evenX; } if (!evenX) { ++dstx; SKIPSMImagePixelType ip = isc1[dstx] + (isc0[dstx] * SKIPSMImagePixelType(6)) + iscp[dstx]; isc1[dstx] = isc0[dstx] + iscp[dstx]; if (wraparound) { isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + (SKIPSMImagePixelType(sa(sy)) * 4) + SKIPSMImagePixelType(sa(sy, Diff2D(1,0))); } else { isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(11)); } ip += isc0[dstx]; ip /= 256; da.set(DestPixelType(ip), dx); } else { SKIPSMImagePixelType ip = isc1[dstx] + (isc0[dstx] * SKIPSMImagePixelType(6)) + iscp[dstx]; isc1[dstx] = isc0[dstx] + iscp[dstx]; if (wraparound) { isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + SKIPSMImagePixelType(sa(sy)); } else { isc0[dstx] = isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + (isrp / 4); } ip += isc0[dstx]; ip /= 256; da.set(DestPixelType(ip), dx); } ++dy.y; } else { sx = sy; isr1 = isr0 + isrp; isr0 = SKIPSMImagePixelType(sa(sx)); ++sx.x; for (evenX = false, srcx = 1, dstx = 0; srcx < src_w; ++srcx, ++sx.x) { SKIPSMImagePixelType icurrent(SKIPSMImagePixelType(sa(sx))); if (evenX) { iscp[dstx] = (isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + icurrent) * 4; isr1 = isr0 + isrp; isr0 = icurrent; } else { isrp = icurrent * 4; ++dstx; } evenX = !evenX; } if (!evenX) { ++dstx; if (wraparound) { iscp[dstx] = (isr1 + (isr0 * SKIPSMImagePixelType(6)) + (SKIPSMImagePixelType(sa(sy)) * 4) + SKIPSMImagePixelType(sa(sy, Diff2D(1,0))) ) * 4; } else { iscp[dstx] = (isr1 + (isr0 * SKIPSMImagePixelType(11))) * 4; } } else { if (wraparound) { iscp[dstx] = (isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + SKIPSMImagePixelType(sa(sy))) * 4; } else { iscp[dstx] = (isr1 + (isr0 * SKIPSMImagePixelType(6)) + isrp + (isrp / 4)) * 4; } } } evenY = !evenY; } } { if (!evenY) { for (dstx = 1, dx = dy; dstx < (dst_w + 1); ++dstx, ++dx.x) { SKIPSMImagePixelType ip = (isc1[dstx] + (isc0[dstx] * SKIPSMImagePixelType(11))) / 256; da.set(DestPixelType(ip), dx); } } else { for (dstx = 1, dx = dy; dstx < (dst_w + 1); ++dstx, ++dx.x) { SKIPSMImagePixelType ip = (isc1[dstx] + (isc0[dstx] * SKIPSMImagePixelType(6)) + iscp[dstx] + (iscp[dstx] / 4)) / 256; da.set(DestPixelType(ip), dx); } } } delete[] isc0; delete[] isc1; delete[] iscp; }; template inline void reduce(bool wraparound, triple src, triple dest) { reduce(wraparound, src.first, src.second, src.third, dest.first, dest.second, dest.third); }; # 1076 "pyramid.h" template void expand(bool add, bool wraparound, SrcImageIterator src_upperleft, SrcImageIterator src_lowerright, SrcAccessor sa, DestImageIterator dest_upperleft, DestImageIterator dest_lowerright, DestAccessor da, CombineFunctor cf) { int src_w = src_lowerright.x - src_upperleft.x; int src_h = src_lowerright.y - src_upperleft.y; int dst_w = dest_lowerright.x - dest_upperleft.x; int dst_h = dest_lowerright.y - dest_upperleft.y; SKIPSMImagePixelType current; SKIPSMImagePixelType out00, out10, out01, out11; SKIPSMImagePixelType sr0, sr1; SKIPSMImagePixelType *sc0a = new SKIPSMImagePixelType[src_w + 1]; SKIPSMImagePixelType *sc0b = new SKIPSMImagePixelType[src_w + 1]; SKIPSMImagePixelType *sc1a = new SKIPSMImagePixelType[src_w + 1]; SKIPSMImagePixelType *sc1b = new SKIPSMImagePixelType[src_w + 1]; const SKIPSMImagePixelType SKIPSMImageZero(NumericTraits::zero()); DestImageIterator dy = dest_upperleft; DestImageIterator dyy = dest_upperleft; DestImageIterator dx = dy; DestImageIterator dxx = dyy; SrcImageIterator sy = src_upperleft; SrcImageIterator sx = sy; int srcy = 0; int srcx = 0; { if (wraparound) { sr0 = SKIPSMImagePixelType(sa(sy, Diff2D(src_w-1,0))); sr1 = SKIPSMImagePixelType(sa(sy, Diff2D(src_w-2,0))); } else { sr0 = SKIPSMImageZero; sr1 = SKIPSMImageZero; } for (sx = sy, srcx = 0; srcx < src_w; ++srcx, ++sx.x) { current = SKIPSMImagePixelType(sa(sx)); sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)) + current; sc0b[srcx] = (sr0 + current) * 4; sc1a[srcx] = SKIPSMImageZero; sc1b[srcx] = SKIPSMImageZero; sr1 = sr0; sr0 = current; } if (wraparound) { sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)) + SKIPSMImagePixelType(sa(sy)); sc0b[srcx] = (sr0 + SKIPSMImagePixelType(sa(sy))) * 4; } else { sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)); sc0b[srcx] = sr0 * 4; } sc1a[srcx] = SKIPSMImageZero; sc1b[srcx] = SKIPSMImageZero; } ++dyy.y; srcy = 1; ++sy.y; if (src_h > 1) { srcx = 0; sx = sy; sr0 = SKIPSMImagePixelType(sa(sx)); if (wraparound) { sr1 = SKIPSMImagePixelType(sa(sy, Diff2D(src_w-1,0))); } else { sr1 = SKIPSMImageZero; } srcx = 1; ++sx.x; dx = dy; dxx = dyy; if (src_w > 1) { if (wraparound) { current = SKIPSMImagePixelType(sa(sx)); out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out01 = sc0a[srcx]; out11 = sc0b[srcx]; sc1a[srcx] = sc0a[srcx]; sc1b[srcx] = sc0b[srcx]; sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)) + current; sc0b[srcx] = (sr0 + current) * 4; sr1 = sr0; sr0 = current; out00 += sc0a[srcx]; out10 += sc0b[srcx]; out01 += sc0a[srcx]; out11 += sc0b[srcx]; out00 /= SKIPSMImagePixelType(56); out10 /= SKIPSMImagePixelType(56); out01 /= SKIPSMImagePixelType(16); out11 /= SKIPSMImagePixelType(16); da.set(cf(SKIPSMImagePixelType(da(dx)), out00), dx); ++dx.x; da.set(cf(SKIPSMImagePixelType(da(dx)), out10), dx); ++dx.x; da.set(cf(SKIPSMImagePixelType(da(dxx)), out01), dxx); ++dxx.x; da.set(cf(SKIPSMImagePixelType(da(dxx)), out11), dxx); ++dxx.x; } else { current = SKIPSMImagePixelType(sa(sx)); out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out01 = sc0a[srcx]; out11 = sc0b[srcx]; sc1a[srcx] = sc0a[srcx]; sc1b[srcx] = sc0b[srcx]; sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)) + current; sc0b[srcx] = (sr0 + current) * 4; sr1 = sr0; sr0 = current; out00 += sc0a[srcx]; out10 += sc0b[srcx]; out01 += sc0a[srcx]; out11 += sc0b[srcx]; out00 /= SKIPSMImagePixelType(49); out10 /= SKIPSMImagePixelType(56); out01 /= SKIPSMImagePixelType(14); out11 /= SKIPSMImagePixelType(16); da.set(cf(SKIPSMImagePixelType(da(dx)), out00), dx); ++dx.x; da.set(cf(SKIPSMImagePixelType(da(dx)), out10), dx); ++dx.x; da.set(cf(SKIPSMImagePixelType(da(dxx)), out01), dxx); ++dxx.x; da.set(cf(SKIPSMImagePixelType(da(dxx)), out11), dxx); ++dxx.x; } for (srcx = 2, ++sx.x; srcx < src_w; ++srcx, ++sx.x) { current = SKIPSMImagePixelType(sa(sx)); out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out01 = sc0a[srcx]; out11 = sc0b[srcx]; sc1a[srcx] = sc0a[srcx]; sc1b[srcx] = sc0b[srcx]; sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)) + current; sc0b[srcx] = (sr0 + current) * 4; sr1 = sr0; sr0 = current; out00 += sc0a[srcx]; out10 += sc0b[srcx]; out01 += sc0a[srcx]; out11 += sc0b[srcx]; out00 /= SKIPSMImagePixelType(56); out10 /= SKIPSMImagePixelType(56); out01 /= SKIPSMImagePixelType(16); out11 /= SKIPSMImagePixelType(16); da.set(cf(SKIPSMImagePixelType(da(dx)), out00), dx); ++dx.x; da.set(cf(SKIPSMImagePixelType(da(dx)), out10), dx); ++dx.x; da.set(cf(SKIPSMImagePixelType(da(dxx)), out01), dxx); ++dxx.x; da.set(cf(SKIPSMImagePixelType(da(dxx)), out11), dxx); ++dxx.x; } if (wraparound) { out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out01 = sc0a[srcx]; out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out11 = sc0b[srcx]; sc1a[srcx] = sc0a[srcx]; sc1b[srcx] = sc0b[srcx]; sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)) + SKIPSMImagePixelType(sa(sy)); sc0b[srcx] = (sr0 + SKIPSMImagePixelType(sa(sy))) * 4; out00 += sc0a[srcx]; out01 += sc0a[srcx]; out00 /= SKIPSMImagePixelType(56); out01 /= SKIPSMImagePixelType(16); da.set(cf(da(dx), out00), dx); da.set(cf(da(dxx), out01), dxx); if ((dst_w & 1) == 0) { ++dx.x; ++dxx.x; out10 += sc0b[srcx]; out11 += sc0b[srcx]; out10 /= SKIPSMImagePixelType(56); out11 /= SKIPSMImagePixelType(16); da.set(cf(da(dx), out10), dx); da.set(cf(da(dxx), out11), dxx); } } else { out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out01 = sc0a[srcx]; out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out11 = sc0b[srcx]; sc1a[srcx] = sc0a[srcx]; sc1b[srcx] = sc0b[srcx]; sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)); sc0b[srcx] = sr0 * 4; out00 += sc0a[srcx]; out01 += sc0a[srcx]; out00 /= SKIPSMImagePixelType(49); out01 /= SKIPSMImagePixelType(14); da.set(cf(da(dx), out00), dx); da.set(cf(da(dxx), out01), dxx); if ((dst_w & 1) == 0) { ++dx.x; ++dxx.x; out10 += sc0b[srcx]; out11 += sc0b[srcx]; out10 /= SKIPSMImagePixelType(28); out11 /= SKIPSMImagePixelType(8); da.set(cf(da(dx), out10), dx); da.set(cf(da(dxx), out11), dxx); } } } else { out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out01 = sc0a[srcx]; out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out11 = sc0b[srcx]; sc1a[srcx] = sc0a[srcx]; sc1b[srcx] = sc0b[srcx]; sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)); sc0b[srcx] = sr0 * 4; out00 += sc0a[srcx]; out01 += sc0a[srcx]; out00 /= SKIPSMImagePixelType(42); out01 /= SKIPSMImagePixelType(12); da.set(cf(da(dx), out00), dx); da.set(cf(da(dxx), out01), dxx); if ((dst_w & 1) == 0) { ++dx.x; ++dxx.x; out10 += sc0b[srcx]; out11 += sc0b[srcx]; out10 /= SKIPSMImagePixelType(28); out11 /= SKIPSMImagePixelType(8); da.set(cf(da(dx), out10), dx); da.set(cf(da(dxx), out11), dxx); } } } else { srcx = 0; sr0 = SKIPSMImageZero; sr1 = SKIPSMImageZero; dx = dy; dxx = dyy; if (src_w > 1) { srcx = 1; if (wraparound) { out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out00 /= SKIPSMImagePixelType(48); out10 /= SKIPSMImagePixelType(48); da.set(cf(da(dx), out00), dx); ++dx.x; da.set(cf(da(dx), out10), dx); ++dx.x; if ((dst_h & 1) == 0) { out01 = sc0a[srcx]; out11 = sc0b[srcx]; out01 /= SKIPSMImagePixelType(8); out11 /= SKIPSMImagePixelType(8); da.set(cf(da(dxx), out01), dxx); ++dxx.x; da.set(cf(da(dxx), out11), dxx); ++dxx.x; } } else { out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out00 /= SKIPSMImagePixelType(42); out10 /= SKIPSMImagePixelType(48); da.set(cf(da(dx), out00), dx); ++dx.x; da.set(cf(da(dx), out10), dx); ++dx.x; if ((dst_h & 1) == 0) { out01 = sc0a[srcx]; out11 = sc0b[srcx]; out01 /= SKIPSMImagePixelType(7); out11 /= SKIPSMImagePixelType(8); da.set(cf(da(dxx), out01), dxx); ++dxx.x; da.set(cf(da(dxx), out11), dxx); ++dxx.x; } } for (srcx = 2; srcx < src_w; ++srcx) { out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out00 /= SKIPSMImagePixelType(48); out10 /= SKIPSMImagePixelType(48); da.set(cf(da(dx), out00), dx); ++dx.x; da.set(cf(da(dx), out10), dx); ++dx.x; if ((dst_h & 1) == 0) { out01 = sc0a[srcx]; out11 = sc0b[srcx]; out01 /= SKIPSMImagePixelType(8); out11 /= SKIPSMImagePixelType(8); da.set(cf(da(dxx), out01), dxx); ++dxx.x; da.set(cf(da(dxx), out11), dxx); ++dxx.x; } } if (wraparound) { out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out00 /= SKIPSMImagePixelType(48); da.set(cf(da(dx), out00), dx); if ((dst_w & 1) == 0) { out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out10 /= SKIPSMImagePixelType(48); ++dx.x; da.set(cf(da(dx), out10), dx); } if ((dst_h & 1) == 0) { out01 = sc0a[srcx]; out01 /= SKIPSMImagePixelType(8); da.set(cf(da(dxx), out01), dxx); if ((dst_w & 1) == 0) { out11 = sc0b[srcx]; out11 /= SKIPSMImagePixelType(8); ++dxx.x; da.set(cf(da(dxx), out11), dxx); } } } else { out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out00 /= SKIPSMImagePixelType(42); da.set(cf(da(dx), out00), dx); if ((dst_w & 1) == 0) { out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out10 /= SKIPSMImagePixelType(24); ++dx.x; da.set(cf(da(dx), out10), dx); } if ((dst_h & 1) == 0) { out01 = sc0a[srcx]; out01 /= SKIPSMImagePixelType(7); da.set(cf(da(dxx), out01), dxx); if ((dst_w & 1) == 0) { out11 = sc0b[srcx]; out11 /= SKIPSMImagePixelType(4); ++dxx.x; da.set(cf(da(dxx), out11), dxx); } } } } else { out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out00 /= SKIPSMImagePixelType(36); da.set(cf(da(dx), out00), dx); if ((dst_w & 1) == 0) { out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out10 /= SKIPSMImagePixelType(24); ++dx.x; da.set(cf(da(dx), out10), dx); } if ((dst_h & 1) == 0) { out01 = sc0a[srcx]; out01 /= SKIPSMImagePixelType(6); da.set(cf(da(dxx), out01), dxx); if ((dst_w & 1) == 0) { out11 = sc0b[srcx]; out11 /= SKIPSMImagePixelType(4); ++dxx.x; da.set(cf(da(dxx), out11), dxx); } } } delete[] sc0a; delete[] sc0b; delete[] sc1a; delete[] sc1b; return; } dy.y += 2; dyy.y += 2; srcy = 2; ++sy.y; for (srcy = 2, sx = sy; srcy < src_h; ++srcy, ++sy.y, dy.y += 2, dyy.y += 2) { srcx = 0; sx = sy; sr0 = SKIPSMImagePixelType(sa(sx)); if (wraparound) { sr1 = SKIPSMImagePixelType(sa(sy, Diff2D(src_w-1,0))); } else { sr1 = SKIPSMImageZero; } srcx = 1; ++sx.x; dx = dy; dxx = dyy; if (src_w > 1) { if (wraparound) { current = SKIPSMImagePixelType(sa(sx)); out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out01 = sc0a[srcx]; out11 = sc0b[srcx]; sc1a[srcx] = sc0a[srcx]; sc1b[srcx] = sc0b[srcx]; sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)) + current; sc0b[srcx] = (sr0 + current) * 4; sr1 = sr0; sr0 = current; out00 += sc0a[srcx]; out10 += sc0b[srcx]; out01 += sc0a[srcx]; out11 += sc0b[srcx]; out00 /= 64; out10 /= 64; out01 /= 16; out11 /= 16; da.set(cf(SKIPSMImagePixelType(da(dx)), out00), dx); ++dx.x; da.set(cf(SKIPSMImagePixelType(da(dx)), out10), dx); ++dx.x; da.set(cf(SKIPSMImagePixelType(da(dxx)), out01), dxx); ++dxx.x; da.set(cf(SKIPSMImagePixelType(da(dxx)), out11), dxx); ++dxx.x; } else { current = SKIPSMImagePixelType(sa(sx)); out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out01 = sc0a[srcx]; out11 = sc0b[srcx]; sc1a[srcx] = sc0a[srcx]; sc1b[srcx] = sc0b[srcx]; sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)) + current; sc0b[srcx] = (sr0 + current) * 4; sr1 = sr0; sr0 = current; out00 += sc0a[srcx]; out10 += sc0b[srcx]; out01 += sc0a[srcx]; out11 += sc0b[srcx]; out00 /= SKIPSMImagePixelType(56); out10 /= SKIPSMImagePixelType(64); out01 /= SKIPSMImagePixelType(14); out11 /= SKIPSMImagePixelType(16); da.set(cf(SKIPSMImagePixelType(da(dx)), out00), dx); ++dx.x; da.set(cf(SKIPSMImagePixelType(da(dx)), out10), dx); ++dx.x; da.set(cf(SKIPSMImagePixelType(da(dxx)), out01), dxx); ++dxx.x; da.set(cf(SKIPSMImagePixelType(da(dxx)), out11), dxx); ++dxx.x; } for (srcx = 2, ++sx.x; srcx < src_w; ++srcx, ++sx.x) { current = SKIPSMImagePixelType(sa(sx)); out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out01 = sc0a[srcx]; out11 = sc0b[srcx]; sc1a[srcx] = sc0a[srcx]; sc1b[srcx] = sc0b[srcx]; sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)) + current; sc0b[srcx] = (sr0 + current) * 4; sr1 = sr0; sr0 = current; out00 += sc0a[srcx]; out10 += sc0b[srcx]; out01 += sc0a[srcx]; out11 += sc0b[srcx]; out00 /= 64; out10 /= 64; out01 /= 16; out11 /= 16; da.set(cf(SKIPSMImagePixelType(da(dx)), out00), dx); ++dx.x; da.set(cf(SKIPSMImagePixelType(da(dx)), out10), dx); ++dx.x; da.set(cf(SKIPSMImagePixelType(da(dxx)), out01), dxx); ++dxx.x; da.set(cf(SKIPSMImagePixelType(da(dxx)), out11), dxx); ++dxx.x; } if (wraparound) { out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out01 = sc0a[srcx]; out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out11 = sc0b[srcx]; sc1a[srcx] = sc0a[srcx]; sc1b[srcx] = sc0b[srcx]; sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)) + SKIPSMImagePixelType(sa(sy)); sc0b[srcx] = (sr0 + SKIPSMImagePixelType(sa(sy))) * 4; out00 += sc0a[srcx]; out01 += sc0a[srcx]; out00 /= SKIPSMImagePixelType(64); out01 /= SKIPSMImagePixelType(16); da.set(cf(da(dx), out00), dx); da.set(cf(da(dxx), out01), dxx); if ((dst_w & 1) == 0) { ++dx.x; ++dxx.x; out10 += sc0b[srcx]; out11 += sc0b[srcx]; out10 /= SKIPSMImagePixelType(64); out11 /= SKIPSMImagePixelType(16); da.set(cf(da(dx), out10), dx); da.set(cf(da(dxx), out11), dxx); } } else { out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out01 = sc0a[srcx]; out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out11 = sc0b[srcx]; sc1a[srcx] = sc0a[srcx]; sc1b[srcx] = sc0b[srcx]; sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)); sc0b[srcx] = sr0 * 4; out00 += sc0a[srcx]; out01 += sc0a[srcx]; out00 /= SKIPSMImagePixelType(56); out01 /= SKIPSMImagePixelType(14); da.set(cf(da(dx), out00), dx); da.set(cf(da(dxx), out01), dxx); if ((dst_w & 1) == 0) { ++dx.x; ++dxx.x; out10 += sc0b[srcx]; out11 += sc0b[srcx]; out10 /= SKIPSMImagePixelType(32); out11 /= SKIPSMImagePixelType(8); da.set(cf(da(dx), out10), dx); da.set(cf(da(dxx), out11), dxx); } } } else { out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out01 = sc0a[srcx]; out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out11 = sc0b[srcx]; sc1a[srcx] = sc0a[srcx]; sc1b[srcx] = sc0b[srcx]; sc0a[srcx] = sr1 + (sr0 * SKIPSMImagePixelType(6)); sc0b[srcx] = sr0 * 4; out00 += sc0a[srcx]; out01 += sc0a[srcx]; out00 /= SKIPSMImagePixelType(48); out01 /= SKIPSMImagePixelType(12); da.set(cf(da(dx), out00), dx); da.set(cf(da(dxx), out01), dxx); if ((dst_w & 1) == 0) { ++dx.x; ++dxx.x; out10 += sc0b[srcx]; out11 += sc0b[srcx]; out10 /= SKIPSMImagePixelType(32); out11 /= SKIPSMImagePixelType(8); da.set(cf(da(dx), out10), dx); da.set(cf(da(dxx), out11), dxx); } } } { srcx = 0; sr0 = SKIPSMImageZero; sr1 = SKIPSMImageZero; dx = dy; dxx = dyy; if (src_w > 1) { srcx = 1; if (wraparound) { out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out00 /= SKIPSMImagePixelType(56); out10 /= SKIPSMImagePixelType(56); da.set(cf(da(dx), out00), dx); ++dx.x; da.set(cf(da(dx), out10), dx); ++dx.x; if ((dst_h & 1) == 0) { out01 = sc0a[srcx]; out11 = sc0b[srcx]; out01 /= SKIPSMImagePixelType(8); out11 /= SKIPSMImagePixelType(8); da.set(cf(da(dxx), out01), dxx); ++dxx.x; da.set(cf(da(dxx), out11), dxx); ++dxx.x; } } else { out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out00 /= SKIPSMImagePixelType(49); out10 /= SKIPSMImagePixelType(56); da.set(cf(da(dx), out00), dx); ++dx.x; da.set(cf(da(dx), out10), dx); ++dx.x; if ((dst_h & 1) == 0) { out01 = sc0a[srcx]; out11 = sc0b[srcx]; out01 /= SKIPSMImagePixelType(7); out11 /= SKIPSMImagePixelType(8); da.set(cf(da(dxx), out01), dxx); ++dxx.x; da.set(cf(da(dxx), out11), dxx); ++dxx.x; } } for (srcx = 2; srcx < src_w; ++srcx) { out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out00 /= SKIPSMImagePixelType(56); out10 /= SKIPSMImagePixelType(56); da.set(cf(da(dx), out00), dx); ++dx.x; da.set(cf(da(dx), out10), dx); ++dx.x; if ((dst_h & 1) == 0) { out01 = sc0a[srcx]; out11 = sc0b[srcx]; out01 /= SKIPSMImagePixelType(8); out11 /= SKIPSMImagePixelType(8); da.set(cf(da(dxx), out01), dxx); ++dxx.x; da.set(cf(da(dxx), out11), dxx); ++dxx.x; } } if (wraparound) { out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out00 /= SKIPSMImagePixelType(56); da.set(cf(da(dx), out00), dx); if ((dst_w & 1) == 0) { out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out10 /= SKIPSMImagePixelType(56); ++dx.x; da.set(cf(da(dx), out10), dx); } if ((dst_h & 1) == 0) { out01 = sc0a[srcx]; out01 /= SKIPSMImagePixelType(8); da.set(cf(da(dxx), out01), dxx); if ((dst_w & 1) == 0) { out11 = sc0b[srcx]; out11 /= SKIPSMImagePixelType(8); ++dxx.x; da.set(cf(da(dxx), out11), dxx); } } } else { out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out00 /= SKIPSMImagePixelType(49); da.set(cf(da(dx), out00), dx); if ((dst_w & 1) == 0) { out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out10 /= SKIPSMImagePixelType(28); ++dx.x; da.set(cf(da(dx), out10), dx); } if ((dst_h & 1) == 0) { out01 = sc0a[srcx]; out01 /= SKIPSMImagePixelType(7); da.set(cf(da(dxx), out01), dxx); if ((dst_w & 1) == 0) { out11 = sc0b[srcx]; out11 /= SKIPSMImagePixelType(4); ++dxx.x; da.set(cf(da(dxx), out11), dxx); } } } } else { out00 = sc1a[srcx] + (sc0a[srcx] * SKIPSMImagePixelType(6)); out00 /= SKIPSMImagePixelType(42); da.set(cf(da(dx), out00), dx); if ((dst_w & 1) == 0) { out10 = sc1b[srcx] + (sc0b[srcx] * SKIPSMImagePixelType(6)); out10 /= SKIPSMImagePixelType(28); ++dx.x; da.set(cf(da(dx), out10), dx); } if ((dst_h & 1) == 0) { out01 = sc0a[srcx]; out01 /= SKIPSMImagePixelType(6); da.set(cf(da(dxx), out01), dxx); if ((dst_w & 1) == 0) { out11 = sc0b[srcx]; out11 /= SKIPSMImagePixelType(4); ++dxx.x; da.set(cf(da(dxx), out11), dxx); } } } } delete[] sc0a; delete[] sc0b; delete[] sc1a; delete[] sc1b; }; template struct FromPromotePlusFunctorWrapper : public std::binary_function { inline T3 operator()(const T1 &a, const T2 &b) const { return NumericTraits::fromPromote(a + b); } }; template inline void expand(bool add, bool wraparound, triple src, triple dest) { typedef typename DestAccessor::value_type DestPixelType; if (add) { expand(add, wraparound, src.first, src.second, src.third, dest.first, dest.second, dest.third, FromPromotePlusFunctorWrapper()); } else { expand(add, wraparound, src.first, src.second, src.third, dest.first, dest.second, dest.third, std::minus()); } }; template vector *gaussianPyramid(unsigned int numLevels, bool wraparound, typename SrcImageType::const_traverser src_upperleft, typename SrcImageType::const_traverser src_lowerright, typename SrcImageType::ConstAccessor sa, typename AlphaImageType::const_traverser alpha_upperleft, typename AlphaImageType::ConstAccessor aa) { vector *gp = new vector(); int w = src_lowerright.x - src_upperleft.x; int h = src_lowerright.y - src_upperleft.y; PyramidImageType *gp0 = new PyramidImageType(w, h); copyToPyramidImage( src_upperleft, src_lowerright, sa, gp0->upperLeft(), gp0->accessor()); gp->push_back(gp0); if (Verbose > 0) { cout << "Generating Gaussian pyramid: g0"; } PyramidImageType *lastGP = gp0; AlphaImageType *lastA = __null; for (unsigned int l = 1; l < numLevels; l++) { if (Verbose > 0) { cout << " g" << l; cout.flush(); } w = (w + 1) >> 1; h = (h + 1) >> 1; PyramidImageType *gpn = new PyramidImageType(w, h); AlphaImageType *nextA = new AlphaImageType(w, h); if (lastA == __null) { reduce(wraparound, srcImageRange(*lastGP), maskIter(alpha_upperleft, aa), destImageRange(*gpn), destImageRange(*nextA)); } else { reduce(wraparound, srcImageRange(*lastGP), maskImage(*lastA), destImageRange(*gpn), destImageRange(*nextA)); } gp->push_back(gpn); lastGP = gpn; delete lastA; lastA = nextA; } delete lastA; if (Verbose > 0) { cout << endl; } return gp; }; template inline vector *gaussianPyramid(unsigned int numLevels, bool wraparound, triple src, pair alpha) { return gaussianPyramid( numLevels, wraparound, src.first, src.second, src.third, alpha.first, alpha.second); }; template vector *gaussianPyramid(unsigned int numLevels, bool wraparound, typename SrcImageType::const_traverser src_upperleft, typename SrcImageType::const_traverser src_lowerright, typename SrcImageType::ConstAccessor sa) { vector *gp = new vector(); int w = src_lowerright.x - src_upperleft.x; int h = src_lowerright.y - src_upperleft.y; PyramidImageType *gp0 = new PyramidImageType(w, h); copyToPyramidImage( src_upperleft, src_lowerright, sa, gp0->upperLeft(), gp0->accessor()); gp->push_back(gp0); if (Verbose > 0) { cout << "Generating Gaussian pyramid: g0"; } PyramidImageType *lastGP = gp0; for (unsigned int l = 1; l < numLevels; l++) { if (Verbose > 0) { cout << " g" << l; cout.flush(); } w = (w + 1) >> 1; h = (h + 1) >> 1; PyramidImageType *gpn = new PyramidImageType(w, h); reduce(wraparound, srcImageRange(*lastGP), destImageRange(*gpn)); gp->push_back(gpn); lastGP = gpn; } if (Verbose > 0) { cout << endl; } return gp; }; template inline vector *gaussianPyramid(unsigned int numLevels, bool wraparound, triple src) { return gaussianPyramid( numLevels, wraparound, src.first, src.second, src.third); }; template vector *laplacianPyramid(const char* exportName, unsigned int numLevels, bool wraparound, typename SrcImageType::const_traverser src_upperleft, typename SrcImageType::const_traverser src_lowerright, typename SrcImageType::ConstAccessor sa, typename AlphaImageType::const_traverser alpha_upperleft, typename AlphaImageType::ConstAccessor aa) { vector *gp = gaussianPyramid( numLevels, wraparound, src_upperleft, src_lowerright, sa, alpha_upperleft, aa); if (Verbose > 0) { cout << "Generating Laplacian pyramid:"; cout.flush(); } for (unsigned int l = 0; l < (numLevels-1); l++) { if (Verbose > 0) { cout << " l" << l; cout.flush(); } expand(false, wraparound, srcImageRange(*((*gp)[l+1])), destImageRange(*((*gp)[l]))); } if (Verbose > 0) { cout << " l" << (numLevels-1) << endl; } return gp; }; template inline vector *laplacianPyramid(const char* exportName, unsigned int numLevels, bool wraparound, triple src, pair alpha) { return laplacianPyramid( exportName, numLevels, wraparound, src.first, src.second, src.third, alpha.first, alpha.second); }; template void collapsePyramid(bool wraparound, vector *p) { if (Verbose > 0) { cout << "Collapsing Laplacian pyramid: " << "l" << p->size()-1; cout.flush(); } for (int l = (p->size()-2); l >= 0; l--) { if (Verbose > 0) { cout << " l" << l; cout.flush(); } expand(true, wraparound, srcImageRange(*((*p)[l+1])), destImageRange(*((*p)[l]))); } if (Verbose > 0) { cout << endl; } }; template void exportPyramid(vector *v, const char *prefix, VigraTrueType) { typedef typename PyramidImageType::value_type PyramidValueType; for (unsigned int i = 0; i < v->size(); i++) { char filenameBuf[512]; snprintf(filenameBuf, 512, "%s%04u.tif", prefix, i); UInt16Image usPyramid((*v)[i]->width(), (*v)[i]->height()); transformImage(srcImageRange(*((*v)[i])), destImage(usPyramid), linearRangeMapping(NumericTraits::min(), NumericTraits::max(), NumericTraits::min(), NumericTraits::max())); ImageExportInfo info(filenameBuf); exportImage(srcImageRange(usPyramid), info); } }; template void exportPyramid(vector *v, const char *prefix, VigraFalseType) { typedef typename PyramidImageType::value_type PyramidVectorType; typedef typename PyramidVectorType::value_type PyramidValueType; for (unsigned int i = 0; i < (v->size() - 1); i++) { initImage(destImageRange(*((*v)[i])), NumericTraits::zero()); } collapsePyramid(false, v); for (unsigned int i = 0; i < v->size(); i++) { char filenameBuf[512]; snprintf(filenameBuf, 512, "%s%04u.tif", prefix, i); UInt16RGBImage usPyramid((*v)[i]->width(), (*v)[i]->height()); transformImage(srcImageRange(*((*v)[i])), destImage(usPyramid), linearRangeMapping(PyramidVectorType(NumericTraits::min()), PyramidVectorType(NumericTraits::max()), typename UInt16RGBImage::value_type(NumericTraits::min()), typename UInt16RGBImage::value_type(NumericTraits::max()))); ImageExportInfo info(filenameBuf); exportImage(srcImageRange(usPyramid), info); } }; template void exportPyramid(vector *v, const char *prefix) { typedef typename NumericTraits::isScalar pyramid_is_scalar; exportPyramid(v, prefix, pyramid_is_scalar()); }; } # 29 "bounds.h" 2 using std::cerr; using std::cout; using std::endl; using std::min; using vigra::Point2D; namespace enblend { template Overlap inspectOverlap( SrcImageIterator src1_upperleft, SrcImageIterator src1_lowerright, SrcAccessor s1a, SrcImageIterator src2_upperleft, SrcAccessor s2a) { SrcImageIterator s1y = src1_upperleft; SrcImageIterator s2y = src2_upperleft; SrcImageIterator send = src1_lowerright; bool foundOverlap = false; bool foundDistinctS2 = false; for (; s1y.y < send.y; ++s1y.y, ++s2y.y) { SrcImageIterator s1x = s1y; SrcImageIterator s2x = s2y; for (; s1x.x < send.x; ++s1x.x, ++s2x.x) { if (s1a(s1x) && s2a(s2x)) { foundOverlap = true; } else if (s2a(s2x)) { foundDistinctS2 = true; } if (foundOverlap && foundDistinctS2) { return PartialOverlap; } } } if (foundOverlap) { return CompleteOverlap; } else { return NoOverlap; } }; template Overlap inspectOverlap( triple src1, pair src2) { return inspectOverlap(src1.first, src1.second, src1.third, src2.first, src2.second); }; template unsigned int roiBounds(const Rect2D &inputUnion, const Rect2D &iBB, const Rect2D &mBB, const Rect2D &uBB, Rect2D &roiBB, bool wraparoundForMask) { unsigned int levels = 1; if (ExactLevels == 0) { unsigned int shortDimension = min(iBB.width(), iBB.height()); while (levels < 30) { unsigned int extent = filterHalfWidth(levels + 1); if ((2 * extent) > shortDimension) { break; } levels++; } if (levels == 1) { cerr << "enblend: overlap region is too small to make " << "more than one pyramid level." << endl; } } else { levels = ExactLevels; } unsigned int extent = filterHalfWidth(levels); roiBB = mBB; roiBB.addBorder(extent); if (wraparoundForMask && (roiBB.left() < 0 || roiBB.right() > uBB.right())) { roiBB.setUpperLeft(Point2D(0, roiBB.top())); roiBB.setLowerRight(Point2D(uBB.right(), roiBB.bottom())); } roiBB &= uBB; unsigned int roiShortDimension = min(roiBB.width(), roiBB.height()); unsigned int allowableLevels; for (allowableLevels = 1; allowableLevels < levels; allowableLevels++) { if (roiShortDimension <= 8) { break; } roiShortDimension = (roiShortDimension + 1) >> 1; } if (allowableLevels < ExactLevels) { cerr << "enblend: image geometry precludes using more than " << allowableLevels << " levels." << endl; } if (Verbose > 0) { cout << "Using " << allowableLevels << " blending levels" << endl; } if (Verbose > 1) { cout << "Region of Interest bounding box: " << roiBB << endl; } return allowableLevels; } } # 39 "enblend.h" 2 # 1 "mask.h" 1 # 24 "mask.h" # 1 "../config.h" 1 # 25 "mask.h" 2 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/slist" 1 3 # 58 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/slist" 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { using std::size_t; using std::ptrdiff_t; using std::_Construct; using std::_Destroy; using std::allocator; using std::__true_type; using std::__false_type; struct _Slist_node_base { _Slist_node_base* _M_next; }; inline _Slist_node_base* __slist_make_link(_Slist_node_base* __prev_node, _Slist_node_base* __new_node) { __new_node->_M_next = __prev_node->_M_next; __prev_node->_M_next = __new_node; return __new_node; } inline _Slist_node_base* __slist_previous(_Slist_node_base* __head, const _Slist_node_base* __node) { while (__head && __head->_M_next != __node) __head = __head->_M_next; return __head; } inline const _Slist_node_base* __slist_previous(const _Slist_node_base* __head, const _Slist_node_base* __node) { while (__head && __head->_M_next != __node) __head = __head->_M_next; return __head; } inline void __slist_splice_after(_Slist_node_base* __pos, _Slist_node_base* __before_first, _Slist_node_base* __before_last) { if (__pos != __before_first && __pos != __before_last) { _Slist_node_base* __first = __before_first->_M_next; _Slist_node_base* __after = __pos->_M_next; __before_first->_M_next = __before_last->_M_next; __pos->_M_next = __first; __before_last->_M_next = __after; } } inline void __slist_splice_after(_Slist_node_base* __pos, _Slist_node_base* __head) { _Slist_node_base* __before_last = __slist_previous(__head, 0); if (__before_last != __head) { _Slist_node_base* __after = __pos->_M_next; __pos->_M_next = __head->_M_next; __head->_M_next = 0; __before_last->_M_next = __after; } } inline _Slist_node_base* __slist_reverse(_Slist_node_base* __node) { _Slist_node_base* __result = __node; __node = __node->_M_next; __result->_M_next = 0; while(__node) { _Slist_node_base* __next = __node->_M_next; __node->_M_next = __result; __result = __node; __node = __next; } return __result; } inline size_t __slist_size(_Slist_node_base* __node) { size_t __result = 0; for (; __node != 0; __node = __node->_M_next) ++__result; return __result; } template struct _Slist_node : public _Slist_node_base { _Tp _M_data; }; struct _Slist_iterator_base { typedef size_t size_type; typedef ptrdiff_t difference_type; typedef std::forward_iterator_tag iterator_category; _Slist_node_base* _M_node; _Slist_iterator_base(_Slist_node_base* __x) : _M_node(__x) {} void _M_incr() { _M_node = _M_node->_M_next; } bool operator==(const _Slist_iterator_base& __x) const { return _M_node == __x._M_node; } bool operator!=(const _Slist_iterator_base& __x) const { return _M_node != __x._M_node; } }; template struct _Slist_iterator : public _Slist_iterator_base { typedef _Slist_iterator<_Tp, _Tp&, _Tp*> iterator; typedef _Slist_iterator<_Tp, const _Tp&, const _Tp*> const_iterator; typedef _Slist_iterator<_Tp, _Ref, _Ptr> _Self; typedef _Tp value_type; typedef _Ptr pointer; typedef _Ref reference; typedef _Slist_node<_Tp> _Node; explicit _Slist_iterator(_Node* __x) : _Slist_iterator_base(__x) {} _Slist_iterator() : _Slist_iterator_base(0) {} _Slist_iterator(const iterator& __x) : _Slist_iterator_base(__x._M_node) {} reference operator*() const { return ((_Node*) _M_node)->_M_data; } pointer operator->() const { return &(operator*()); } _Self& operator++() { _M_incr(); return *this; } _Self operator++(int) { _Self __tmp = *this; _M_incr(); return __tmp; } }; template struct _Slist_base : public _Alloc::template rebind<_Slist_node<_Tp> >::other { typedef typename _Alloc::template rebind<_Slist_node<_Tp> >::other _Node_alloc; typedef _Alloc allocator_type; allocator_type get_allocator() const { return *static_cast(this); } _Slist_base(const allocator_type& __a) : _Node_alloc(__a) { this->_M_head._M_next = 0; } ~_Slist_base() { _M_erase_after(&this->_M_head, 0); } protected: _Slist_node_base _M_head; _Slist_node<_Tp>* _M_get_node() { return _Node_alloc::allocate(1); } void _M_put_node(_Slist_node<_Tp>* __p) { _Node_alloc::deallocate(__p, 1); } protected: _Slist_node_base* _M_erase_after(_Slist_node_base* __pos) { _Slist_node<_Tp>* __next = (_Slist_node<_Tp>*) (__pos->_M_next); _Slist_node_base* __next_next = __next->_M_next; __pos->_M_next = __next_next; get_allocator().destroy(&__next->_M_data); _M_put_node(__next); return __next_next; } _Slist_node_base* _M_erase_after(_Slist_node_base*, _Slist_node_base*); }; template _Slist_node_base* _Slist_base<_Tp,_Alloc>::_M_erase_after(_Slist_node_base* __before_first, _Slist_node_base* __last_node) { _Slist_node<_Tp>* __cur = (_Slist_node<_Tp>*) (__before_first->_M_next); while (__cur != __last_node) { _Slist_node<_Tp>* __tmp = __cur; __cur = (_Slist_node<_Tp>*) __cur->_M_next; get_allocator().destroy(&__tmp->_M_data); _M_put_node(__tmp); } __before_first->_M_next = __last_node; return __last_node; } template > class slist : private _Slist_base<_Tp,_Alloc> { private: typedef _Slist_base<_Tp,_Alloc> _Base; public: typedef _Tp value_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type& reference; typedef const value_type& const_reference; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Slist_iterator<_Tp, _Tp&, _Tp*> iterator; typedef _Slist_iterator<_Tp, const _Tp&, const _Tp*> const_iterator; typedef typename _Base::allocator_type allocator_type; allocator_type get_allocator() const { return _Base::get_allocator(); } private: typedef _Slist_node<_Tp> _Node; typedef _Slist_node_base _Node_base; typedef _Slist_iterator_base _Iterator_base; _Node* _M_create_node(const value_type& __x) { _Node* __node = this->_M_get_node(); try { get_allocator().construct(&__node->_M_data, __x); __node->_M_next = 0; } catch(...) { this->_M_put_node(__node); throw; } return __node; } _Node* _M_create_node() { _Node* __node = this->_M_get_node(); try { get_allocator().construct(&__node->_M_data, value_type()); __node->_M_next = 0; } catch(...) { this->_M_put_node(__node); throw; } return __node; } public: explicit slist(const allocator_type& __a = allocator_type()) : _Base(__a) {} slist(size_type __n, const value_type& __x, const allocator_type& __a = allocator_type()) : _Base(__a) { _M_insert_after_fill(&this->_M_head, __n, __x); } explicit slist(size_type __n) : _Base(allocator_type()) { _M_insert_after_fill(&this->_M_head, __n, value_type()); } template slist(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) : _Base(__a) { _M_insert_after_range(&this->_M_head, __first, __last); } slist(const slist& __x) : _Base(__x.get_allocator()) { _M_insert_after_range(&this->_M_head, __x.begin(), __x.end()); } slist& operator= (const slist& __x); ~slist() {} public: void assign(size_type __n, const _Tp& __val) { _M_fill_assign(__n, __val); } void _M_fill_assign(size_type __n, const _Tp& __val); template void assign(_InputIterator __first, _InputIterator __last) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_assign_dispatch(__first, __last, _Integral()); } template void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) { _M_fill_assign((size_type) __n, (_Tp) __val); } template void _M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type); public: iterator begin() { return iterator((_Node*)this->_M_head._M_next); } const_iterator begin() const { return const_iterator((_Node*)this->_M_head._M_next);} iterator end() { return iterator(0); } const_iterator end() const { return const_iterator(0); } # 448 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/ext/slist" 3 iterator before_begin() { return iterator((_Node*) &this->_M_head); } const_iterator before_begin() const { return const_iterator((_Node*) &this->_M_head); } size_type size() const { return __slist_size(this->_M_head._M_next); } size_type max_size() const { return size_type(-1); } bool empty() const { return this->_M_head._M_next == 0; } void swap(slist& __x) { std::swap(this->_M_head._M_next, __x._M_head._M_next); } public: reference front() { return ((_Node*) this->_M_head._M_next)->_M_data; } const_reference front() const { return ((_Node*) this->_M_head._M_next)->_M_data; } void push_front(const value_type& __x) { __slist_make_link(&this->_M_head, _M_create_node(__x)); } void push_front() { __slist_make_link(&this->_M_head, _M_create_node()); } void pop_front() { _Node* __node = (_Node*) this->_M_head._M_next; this->_M_head._M_next = __node->_M_next; get_allocator().destroy(&__node->_M_data); this->_M_put_node(__node); } iterator previous(const_iterator __pos) { return iterator((_Node*) __slist_previous(&this->_M_head, __pos._M_node)); } const_iterator previous(const_iterator __pos) const { return const_iterator((_Node*) __slist_previous(&this->_M_head, __pos._M_node)); } private: _Node* _M_insert_after(_Node_base* __pos, const value_type& __x) { return (_Node*) (__slist_make_link(__pos, _M_create_node(__x))); } _Node* _M_insert_after(_Node_base* __pos) { return (_Node*) (__slist_make_link(__pos, _M_create_node())); } void _M_insert_after_fill(_Node_base* __pos, size_type __n, const value_type& __x) { for (size_type __i = 0; __i < __n; ++__i) __pos = __slist_make_link(__pos, _M_create_node(__x)); } template void _M_insert_after_range(_Node_base* __pos, _InIterator __first, _InIterator __last) { typedef typename std::__is_integer<_InIterator>::__type _Integral; _M_insert_after_range(__pos, __first, __last, _Integral()); } template void _M_insert_after_range(_Node_base* __pos, _Integer __n, _Integer __x, __true_type) { _M_insert_after_fill(__pos, __n, __x); } template void _M_insert_after_range(_Node_base* __pos, _InIterator __first, _InIterator __last, __false_type) { while (__first != __last) { __pos = __slist_make_link(__pos, _M_create_node(*__first)); ++__first; } } public: iterator insert_after(iterator __pos, const value_type& __x) { return iterator(_M_insert_after(__pos._M_node, __x)); } iterator insert_after(iterator __pos) { return insert_after(__pos, value_type()); } void insert_after(iterator __pos, size_type __n, const value_type& __x) { _M_insert_after_fill(__pos._M_node, __n, __x); } template void insert_after(iterator __pos, _InIterator __first, _InIterator __last) { _M_insert_after_range(__pos._M_node, __first, __last); } iterator insert(iterator __pos, const value_type& __x) { return iterator(_M_insert_after(__slist_previous(&this->_M_head, __pos._M_node), __x)); } iterator insert(iterator __pos) { return iterator(_M_insert_after(__slist_previous(&this->_M_head, __pos._M_node), value_type())); } void insert(iterator __pos, size_type __n, const value_type& __x) { _M_insert_after_fill(__slist_previous(&this->_M_head, __pos._M_node), __n, __x); } template void insert(iterator __pos, _InIterator __first, _InIterator __last) { _M_insert_after_range(__slist_previous(&this->_M_head, __pos._M_node), __first, __last); } public: iterator erase_after(iterator __pos) { return iterator((_Node*) this->_M_erase_after(__pos._M_node)); } iterator erase_after(iterator __before_first, iterator __last) { return iterator((_Node*) this->_M_erase_after(__before_first._M_node, __last._M_node)); } iterator erase(iterator __pos) { return iterator((_Node*) this->_M_erase_after (__slist_previous(&this->_M_head, __pos._M_node))); } iterator erase(iterator __first, iterator __last) { return iterator((_Node*) this->_M_erase_after (__slist_previous(&this->_M_head, __first._M_node), __last._M_node)); } void resize(size_type new_size, const _Tp& __x); void resize(size_type new_size) { resize(new_size, _Tp()); } void clear() { this->_M_erase_after(&this->_M_head, 0); } public: void splice_after(iterator __pos, iterator __before_first, iterator __before_last) { if (__before_first != __before_last) __slist_splice_after(__pos._M_node, __before_first._M_node, __before_last._M_node); } void splice_after(iterator __pos, iterator __prev) { __slist_splice_after(__pos._M_node, __prev._M_node, __prev._M_node->_M_next); } void splice_after(iterator __pos, slist& __x) { __slist_splice_after(__pos._M_node, &__x._M_head); } void splice(iterator __pos, slist& __x) { if (__x._M_head._M_next) __slist_splice_after(__slist_previous(&this->_M_head, __pos._M_node), &__x._M_head, __slist_previous(&__x._M_head, 0)); } void splice(iterator __pos, slist& __x, iterator __i) { __slist_splice_after(__slist_previous(&this->_M_head, __pos._M_node), __slist_previous(&__x._M_head, __i._M_node), __i._M_node); } void splice(iterator __pos, slist& __x, iterator __first, iterator __last) { if (__first != __last) __slist_splice_after(__slist_previous(&this->_M_head, __pos._M_node), __slist_previous(&__x._M_head, __first._M_node), __slist_previous(__first._M_node, __last._M_node)); } public: void reverse() { if (this->_M_head._M_next) this->_M_head._M_next = __slist_reverse(this->_M_head._M_next); } void remove(const _Tp& __val); void unique(); void merge(slist& __x); void sort(); template void remove_if(_Predicate __pred); template void unique(_BinaryPredicate __pred); template void merge(slist&, _StrictWeakOrdering); template void sort(_StrictWeakOrdering __comp); }; template slist<_Tp, _Alloc>& slist<_Tp, _Alloc>::operator=(const slist<_Tp, _Alloc>& __x) { if (&__x != this) { _Node_base* __p1 = &this->_M_head; _Node* __n1 = (_Node*) this->_M_head._M_next; const _Node* __n2 = (const _Node*) __x._M_head._M_next; while (__n1 && __n2) { __n1->_M_data = __n2->_M_data; __p1 = __n1; __n1 = (_Node*) __n1->_M_next; __n2 = (const _Node*) __n2->_M_next; } if (__n2 == 0) this->_M_erase_after(__p1, 0); else _M_insert_after_range(__p1, const_iterator((_Node*)__n2), const_iterator(0)); } return *this; } template void slist<_Tp, _Alloc>::_M_fill_assign(size_type __n, const _Tp& __val) { _Node_base* __prev = &this->_M_head; _Node* __node = (_Node*) this->_M_head._M_next; for (; __node != 0 && __n > 0; --__n) { __node->_M_data = __val; __prev = __node; __node = (_Node*) __node->_M_next; } if (__n > 0) _M_insert_after_fill(__prev, __n, __val); else this->_M_erase_after(__prev, 0); } template template void slist<_Tp, _Alloc>::_M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { _Node_base* __prev = &this->_M_head; _Node* __node = (_Node*) this->_M_head._M_next; while (__node != 0 && __first != __last) { __node->_M_data = *__first; __prev = __node; __node = (_Node*) __node->_M_next; ++__first; } if (__first != __last) _M_insert_after_range(__prev, __first, __last); else this->_M_erase_after(__prev, 0); } template inline bool operator==(const slist<_Tp, _Alloc>& _SL1, const slist<_Tp, _Alloc>& _SL2) { typedef typename slist<_Tp,_Alloc>::const_iterator const_iterator; const_iterator __end1 = _SL1.end(); const_iterator __end2 = _SL2.end(); const_iterator __i1 = _SL1.begin(); const_iterator __i2 = _SL2.begin(); while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2) { ++__i1; ++__i2; } return __i1 == __end1 && __i2 == __end2; } template inline bool operator<(const slist<_Tp, _Alloc>& _SL1, const slist<_Tp, _Alloc>& _SL2) { return std::lexicographical_compare(_SL1.begin(), _SL1.end(), _SL2.begin(), _SL2.end()); } template inline bool operator!=(const slist<_Tp, _Alloc>& _SL1, const slist<_Tp, _Alloc>& _SL2) { return !(_SL1 == _SL2); } template inline bool operator>(const slist<_Tp, _Alloc>& _SL1, const slist<_Tp, _Alloc>& _SL2) { return _SL2 < _SL1; } template inline bool operator<=(const slist<_Tp, _Alloc>& _SL1, const slist<_Tp, _Alloc>& _SL2) { return !(_SL2 < _SL1); } template inline bool operator>=(const slist<_Tp, _Alloc>& _SL1, const slist<_Tp, _Alloc>& _SL2) { return !(_SL1 < _SL2); } template inline void swap(slist<_Tp, _Alloc>& __x, slist<_Tp, _Alloc>& __y) { __x.swap(__y); } template void slist<_Tp, _Alloc>::resize(size_type __len, const _Tp& __x) { _Node_base* __cur = &this->_M_head; while (__cur->_M_next != 0 && __len > 0) { --__len; __cur = __cur->_M_next; } if (__cur->_M_next) this->_M_erase_after(__cur, 0); else _M_insert_after_fill(__cur, __len, __x); } template void slist<_Tp, _Alloc>::remove(const _Tp& __val) { _Node_base* __cur = &this->_M_head; while (__cur && __cur->_M_next) { if (((_Node*) __cur->_M_next)->_M_data == __val) this->_M_erase_after(__cur); else __cur = __cur->_M_next; } } template void slist<_Tp, _Alloc>::unique() { _Node_base* __cur = this->_M_head._M_next; if (__cur) { while (__cur->_M_next) { if (((_Node*)__cur)->_M_data == ((_Node*)(__cur->_M_next))->_M_data) this->_M_erase_after(__cur); else __cur = __cur->_M_next; } } } template void slist<_Tp, _Alloc>::merge(slist<_Tp, _Alloc>& __x) { _Node_base* __n1 = &this->_M_head; while (__n1->_M_next && __x._M_head._M_next) { if (((_Node*) __x._M_head._M_next)->_M_data < ((_Node*) __n1->_M_next)->_M_data) __slist_splice_after(__n1, &__x._M_head, __x._M_head._M_next); __n1 = __n1->_M_next; } if (__x._M_head._M_next) { __n1->_M_next = __x._M_head._M_next; __x._M_head._M_next = 0; } } template void slist<_Tp, _Alloc>::sort() { if (this->_M_head._M_next && this->_M_head._M_next->_M_next) { slist __carry; slist __counter[64]; int __fill = 0; while (!empty()) { __slist_splice_after(&__carry._M_head, &this->_M_head, this->_M_head._M_next); int __i = 0; while (__i < __fill && !__counter[__i].empty()) { __counter[__i].merge(__carry); __carry.swap(__counter[__i]); ++__i; } __carry.swap(__counter[__i]); if (__i == __fill) ++__fill; } for (int __i = 1; __i < __fill; ++__i) __counter[__i].merge(__counter[__i-1]); this->swap(__counter[__fill-1]); } } template template void slist<_Tp, _Alloc>::remove_if(_Predicate __pred) { _Node_base* __cur = &this->_M_head; while (__cur->_M_next) { if (__pred(((_Node*) __cur->_M_next)->_M_data)) this->_M_erase_after(__cur); else __cur = __cur->_M_next; } } template template void slist<_Tp, _Alloc>::unique(_BinaryPredicate __pred) { _Node* __cur = (_Node*) this->_M_head._M_next; if (__cur) { while (__cur->_M_next) { if (__pred(((_Node*)__cur)->_M_data, ((_Node*)(__cur->_M_next))->_M_data)) this->_M_erase_after(__cur); else __cur = (_Node*) __cur->_M_next; } } } template template void slist<_Tp, _Alloc>::merge(slist<_Tp, _Alloc>& __x, _StrictWeakOrdering __comp) { _Node_base* __n1 = &this->_M_head; while (__n1->_M_next && __x._M_head._M_next) { if (__comp(((_Node*) __x._M_head._M_next)->_M_data, ((_Node*) __n1->_M_next)->_M_data)) __slist_splice_after(__n1, &__x._M_head, __x._M_head._M_next); __n1 = __n1->_M_next; } if (__x._M_head._M_next) { __n1->_M_next = __x._M_head._M_next; __x._M_head._M_next = 0; } } template template void slist<_Tp, _Alloc>::sort(_StrictWeakOrdering __comp) { if (this->_M_head._M_next && this->_M_head._M_next->_M_next) { slist __carry; slist __counter[64]; int __fill = 0; while (!empty()) { __slist_splice_after(&__carry._M_head, &this->_M_head, this->_M_head._M_next); int __i = 0; while (__i < __fill && !__counter[__i].empty()) { __counter[__i].merge(__carry, __comp); __carry.swap(__counter[__i]); ++__i; } __carry.swap(__counter[__i]); if (__i == __fill) ++__fill; } for (int __i = 1; __i < __fill; ++__i) __counter[__i].merge(__counter[__i-1], __comp); this->swap(__counter[__fill-1]); } } } namespace std __attribute__ ((__visibility__ ("default"))) { template class insert_iterator<__gnu_cxx::slist<_Tp, _Alloc> > { protected: typedef __gnu_cxx::slist<_Tp, _Alloc> _Container; _Container* container; typename _Container::iterator iter; public: typedef _Container container_type; typedef output_iterator_tag iterator_category; typedef void value_type; typedef void difference_type; typedef void pointer; typedef void reference; insert_iterator(_Container& __x, typename _Container::iterator __i) : container(&__x) { if (__i == __x.begin()) iter = __x.before_begin(); else iter = __x.previous(__i); } insert_iterator<_Container>& operator=(const typename _Container::value_type& __value) { iter = container->insert_after(iter, __value); return *this; } insert_iterator<_Container>& operator*() { return *this; } insert_iterator<_Container>& operator++() { return *this; } insert_iterator<_Container>& operator++(int) { return *this; } }; } # 32 "mask.h" 2 # 1 "anneal.h" 1 # 24 "anneal.h" # 1 "../config.h" 1 # 25 "anneal.h" 2 # 1 "/usr/include/boost/lambda/lambda.hpp" 1 3 4 # 14 "/usr/include/boost/lambda/lambda.hpp" 3 4 # 1 "/usr/include/boost/lambda/core.hpp" 1 3 4 # 25 "/usr/include/boost/lambda/core.hpp" 3 4 # 1 "/usr/include/boost/type_traits/transform_traits.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/transform_traits.hpp" 3 4 # 1 "/usr/include/boost/type_traits/add_pointer.hpp" 1 3 4 # 12 "/usr/include/boost/type_traits/add_pointer.hpp" 3 4 # 1 "/usr/include/boost/type_traits/remove_reference.hpp" 1 3 4 # 12 "/usr/include/boost/type_traits/remove_reference.hpp" 3 4 # 1 "/usr/include/boost/type_traits/broken_compiler_spec.hpp" 1 3 4 # 12 "/usr/include/boost/type_traits/broken_compiler_spec.hpp" 3 4 # 1 "/usr/include/boost/mpl/aux_/lambda_support.hpp" 1 3 4 # 17 "/usr/include/boost/mpl/aux_/lambda_support.hpp" 3 4 # 1 "/usr/include/boost/mpl/aux_/config/lambda.hpp" 1 3 4 # 17 "/usr/include/boost/mpl/aux_/config/lambda.hpp" 3 4 # 1 "/usr/include/boost/mpl/aux_/config/ttp.hpp" 1 3 4 # 17 "/usr/include/boost/mpl/aux_/config/ttp.hpp" 3 4 # 1 "/usr/include/boost/mpl/aux_/config/msvc.hpp" 1 3 4 # 18 "/usr/include/boost/mpl/aux_/config/ttp.hpp" 2 3 4 # 1 "/usr/include/boost/mpl/aux_/config/gcc.hpp" 1 3 4 # 19 "/usr/include/boost/mpl/aux_/config/ttp.hpp" 2 3 4 # 1 "/usr/include/boost/mpl/aux_/config/workaround.hpp" 1 3 4 # 20 "/usr/include/boost/mpl/aux_/config/ttp.hpp" 2 3 4 # 18 "/usr/include/boost/mpl/aux_/config/lambda.hpp" 2 3 4 # 1 "/usr/include/boost/mpl/aux_/config/ctps.hpp" 1 3 4 # 19 "/usr/include/boost/mpl/aux_/config/lambda.hpp" 2 3 4 # 18 "/usr/include/boost/mpl/aux_/lambda_support.hpp" 2 3 4 # 13 "/usr/include/boost/type_traits/broken_compiler_spec.hpp" 2 3 4 # 95 "/usr/include/boost/type_traits/broken_compiler_spec.hpp" 3 4 # 13 "/usr/include/boost/type_traits/remove_reference.hpp" 2 3 4 # 21 "/usr/include/boost/type_traits/remove_reference.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 10 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 3 4 # 1 "/usr/include/boost/mpl/int.hpp" 1 3 4 # 17 "/usr/include/boost/mpl/int.hpp" 3 4 # 1 "/usr/include/boost/mpl/int_fwd.hpp" 1 3 4 # 17 "/usr/include/boost/mpl/int_fwd.hpp" 3 4 # 1 "/usr/include/boost/mpl/aux_/adl_barrier.hpp" 1 3 4 # 17 "/usr/include/boost/mpl/aux_/adl_barrier.hpp" 3 4 # 1 "/usr/include/boost/mpl/aux_/config/adl.hpp" 1 3 4 # 18 "/usr/include/boost/mpl/aux_/config/adl.hpp" 3 4 # 1 "/usr/include/boost/mpl/aux_/config/intel.hpp" 1 3 4 # 19 "/usr/include/boost/mpl/aux_/config/adl.hpp" 2 3 4 # 18 "/usr/include/boost/mpl/aux_/adl_barrier.hpp" 2 3 4 # 33 "/usr/include/boost/mpl/aux_/adl_barrier.hpp" 3 4 namespace mpl_ { namespace aux {} } namespace boost { namespace mpl { using namespace mpl_; namespace aux { using namespace mpl_::aux; } }} # 18 "/usr/include/boost/mpl/int_fwd.hpp" 2 3 4 # 1 "/usr/include/boost/mpl/aux_/nttp_decl.hpp" 1 3 4 # 17 "/usr/include/boost/mpl/aux_/nttp_decl.hpp" 3 4 # 1 "/usr/include/boost/mpl/aux_/config/nttp.hpp" 1 3 4 # 18 "/usr/include/boost/mpl/aux_/nttp_decl.hpp" 2 3 4 # 19 "/usr/include/boost/mpl/int_fwd.hpp" 2 3 4 namespace mpl_ { template< int N > struct int_; } namespace boost { namespace mpl { using ::mpl_::int_; } } # 18 "/usr/include/boost/mpl/int.hpp" 2 3 4 # 1 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 1 3 4 # 16 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 3 4 # 1 "/usr/include/boost/mpl/integral_c_tag.hpp" 1 3 4 # 19 "/usr/include/boost/mpl/integral_c_tag.hpp" 3 4 # 1 "/usr/include/boost/mpl/aux_/config/static_constant.hpp" 1 3 4 # 20 "/usr/include/boost/mpl/integral_c_tag.hpp" 2 3 4 namespace mpl_ { struct integral_c_tag { static const int value = 0; }; } namespace boost { namespace mpl { using ::mpl_::integral_c_tag; } } # 17 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 2 3 4 # 1 "/usr/include/boost/mpl/aux_/static_cast.hpp" 1 3 4 # 18 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 2 3 4 # 1 "/usr/include/boost/preprocessor/cat.hpp" 1 3 4 # 17 "/usr/include/boost/preprocessor/cat.hpp" 3 4 # 1 "/usr/include/boost/preprocessor/config/config.hpp" 1 3 4 # 18 "/usr/include/boost/preprocessor/cat.hpp" 2 3 4 # 23 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 2 3 4 # 40 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 3 4 namespace mpl_ { template< int N > struct int_ { static const int value = N; typedef int_ type; typedef int value_type; typedef integral_c_tag tag; # 72 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 3 4 typedef mpl_::int_< static_cast((value + 1)) > next; typedef mpl_::int_< static_cast((value - 1)) > prior; operator int() const { return static_cast(this->value); } }; template< int N > int const mpl_::int_< N >::value; } # 21 "/usr/include/boost/mpl/int.hpp" 2 3 4 # 11 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 2 3 4 # 1 "/usr/include/boost/mpl/aux_/template_arity_fwd.hpp" 1 3 4 # 17 "/usr/include/boost/mpl/aux_/template_arity_fwd.hpp" 3 4 namespace boost { namespace mpl { namespace aux { template< typename F > struct template_arity; }}} # 12 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 2 3 4 # 1 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 1 3 4 # 17 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 3 4 # 1 "/usr/include/boost/mpl/aux_/config/preprocessor.hpp" 1 3 4 # 18 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 2 3 4 # 45 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 3 4 # 1 "/usr/include/boost/preprocessor/comma_if.hpp" 1 3 4 # 15 "/usr/include/boost/preprocessor/comma_if.hpp" 3 4 # 1 "/usr/include/boost/preprocessor/punctuation/comma_if.hpp" 1 3 4 # 18 "/usr/include/boost/preprocessor/punctuation/comma_if.hpp" 3 4 # 1 "/usr/include/boost/preprocessor/control/if.hpp" 1 3 4 # 18 "/usr/include/boost/preprocessor/control/if.hpp" 3 4 # 1 "/usr/include/boost/preprocessor/control/iif.hpp" 1 3 4 # 19 "/usr/include/boost/preprocessor/control/if.hpp" 2 3 4 # 1 "/usr/include/boost/preprocessor/logical/bool.hpp" 1 3 4 # 20 "/usr/include/boost/preprocessor/control/if.hpp" 2 3 4 # 19 "/usr/include/boost/preprocessor/punctuation/comma_if.hpp" 2 3 4 # 1 "/usr/include/boost/preprocessor/facilities/empty.hpp" 1 3 4 # 20 "/usr/include/boost/preprocessor/punctuation/comma_if.hpp" 2 3 4 # 1 "/usr/include/boost/preprocessor/punctuation/comma.hpp" 1 3 4 # 21 "/usr/include/boost/preprocessor/punctuation/comma_if.hpp" 2 3 4 # 16 "/usr/include/boost/preprocessor/comma_if.hpp" 2 3 4 # 46 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 2 3 4 # 1 "/usr/include/boost/preprocessor/repeat.hpp" 1 3 4 # 15 "/usr/include/boost/preprocessor/repeat.hpp" 3 4 # 1 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 1 3 4 # 19 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 3 4 # 1 "/usr/include/boost/preprocessor/debug/error.hpp" 1 3 4 # 20 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 2 3 4 # 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 # 21 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 2 3 4 # 1 "/usr/include/boost/preprocessor/tuple/eat.hpp" 1 3 4 # 22 "/usr/include/boost/preprocessor/repetition/repeat.hpp" 2 3 4 # 16 "/usr/include/boost/preprocessor/repeat.hpp" 2 3 4 # 47 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 2 3 4 # 1 "/usr/include/boost/preprocessor/inc.hpp" 1 3 4 # 15 "/usr/include/boost/preprocessor/inc.hpp" 3 4 # 1 "/usr/include/boost/preprocessor/arithmetic/inc.hpp" 1 3 4 # 16 "/usr/include/boost/preprocessor/inc.hpp" 2 3 4 # 48 "/usr/include/boost/mpl/aux_/preprocessor/params.hpp" 2 3 4 # 13 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 2 3 4 # 1 "/usr/include/boost/mpl/aux_/config/overload_resolution.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 2 3 4 # 15 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 2 3 4 # 22 "/usr/include/boost/type_traits/remove_reference.hpp" 2 3 4 namespace boost { template< typename T > struct remove_reference { typedef T type; }; template< typename T > struct remove_reference { typedef T type; }; # 46 "/usr/include/boost/type_traits/remove_reference.hpp" 3 4 } # 1 "/usr/include/boost/type_traits/detail/type_trait_undef.hpp" 1 3 4 # 49 "/usr/include/boost/type_traits/remove_reference.hpp" 2 3 4 # 13 "/usr/include/boost/type_traits/add_pointer.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 2 3 4 # 16 "/usr/include/boost/type_traits/add_pointer.hpp" 2 3 4 namespace boost { namespace detail { # 55 "/usr/include/boost/type_traits/add_pointer.hpp" 3 4 template struct add_pointer_impl { typedef typename remove_reference::type no_ref_type; typedef no_ref_type* type; }; } template< typename T > struct add_pointer { typedef typename boost::detail::add_pointer_impl::type type; }; } # 1 "/usr/include/boost/type_traits/detail/type_trait_undef.hpp" 1 3 4 # 71 "/usr/include/boost/type_traits/add_pointer.hpp" 2 3 4 # 16 "/usr/include/boost/type_traits/transform_traits.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/add_reference.hpp" 1 3 4 # 12 "/usr/include/boost/type_traits/add_reference.hpp" 3 4 # 1 "/usr/include/boost/type_traits/is_reference.hpp" 1 3 4 # 24 "/usr/include/boost/type_traits/is_reference.hpp" 3 4 # 1 "/usr/include/boost/type_traits/config.hpp" 1 3 4 # 25 "/usr/include/boost/type_traits/is_reference.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/integral_constant.hpp" 1 3 4 # 10 "/usr/include/boost/type_traits/integral_constant.hpp" 3 4 # 1 "/usr/include/boost/mpl/bool.hpp" 1 3 4 # 17 "/usr/include/boost/mpl/bool.hpp" 3 4 # 1 "/usr/include/boost/mpl/bool_fwd.hpp" 1 3 4 # 19 "/usr/include/boost/mpl/bool_fwd.hpp" 3 4 namespace mpl_ { template< bool C_ > struct bool_; typedef bool_ true_; typedef bool_ false_; } namespace boost { namespace mpl { using ::mpl_::bool_; } } namespace boost { namespace mpl { using ::mpl_::true_; } } namespace boost { namespace mpl { using ::mpl_::false_; } } # 18 "/usr/include/boost/mpl/bool.hpp" 2 3 4 namespace mpl_ { template< bool C_ > struct bool_ { static const bool value = C_; typedef integral_c_tag tag; typedef bool_ type; typedef bool value_type; operator bool() const { return this->value; } }; template< bool C_ > bool const bool_::value; } # 11 "/usr/include/boost/type_traits/integral_constant.hpp" 2 3 4 # 1 "/usr/include/boost/mpl/integral_c.hpp" 1 3 4 # 17 "/usr/include/boost/mpl/integral_c.hpp" 3 4 # 1 "/usr/include/boost/mpl/integral_c_fwd.hpp" 1 3 4 # 20 "/usr/include/boost/mpl/integral_c_fwd.hpp" 3 4 namespace mpl_ { template< typename T, T N > struct integral_c; } namespace boost { namespace mpl { using ::mpl_::integral_c; } } # 18 "/usr/include/boost/mpl/integral_c.hpp" 2 3 4 # 32 "/usr/include/boost/mpl/integral_c.hpp" 3 4 # 1 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 1 3 4 # 40 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 3 4 namespace mpl_ { template< typename T, T N > struct integral_c { static const T value = N; typedef integral_c type; typedef T value_type; typedef integral_c_tag tag; # 72 "/usr/include/boost/mpl/aux_/integral_wrapper.hpp" 3 4 typedef integral_c< T, static_cast((value + 1)) > next; typedef integral_c< T, static_cast((value - 1)) > prior; operator T() const { return static_cast(this->value); } }; template< typename T, T N > T const integral_c< T, N >::value; } # 33 "/usr/include/boost/mpl/integral_c.hpp" 2 3 4 namespace mpl_ { template< bool C > struct integral_c { static const bool value = C; typedef integral_c_tag tag; typedef integral_c type; typedef bool value_type; operator bool() const { return this->value; } }; } # 12 "/usr/include/boost/type_traits/integral_constant.hpp" 2 3 4 namespace boost{ template struct integral_constant : public mpl::integral_c { typedef integral_constant type; }; template<> struct integral_constant : public mpl::true_ { typedef integral_constant type; }; template<> struct integral_constant : public mpl::false_ { typedef integral_constant type; }; typedef integral_constant true_type; typedef integral_constant false_type; } # 16 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 33 "/usr/include/boost/type_traits/is_reference.hpp" 2 3 4 namespace boost { template< typename T > struct is_reference : ::boost::integral_constant { }; template< typename T > struct is_reference< T& > : ::boost::integral_constant { }; # 111 "/usr/include/boost/type_traits/is_reference.hpp" 3 4 } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 114 "/usr/include/boost/type_traits/is_reference.hpp" 2 3 4 # 13 "/usr/include/boost/type_traits/add_reference.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 2 3 4 # 18 "/usr/include/boost/type_traits/add_reference.hpp" 2 3 4 namespace boost { namespace detail { # 55 "/usr/include/boost/type_traits/add_reference.hpp" 3 4 template struct add_reference_impl { typedef T& type; }; template< typename T > struct add_reference_impl { typedef T& type; }; template<> struct add_reference_impl { typedef void type; }; template<> struct add_reference_impl { typedef void const type; }; template<> struct add_reference_impl { typedef void volatile type; }; template<> struct add_reference_impl { typedef void const volatile type; }; } template< typename T > struct add_reference { typedef typename boost::detail::add_reference_impl::type type; }; } # 1 "/usr/include/boost/type_traits/detail/type_trait_undef.hpp" 1 3 4 # 88 "/usr/include/boost/type_traits/add_reference.hpp" 2 3 4 # 17 "/usr/include/boost/type_traits/transform_traits.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/remove_bounds.hpp" 1 3 4 # 21 "/usr/include/boost/type_traits/remove_bounds.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 2 3 4 # 22 "/usr/include/boost/type_traits/remove_bounds.hpp" 2 3 4 namespace boost { template< typename T > struct remove_bounds { typedef T type; }; template< typename T, std::size_t N > struct remove_bounds { typedef T type; }; template< typename T, std::size_t N > struct remove_bounds { typedef T const type; }; template< typename T, std::size_t N > struct remove_bounds { typedef T volatile type; }; template< typename T, std::size_t N > struct remove_bounds { typedef T const volatile type; }; template< typename T > struct remove_bounds { typedef T type; }; template< typename T > struct remove_bounds { typedef T const type; }; template< typename T > struct remove_bounds { typedef T volatile type; }; template< typename T > struct remove_bounds { typedef T const volatile type; }; } # 1 "/usr/include/boost/type_traits/detail/type_trait_undef.hpp" 1 3 4 # 47 "/usr/include/boost/type_traits/remove_bounds.hpp" 2 3 4 # 18 "/usr/include/boost/type_traits/transform_traits.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/remove_pointer.hpp" 1 3 4 # 21 "/usr/include/boost/type_traits/remove_pointer.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 2 3 4 # 22 "/usr/include/boost/type_traits/remove_pointer.hpp" 2 3 4 namespace boost { template< typename T > struct remove_pointer { typedef T type; }; template< typename T > struct remove_pointer { typedef T type; }; template< typename T > struct remove_pointer { typedef T type; }; template< typename T > struct remove_pointer { typedef T type; }; template< typename T > struct remove_pointer { typedef T type; }; } # 1 "/usr/include/boost/type_traits/detail/type_trait_undef.hpp" 1 3 4 # 42 "/usr/include/boost/type_traits/remove_pointer.hpp" 2 3 4 # 19 "/usr/include/boost/type_traits/transform_traits.hpp" 2 3 4 # 26 "/usr/include/boost/lambda/core.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/cv_traits.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/cv_traits.hpp" 3 4 # 1 "/usr/include/boost/type_traits/add_const.hpp" 1 3 4 # 16 "/usr/include/boost/type_traits/add_const.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 2 3 4 # 17 "/usr/include/boost/type_traits/add_const.hpp" 2 3 4 namespace boost { # 33 "/usr/include/boost/type_traits/add_const.hpp" 3 4 template< typename T > struct add_const { typedef T const type; }; template< typename T > struct add_const { typedef T& type; }; } # 1 "/usr/include/boost/type_traits/detail/type_trait_undef.hpp" 1 3 4 # 46 "/usr/include/boost/type_traits/add_const.hpp" 2 3 4 # 16 "/usr/include/boost/type_traits/cv_traits.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/add_volatile.hpp" 1 3 4 # 16 "/usr/include/boost/type_traits/add_volatile.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 2 3 4 # 17 "/usr/include/boost/type_traits/add_volatile.hpp" 2 3 4 namespace boost { # 33 "/usr/include/boost/type_traits/add_volatile.hpp" 3 4 template< typename T > struct add_volatile { typedef T volatile type; }; template< typename T > struct add_volatile { typedef T& type; }; } # 1 "/usr/include/boost/type_traits/detail/type_trait_undef.hpp" 1 3 4 # 46 "/usr/include/boost/type_traits/add_volatile.hpp" 2 3 4 # 17 "/usr/include/boost/type_traits/cv_traits.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/add_cv.hpp" 1 3 4 # 17 "/usr/include/boost/type_traits/add_cv.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 2 3 4 # 18 "/usr/include/boost/type_traits/add_cv.hpp" 2 3 4 namespace boost { # 34 "/usr/include/boost/type_traits/add_cv.hpp" 3 4 template< typename T > struct add_cv { typedef T const volatile type; }; template< typename T > struct add_cv { typedef T& type; }; } # 1 "/usr/include/boost/type_traits/detail/type_trait_undef.hpp" 1 3 4 # 47 "/usr/include/boost/type_traits/add_cv.hpp" 2 3 4 # 18 "/usr/include/boost/type_traits/cv_traits.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/is_const.hpp" 1 3 4 # 28 "/usr/include/boost/type_traits/is_const.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/cv_traits_impl.hpp" 1 3 4 # 23 "/usr/include/boost/type_traits/detail/cv_traits_impl.hpp" 3 4 namespace boost { namespace detail { template struct cv_traits_imp {}; template struct cv_traits_imp { static const bool is_const = false; static const bool is_volatile = false; typedef T unqualified_type; }; template struct cv_traits_imp { static const bool is_const = true; static const bool is_volatile = false; typedef T unqualified_type; }; template struct cv_traits_imp { static const bool is_const = false; static const bool is_volatile = true; typedef T unqualified_type; }; template struct cv_traits_imp { static const bool is_const = true; static const bool is_volatile = true; typedef T unqualified_type; }; # 92 "/usr/include/boost/type_traits/detail/cv_traits_impl.hpp" 3 4 } } # 29 "/usr/include/boost/type_traits/is_const.hpp" 2 3 4 # 43 "/usr/include/boost/type_traits/is_const.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 44 "/usr/include/boost/type_traits/is_const.hpp" 2 3 4 namespace boost { template< typename T > struct is_const : ::boost::integral_constant::is_const> { }; template< typename T > struct is_const< T& > : ::boost::integral_constant { }; # 137 "/usr/include/boost/type_traits/is_const.hpp" 3 4 } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 140 "/usr/include/boost/type_traits/is_const.hpp" 2 3 4 # 19 "/usr/include/boost/type_traits/cv_traits.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/is_volatile.hpp" 1 3 4 # 40 "/usr/include/boost/type_traits/is_volatile.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 41 "/usr/include/boost/type_traits/is_volatile.hpp" 2 3 4 namespace boost { template< typename T > struct is_volatile : ::boost::integral_constant::is_volatile> { }; template< typename T > struct is_volatile< T& > : ::boost::integral_constant { }; # 127 "/usr/include/boost/type_traits/is_volatile.hpp" 3 4 } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 130 "/usr/include/boost/type_traits/is_volatile.hpp" 2 3 4 # 20 "/usr/include/boost/type_traits/cv_traits.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/remove_const.hpp" 1 3 4 # 27 "/usr/include/boost/type_traits/remove_const.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 2 3 4 # 28 "/usr/include/boost/type_traits/remove_const.hpp" 2 3 4 namespace boost { namespace detail { template struct remove_const_helper { typedef T type; }; template struct remove_const_helper { typedef T volatile type; }; template struct remove_const_impl { typedef typename remove_const_helper< typename cv_traits_imp::unqualified_type , ::boost::is_volatile::value >::type type; }; } template< typename T > struct remove_const { typedef typename boost::detail::remove_const_impl::type type; }; template< typename T > struct remove_const { typedef T& type; }; template< typename T, std::size_t N > struct remove_const { typedef T type[N]; }; template< typename T, std::size_t N > struct remove_const { typedef T volatile type[N]; }; # 74 "/usr/include/boost/type_traits/remove_const.hpp" 3 4 } # 1 "/usr/include/boost/type_traits/detail/type_trait_undef.hpp" 1 3 4 # 77 "/usr/include/boost/type_traits/remove_const.hpp" 2 3 4 # 21 "/usr/include/boost/type_traits/cv_traits.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/remove_volatile.hpp" 1 3 4 # 27 "/usr/include/boost/type_traits/remove_volatile.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 2 3 4 # 28 "/usr/include/boost/type_traits/remove_volatile.hpp" 2 3 4 namespace boost { namespace detail { template struct remove_volatile_helper { typedef T type; }; template struct remove_volatile_helper { typedef T const type; }; template struct remove_volatile_impl { typedef typename remove_volatile_helper< typename cv_traits_imp::unqualified_type , ::boost::is_const::value >::type type; }; } template< typename T > struct remove_volatile { typedef typename boost::detail::remove_volatile_impl::type type; }; template< typename T > struct remove_volatile { typedef T& type; }; template< typename T, std::size_t N > struct remove_volatile { typedef T type[N]; }; template< typename T, std::size_t N > struct remove_volatile { typedef T const type[N]; }; # 73 "/usr/include/boost/type_traits/remove_volatile.hpp" 3 4 } # 1 "/usr/include/boost/type_traits/detail/type_trait_undef.hpp" 1 3 4 # 76 "/usr/include/boost/type_traits/remove_volatile.hpp" 2 3 4 # 22 "/usr/include/boost/type_traits/cv_traits.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/remove_cv.hpp" 1 3 4 # 26 "/usr/include/boost/type_traits/remove_cv.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/type_trait_def.hpp" 2 3 4 # 27 "/usr/include/boost/type_traits/remove_cv.hpp" 2 3 4 namespace boost { template< typename T > struct remove_cv { typedef typename boost::detail::cv_traits_imp::unqualified_type type; }; template< typename T > struct remove_cv { typedef T& type; }; template< typename T, std::size_t N > struct remove_cv { typedef T type[N]; }; template< typename T, std::size_t N > struct remove_cv { typedef T type[N]; }; template< typename T, std::size_t N > struct remove_cv { typedef T type[N]; }; # 57 "/usr/include/boost/type_traits/remove_cv.hpp" 3 4 } # 1 "/usr/include/boost/type_traits/detail/type_trait_undef.hpp" 1 3 4 # 60 "/usr/include/boost/type_traits/remove_cv.hpp" 2 3 4 # 23 "/usr/include/boost/type_traits/cv_traits.hpp" 2 3 4 # 27 "/usr/include/boost/lambda/core.hpp" 2 3 4 # 1 "/usr/include/boost/tuple/tuple.hpp" 1 3 4 # 32 "/usr/include/boost/tuple/tuple.hpp" 3 4 # 1 "/usr/include/boost/ref.hpp" 1 3 4 # 11 "/usr/include/boost/ref.hpp" 3 4 # 1 "/usr/include/boost/utility/addressof.hpp" 1 3 4 # 17 "/usr/include/boost/utility/addressof.hpp" 3 4 namespace boost { # 32 "/usr/include/boost/utility/addressof.hpp" 3 4 template T* addressof(T& v) { return reinterpret_cast( &const_cast(reinterpret_cast(v))); } # 56 "/usr/include/boost/utility/addressof.hpp" 3 4 } # 12 "/usr/include/boost/ref.hpp" 2 3 4 # 29 "/usr/include/boost/ref.hpp" 3 4 namespace boost { template class reference_wrapper { public: typedef T type; explicit reference_wrapper(T& t): t_(boost::addressof(t)) {} operator T& () const { return *t_; } T& get() const { return *t_; } T* get_pointer() const { return t_; } private: T* t_; }; template inline reference_wrapper const ref(T & t) { return reference_wrapper(t); } template inline reference_wrapper const cref(T const & t) { return reference_wrapper(t); } template class is_reference_wrapper : public mpl::false_ { }; template class unwrap_reference { public: typedef T type; }; # 106 "/usr/include/boost/ref.hpp" 3 4 template class is_reference_wrapper< reference_wrapper > : public mpl::true_ { }; template class unwrap_reference< reference_wrapper > { public: typedef T type; }; template class is_reference_wrapper< reference_wrapper const > : public mpl::true_ { }; template class unwrap_reference< reference_wrapper const > { public: typedef T type; }; template class is_reference_wrapper< reference_wrapper volatile > : public mpl::true_ { }; template class unwrap_reference< reference_wrapper volatile > { public: typedef T type; }; template class is_reference_wrapper< reference_wrapper const volatile > : public mpl::true_ { }; template class unwrap_reference< reference_wrapper const volatile > { public: typedef T type; }; # 176 "/usr/include/boost/ref.hpp" 3 4 } # 33 "/usr/include/boost/tuple/tuple.hpp" 2 3 4 # 1 "/usr/include/boost/tuple/detail/tuple_basic.hpp" 1 3 4 # 38 "/usr/include/boost/tuple/detail/tuple_basic.hpp" 3 4 # 1 "/usr/include/boost/type_traits/cv_traits.hpp" 1 3 4 # 39 "/usr/include/boost/tuple/detail/tuple_basic.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/function_traits.hpp" 1 3 4 # 13 "/usr/include/boost/type_traits/function_traits.hpp" 3 4 # 1 "/usr/include/boost/type_traits/is_function.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/is_function.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/false_result.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/false_result.hpp" 3 4 namespace boost { namespace type_traits { struct false_result { template struct result_ { static const bool value = false; }; }; }} # 16 "/usr/include/boost/type_traits/is_function.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/detail/is_function_ptr_helper.hpp" 1 3 4 # 26 "/usr/include/boost/type_traits/detail/is_function_ptr_helper.hpp" 3 4 namespace boost { namespace type_traits { template struct is_function_ptr_helper { static const bool value = false; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; # 203 "/usr/include/boost/type_traits/detail/is_function_ptr_helper.hpp" 3 4 } } # 20 "/usr/include/boost/type_traits/is_function.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 27 "/usr/include/boost/type_traits/is_function.hpp" 2 3 4 namespace boost { namespace detail { template struct is_function_chooser : ::boost::type_traits::false_result { }; template <> struct is_function_chooser { template< typename T > struct result_ : ::boost::type_traits::is_function_ptr_helper { }; }; template struct is_function_impl : is_function_chooser< ::boost::is_reference::value > ::template result_ { }; # 80 "/usr/include/boost/type_traits/is_function.hpp" 3 4 } template< typename T > struct is_function : ::boost::integral_constant::value> { }; } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 87 "/usr/include/boost/type_traits/is_function.hpp" 2 3 4 # 14 "/usr/include/boost/type_traits/function_traits.hpp" 2 3 4 namespace boost { namespace detail { template struct function_traits_helper; template struct function_traits_helper { static const int arity = 0; typedef R result_type; }; template struct function_traits_helper { static const int arity = 1; typedef R result_type; typedef T1 arg1_type; typedef T1 argument_type; }; template struct function_traits_helper { static const int arity = 2; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T1 first_argument_type; typedef T2 second_argument_type; }; template struct function_traits_helper { static const int arity = 3; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; }; template struct function_traits_helper { static const int arity = 4; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; }; template struct function_traits_helper { static const int arity = 5; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; typedef T5 arg5_type; }; template struct function_traits_helper { static const int arity = 6; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; typedef T5 arg5_type; typedef T6 arg6_type; }; template struct function_traits_helper { static const int arity = 7; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; typedef T5 arg5_type; typedef T6 arg6_type; typedef T7 arg7_type; }; template struct function_traits_helper { static const int arity = 8; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; typedef T5 arg5_type; typedef T6 arg6_type; typedef T7 arg7_type; typedef T8 arg8_type; }; template struct function_traits_helper { static const int arity = 9; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; typedef T5 arg5_type; typedef T6 arg6_type; typedef T7 arg7_type; typedef T8 arg8_type; typedef T9 arg9_type; }; template struct function_traits_helper { static const int arity = 10; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; typedef T5 arg5_type; typedef T6 arg6_type; typedef T7 arg7_type; typedef T8 arg8_type; typedef T9 arg9_type; typedef T10 arg10_type; }; } template struct function_traits : public detail::function_traits_helper::type> { }; # 234 "/usr/include/boost/type_traits/function_traits.hpp" 3 4 } # 40 "/usr/include/boost/tuple/detail/tuple_basic.hpp" 2 3 4 namespace boost { namespace tuples { struct null_type {}; namespace detail { inline const null_type cnull() { return null_type(); } template struct IF { typedef Then RET; }; template struct IF { typedef Else RET; }; } template struct cons; template < class T0 = null_type, class T1 = null_type, class T2 = null_type, class T3 = null_type, class T4 = null_type, class T5 = null_type, class T6 = null_type, class T7 = null_type, class T8 = null_type, class T9 = null_type> class tuple; template struct length; namespace detail { template class generate_error; template< int N > struct get_class { template inline static RET get(const cons& t) { return get_class::template get(t.tail); } template inline static RET get(cons& t) { return get_class::template get(t.tail); } }; template<> struct get_class<0> { template inline static RET get(const cons& t) { return t.head; } template inline static RET get(cons& t) { return t.head; } }; } # 140 "/usr/include/boost/tuple/detail/tuple_basic.hpp" 3 4 template struct element { private: typedef typename T::tail_type Next; public: typedef typename element::type type; }; template struct element<0,T> { typedef typename T::head_type type; }; template struct element { private: typedef typename T::tail_type Next; typedef typename element::type unqualified_type; public: typedef typename boost::add_const::type type; }; template struct element<0,const T> { typedef typename boost::add_const::type type; }; # 233 "/usr/include/boost/tuple/detail/tuple_basic.hpp" 3 4 template struct access_traits { typedef const T& const_type; typedef T& non_const_type; typedef const typename boost::remove_cv::type& parameter_type; }; template struct access_traits { typedef T& const_type; typedef T& non_const_type; typedef T& parameter_type; }; template inline typename access_traits< typename element >::type >::non_const_type get(cons& c ) { return detail::get_class::template get< typename access_traits< typename element >::type >::non_const_type, HT,TT >(c); } template inline typename access_traits< typename element >::type >::const_type get(const cons& c ) { return detail::get_class::template get< typename access_traits< typename element >::type >::const_type, HT,TT >(c); } namespace detail { template class non_storeable_type { non_storeable_type(); }; template struct wrap_non_storeable_type { typedef typename IF< ::boost::is_function::value, non_storeable_type, T >::RET type; }; template <> struct wrap_non_storeable_type { typedef non_storeable_type type; }; } template struct cons { typedef HT head_type; typedef TT tail_type; typedef typename detail::wrap_non_storeable_type::type stored_head_type; stored_head_type head; tail_type tail; typename access_traits::non_const_type get_head() { return head; } typename access_traits::non_const_type get_tail() { return tail; } typename access_traits::const_type get_head() const { return head; } typename access_traits::const_type get_tail() const { return tail; } cons() : head(), tail() {} cons(typename access_traits::parameter_type h, const tail_type& t) : head (h), tail(t) {} template cons( T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8, T9& t9, T10& t10 ) : head (t1), tail (t2, t3, t4, t5, t6, t7, t8, t9, t10, detail::cnull()) {} template cons( const null_type& , T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8, T9& t9, T10& t10 ) : head (), tail (t2, t3, t4, t5, t6, t7, t8, t9, t10, detail::cnull()) {} template cons( const cons& u ) : head(u.head), tail(u.tail) {} template cons& operator=( const cons& u ) { head=u.head; tail=u.tail; return *this; } cons& operator=(const cons& u) { head = u.head; tail = u.tail; return *this; } template cons& operator=( const std::pair& u ) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( length::value == 2 ) >)> boost_static_assert_typedef_388; head = u.first; tail.head = u.second; return *this; } template typename access_traits< typename element >::type >::non_const_type get() { return boost::tuples::get(*this); } template typename access_traits< typename element >::type >::const_type get() const { return boost::tuples::get(*this); } }; template struct cons { typedef HT head_type; typedef null_type tail_type; typedef cons self_type; typedef typename detail::wrap_non_storeable_type::type stored_head_type; stored_head_type head; typename access_traits::non_const_type get_head() { return head; } null_type get_tail() { return null_type(); } typename access_traits::const_type get_head() const { return head; } const null_type get_tail() const { return null_type(); } cons() : head() {} cons(typename access_traits::parameter_type h, const null_type& = null_type()) : head (h) {} template cons(T1& t1, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&) : head (t1) {} cons(const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&) : head () {} template cons( const cons& u ) : head(u.head) {} template cons& operator=(const cons& u ) { head = u.head; return *this; } cons& operator=(const cons& u) { head = u.head; return *this; } template typename access_traits< typename element::type >::non_const_type get() { return boost::tuples::get(*this); } template typename access_traits< typename element::type >::const_type get() const { return boost::tuples::get(*this); } }; template struct length { static const int value = 1 + length::value; }; template<> struct length > { static const int value = 0; }; template<> struct length { static const int value = 0; }; namespace detail { template struct map_tuple_to_cons { typedef cons::type > type; }; template <> struct map_tuple_to_cons { typedef null_type type; }; } template class tuple : public detail::map_tuple_to_cons::type { public: typedef typename detail::map_tuple_to_cons::type inherited; typedef typename inherited::head_type head_type; typedef typename inherited::tail_type tail_type; tuple() {} tuple(typename access_traits::parameter_type t0) : inherited(t0, detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1) : inherited(t0, t1, detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1, typename access_traits::parameter_type t2) : inherited(t0, t1, t2, detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1, typename access_traits::parameter_type t2, typename access_traits::parameter_type t3) : inherited(t0, t1, t2, t3, detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1, typename access_traits::parameter_type t2, typename access_traits::parameter_type t3, typename access_traits::parameter_type t4) : inherited(t0, t1, t2, t3, t4, detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1, typename access_traits::parameter_type t2, typename access_traits::parameter_type t3, typename access_traits::parameter_type t4, typename access_traits::parameter_type t5) : inherited(t0, t1, t2, t3, t4, t5, detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1, typename access_traits::parameter_type t2, typename access_traits::parameter_type t3, typename access_traits::parameter_type t4, typename access_traits::parameter_type t5, typename access_traits::parameter_type t6) : inherited(t0, t1, t2, t3, t4, t5, t6, detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1, typename access_traits::parameter_type t2, typename access_traits::parameter_type t3, typename access_traits::parameter_type t4, typename access_traits::parameter_type t5, typename access_traits::parameter_type t6, typename access_traits::parameter_type t7) : inherited(t0, t1, t2, t3, t4, t5, t6, t7, detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1, typename access_traits::parameter_type t2, typename access_traits::parameter_type t3, typename access_traits::parameter_type t4, typename access_traits::parameter_type t5, typename access_traits::parameter_type t6, typename access_traits::parameter_type t7, typename access_traits::parameter_type t8) : inherited(t0, t1, t2, t3, t4, t5, t6, t7, t8, detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1, typename access_traits::parameter_type t2, typename access_traits::parameter_type t3, typename access_traits::parameter_type t4, typename access_traits::parameter_type t5, typename access_traits::parameter_type t6, typename access_traits::parameter_type t7, typename access_traits::parameter_type t8, typename access_traits::parameter_type t9) : inherited(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) {} template tuple(const cons& p) : inherited(p) {} template tuple& operator=(const cons& k) { inherited::operator=(k); return *this; } template tuple& operator=(const std::pair& k) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( length::value == 2 ) >)> boost_static_assert_typedef_636; this->head = k.first; this->tail.head = k.second; return *this; } }; template <> class tuple : public null_type { public: typedef null_type inherited; }; namespace detail { struct swallow_assign { template swallow_assign const& operator=(const T&) const { return *this; } }; } detail::swallow_assign const ignore = detail::swallow_assign(); # 687 "/usr/include/boost/tuple/detail/tuple_basic.hpp" 3 4 template struct make_tuple_traits { typedef T type; }; # 711 "/usr/include/boost/tuple/detail/tuple_basic.hpp" 3 4 template struct make_tuple_traits { typedef typename detail::generate_error:: do_not_use_with_reference_type error; }; template struct make_tuple_traits { typedef const T (&type)[n]; }; template struct make_tuple_traits { typedef const T (&type)[n]; }; template struct make_tuple_traits { typedef const volatile T (&type)[n]; }; template struct make_tuple_traits { typedef const volatile T (&type)[n]; }; template struct make_tuple_traits >{ typedef T& type; }; template struct make_tuple_traits >{ typedef T& type; }; namespace detail { template < class T0 = null_type, class T1 = null_type, class T2 = null_type, class T3 = null_type, class T4 = null_type, class T5 = null_type, class T6 = null_type, class T7 = null_type, class T8 = null_type, class T9 = null_type > struct make_tuple_mapper { typedef tuple::type, typename make_tuple_traits::type, typename make_tuple_traits::type, typename make_tuple_traits::type, typename make_tuple_traits::type, typename make_tuple_traits::type, typename make_tuple_traits::type, typename make_tuple_traits::type, typename make_tuple_traits::type, typename make_tuple_traits::type> type; }; } inline tuple<> make_tuple() { return tuple<>(); } template inline typename detail::make_tuple_mapper::type make_tuple(const T0& t0) { typedef typename detail::make_tuple_mapper::type t; return t(t0); } template inline typename detail::make_tuple_mapper::type make_tuple(const T0& t0, const T1& t1) { typedef typename detail::make_tuple_mapper::type t; return t(t0, t1); } template inline typename detail::make_tuple_mapper::type make_tuple(const T0& t0, const T1& t1, const T2& t2) { typedef typename detail::make_tuple_mapper::type t; return t(t0, t1, t2); } template inline typename detail::make_tuple_mapper::type make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3) { typedef typename detail::make_tuple_mapper::type t; return t(t0, t1, t2, t3); } template inline typename detail::make_tuple_mapper::type make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4) { typedef typename detail::make_tuple_mapper::type t; return t(t0, t1, t2, t3, t4); } template inline typename detail::make_tuple_mapper::type make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5) { typedef typename detail::make_tuple_mapper::type t; return t(t0, t1, t2, t3, t4, t5); } template inline typename detail::make_tuple_mapper::type make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6) { typedef typename detail::make_tuple_mapper ::type t; return t(t0, t1, t2, t3, t4, t5, t6); } template inline typename detail::make_tuple_mapper::type make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7) { typedef typename detail::make_tuple_mapper ::type t; return t(t0, t1, t2, t3, t4, t5, t6, t7); } template inline typename detail::make_tuple_mapper ::type make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8) { typedef typename detail::make_tuple_mapper ::type t; return t(t0, t1, t2, t3, t4, t5, t6, t7, t8); } template inline typename detail::make_tuple_mapper ::type make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9) { typedef typename detail::make_tuple_mapper ::type t; return t(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9); } template inline tuple tie(T1& t1) { return tuple (t1); } template inline tuple tie(T1& t1, T2& t2) { return tuple (t1, t2); } template inline tuple tie(T1& t1, T2& t2, T3& t3) { return tuple (t1, t2, t3); } template inline tuple tie(T1& t1, T2& t2, T3& t3, T4& t4) { return tuple (t1, t2, t3, t4); } template inline tuple tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5) { return tuple (t1, t2, t3, t4, t5); } template inline tuple tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6) { return tuple (t1, t2, t3, t4, t5, t6); } template inline tuple tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7) { return tuple (t1, t2, t3, t4, t5, t6, t7); } template inline tuple tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8) { return tuple (t1, t2, t3, t4, t5, t6, t7, t8); } template inline tuple tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8, T9& t9) { return tuple (t1, t2, t3, t4, t5, t6, t7, t8, t9); } template inline tuple tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8, T9& t9, T10& t10) { return tuple (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); } } } # 34 "/usr/include/boost/tuple/tuple.hpp" 2 3 4 namespace boost { using tuples::tuple; using tuples::make_tuple; using tuples::tie; using tuples::get; # 87 "/usr/include/boost/tuple/tuple.hpp" 3 4 } # 29 "/usr/include/boost/lambda/core.hpp" 2 3 4 namespace boost { namespace lambda { using ::boost::tuples::tuple; using ::boost::tuples::null_type; } } # 1 "/usr/include/boost/lambda/detail/lambda_config.hpp" 1 3 4 # 41 "/usr/include/boost/lambda/core.hpp" 2 3 4 # 1 "/usr/include/boost/lambda/detail/lambda_fwd.hpp" 1 3 4 # 16 "/usr/include/boost/lambda/detail/lambda_fwd.hpp" 3 4 namespace boost { namespace lambda { namespace detail { template struct generate_error; } template struct placeholder; template struct function_adaptor; template class action; template class lambda_functor; template class lambda_functor_base; } } # 57 "/usr/include/boost/lambda/detail/lambda_fwd.hpp" 3 4 namespace boost { namespace lambda { namespace detail { template void do_nothing(A1&, A2&, A3&, A4&) {} } } } # 42 "/usr/include/boost/lambda/core.hpp" 2 3 4 # 1 "/usr/include/boost/lambda/detail/arity_code.hpp" 1 3 4 # 16 "/usr/include/boost/lambda/detail/arity_code.hpp" 3 4 # 1 "/usr/include/boost/type_traits/cv_traits.hpp" 1 3 4 # 17 "/usr/include/boost/lambda/detail/arity_code.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/transform_traits.hpp" 1 3 4 # 18 "/usr/include/boost/lambda/detail/arity_code.hpp" 2 3 4 namespace boost { namespace lambda { # 30 "/usr/include/boost/lambda/detail/arity_code.hpp" 3 4 enum { NONE = 0x00, FIRST = 0x01, SECOND = 0x02, THIRD = 0x04, EXCEPTION = 0x08, RETHROW = 0x10}; template struct get_tuple_arity; namespace detail { template struct get_arity_; } template struct get_arity { static const int value = detail::get_arity_::type>::type>::value; }; namespace detail { template struct get_arity_ { static const int value = 0; }; template struct get_arity_ > { static const int value = get_arity::value; }; template struct get_arity_ > { static const int value = get_tuple_arity::value; }; template struct get_arity_ > { static const int value = I; }; } template struct get_tuple_arity { static const int value = get_arity::value | get_tuple_arity::value; }; template<> struct get_tuple_arity { static const int value = 0; }; template struct has_placeholder { static const bool value = (get_arity::value & I) != 0; }; template struct includes_placeholder { static const bool value = (J & I) != 0; }; template struct lacks_placeholder { static const bool value = ((J & I) == 0); }; } } # 44 "/usr/include/boost/lambda/core.hpp" 2 3 4 # 1 "/usr/include/boost/lambda/detail/actions.hpp" 1 3 4 # 16 "/usr/include/boost/lambda/detail/actions.hpp" 3 4 namespace boost { namespace lambda { template class action; class assignment_action {}; class subscript_action {}; template class other_action; template class explicit_return_type_action {}; struct protect_action {}; struct comma_action {}; template struct is_protectable { static const bool value = false; }; template<> struct is_protectable > { static const bool value = true; }; namespace detail { class unspecified {}; } template class function_action {}; template class function_action<1, T> { public: template static RET apply(A1& a1) { return function_adaptor::type>:: template apply(a1); } }; template class function_action<2, T> { public: template static RET apply(A1& a1, A2& a2) { return function_adaptor::type>:: template apply(a1, a2); } }; template class function_action<3, T> { public: template static RET apply(A1& a1, A2& a2, A3& a3) { return function_adaptor::type>:: template apply(a1, a2, a3); } }; template class function_action<4, T> { public: template static RET apply(A1& a1, A2& a2, A3& a3, A4& a4) { return function_adaptor::type>:: template apply(a1, a2, a3, a4); } }; template class function_action<5, T> { public: template static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) { return function_adaptor::type>:: template apply(a1, a2, a3, a4, a5); } }; template class function_action<6, T> { public: template static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) { return function_adaptor::type>:: template apply(a1, a2, a3, a4, a5, a6); } }; template class function_action<7, T> { public: template static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) { return function_adaptor::type>:: template apply(a1, a2, a3, a4, a5, a6, a7); } }; template class function_action<8, T> { public: template static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) { return function_adaptor::type>:: template apply(a1, a2, a3, a4, a5, a6, a7, a8); } }; template class function_action<9, T> { public: template static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8, A9& a9) { return function_adaptor::type>:: template apply(a1, a2, a3, a4, a5, a6, a7, a8, a9); } }; template class function_action<10, T> { public: template static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8, A9& a9, A10& a10) { return function_adaptor::type>:: template apply(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); } }; } } # 45 "/usr/include/boost/lambda/core.hpp" 2 3 4 # 1 "/usr/include/boost/lambda/detail/lambda_traits.hpp" 1 3 4 # 17 "/usr/include/boost/lambda/detail/lambda_traits.hpp" 3 4 # 1 "/usr/include/boost/type_traits/function_traits.hpp" 1 3 4 # 18 "/usr/include/boost/lambda/detail/lambda_traits.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/object_traits.hpp" 1 3 4 # 17 "/usr/include/boost/type_traits/object_traits.hpp" 3 4 # 1 "/usr/include/boost/type_traits/has_trivial_assign.hpp" 1 3 4 # 13 "/usr/include/boost/type_traits/has_trivial_assign.hpp" 3 4 # 1 "/usr/include/boost/type_traits/intrinsics.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/has_trivial_assign.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/is_pod.hpp" 1 3 4 # 13 "/usr/include/boost/type_traits/is_pod.hpp" 3 4 # 1 "/usr/include/boost/type_traits/is_void.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/is_void.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 16 "/usr/include/boost/type_traits/is_void.hpp" 2 3 4 namespace boost { template< typename T > struct is_void : ::boost::integral_constant { }; template<> struct is_void< void > : ::boost::integral_constant { }; template<> struct is_void< void const > : ::boost::integral_constant { }; template<> struct is_void< void volatile > : ::boost::integral_constant { }; template<> struct is_void< void const volatile > : ::boost::integral_constant { }; } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 32 "/usr/include/boost/type_traits/is_void.hpp" 2 3 4 # 14 "/usr/include/boost/type_traits/is_pod.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/is_scalar.hpp" 1 3 4 # 12 "/usr/include/boost/type_traits/is_scalar.hpp" 3 4 # 1 "/usr/include/boost/type_traits/is_arithmetic.hpp" 1 3 4 # 12 "/usr/include/boost/type_traits/is_arithmetic.hpp" 3 4 # 1 "/usr/include/boost/type_traits/is_integral.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/is_integral.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 16 "/usr/include/boost/type_traits/is_integral.hpp" 2 3 4 namespace boost { template< typename T > struct is_integral : ::boost::integral_constant { }; template<> struct is_integral< unsigned char > : ::boost::integral_constant { }; template<> struct is_integral< unsigned char const > : ::boost::integral_constant { }; template<> struct is_integral< unsigned char volatile > : ::boost::integral_constant { }; template<> struct is_integral< unsigned char const volatile > : ::boost::integral_constant { }; template<> struct is_integral< unsigned short > : ::boost::integral_constant { }; template<> struct is_integral< unsigned short const > : ::boost::integral_constant { }; template<> struct is_integral< unsigned short volatile > : ::boost::integral_constant { }; template<> struct is_integral< unsigned short const volatile > : ::boost::integral_constant { }; template<> struct is_integral< unsigned int > : ::boost::integral_constant { }; template<> struct is_integral< unsigned int const > : ::boost::integral_constant { }; template<> struct is_integral< unsigned int volatile > : ::boost::integral_constant { }; template<> struct is_integral< unsigned int const volatile > : ::boost::integral_constant { }; template<> struct is_integral< unsigned long > : ::boost::integral_constant { }; template<> struct is_integral< unsigned long const > : ::boost::integral_constant { }; template<> struct is_integral< unsigned long volatile > : ::boost::integral_constant { }; template<> struct is_integral< unsigned long const volatile > : ::boost::integral_constant { }; template<> struct is_integral< signed char > : ::boost::integral_constant { }; template<> struct is_integral< signed char const > : ::boost::integral_constant { }; template<> struct is_integral< signed char volatile > : ::boost::integral_constant { }; template<> struct is_integral< signed char const volatile > : ::boost::integral_constant { }; template<> struct is_integral< signed short > : ::boost::integral_constant { }; template<> struct is_integral< signed short const > : ::boost::integral_constant { }; template<> struct is_integral< signed short volatile > : ::boost::integral_constant { }; template<> struct is_integral< signed short const volatile > : ::boost::integral_constant { }; template<> struct is_integral< signed int > : ::boost::integral_constant { }; template<> struct is_integral< signed int const > : ::boost::integral_constant { }; template<> struct is_integral< signed int volatile > : ::boost::integral_constant { }; template<> struct is_integral< signed int const volatile > : ::boost::integral_constant { }; template<> struct is_integral< signed long > : ::boost::integral_constant { }; template<> struct is_integral< signed long const > : ::boost::integral_constant { }; template<> struct is_integral< signed long volatile > : ::boost::integral_constant { }; template<> struct is_integral< signed long const volatile > : ::boost::integral_constant { }; template<> struct is_integral< bool > : ::boost::integral_constant { }; template<> struct is_integral< bool const > : ::boost::integral_constant { }; template<> struct is_integral< bool volatile > : ::boost::integral_constant { }; template<> struct is_integral< bool const volatile > : ::boost::integral_constant { }; template<> struct is_integral< char > : ::boost::integral_constant { }; template<> struct is_integral< char const > : ::boost::integral_constant { }; template<> struct is_integral< char volatile > : ::boost::integral_constant { }; template<> struct is_integral< char const volatile > : ::boost::integral_constant { }; template<> struct is_integral< wchar_t > : ::boost::integral_constant { }; template<> struct is_integral< wchar_t const > : ::boost::integral_constant { }; template<> struct is_integral< wchar_t volatile > : ::boost::integral_constant { }; template<> struct is_integral< wchar_t const volatile > : ::boost::integral_constant { }; # 60 "/usr/include/boost/type_traits/is_integral.hpp" 3 4 template<> struct is_integral< ::boost::ulong_long_type > : ::boost::integral_constant { }; template<> struct is_integral< ::boost::ulong_long_type const > : ::boost::integral_constant { }; template<> struct is_integral< ::boost::ulong_long_type volatile > : ::boost::integral_constant { }; template<> struct is_integral< ::boost::ulong_long_type const volatile > : ::boost::integral_constant { }; template<> struct is_integral< ::boost::long_long_type > : ::boost::integral_constant { }; template<> struct is_integral< ::boost::long_long_type const > : ::boost::integral_constant { }; template<> struct is_integral< ::boost::long_long_type volatile > : ::boost::integral_constant { }; template<> struct is_integral< ::boost::long_long_type const volatile > : ::boost::integral_constant { }; } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 70 "/usr/include/boost/type_traits/is_integral.hpp" 2 3 4 # 13 "/usr/include/boost/type_traits/is_arithmetic.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/is_float.hpp" 1 3 4 # 13 "/usr/include/boost/type_traits/is_float.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 14 "/usr/include/boost/type_traits/is_float.hpp" 2 3 4 namespace boost { template< typename T > struct is_float : ::boost::integral_constant { }; template<> struct is_float< float > : ::boost::integral_constant { }; template<> struct is_float< float const > : ::boost::integral_constant { }; template<> struct is_float< float volatile > : ::boost::integral_constant { }; template<> struct is_float< float const volatile > : ::boost::integral_constant { }; template<> struct is_float< double > : ::boost::integral_constant { }; template<> struct is_float< double const > : ::boost::integral_constant { }; template<> struct is_float< double volatile > : ::boost::integral_constant { }; template<> struct is_float< double const volatile > : ::boost::integral_constant { }; template<> struct is_float< long double > : ::boost::integral_constant { }; template<> struct is_float< long double const > : ::boost::integral_constant { }; template<> struct is_float< long double volatile > : ::boost::integral_constant { }; template<> struct is_float< long double const volatile > : ::boost::integral_constant { }; } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 26 "/usr/include/boost/type_traits/is_float.hpp" 2 3 4 # 14 "/usr/include/boost/type_traits/is_arithmetic.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 19 "/usr/include/boost/type_traits/is_arithmetic.hpp" 2 3 4 namespace boost { namespace detail { template< typename T > struct is_arithmetic_impl { static const bool value = (::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_float::value >::value); }; } template< typename T > struct is_arithmetic : ::boost::integral_constant::value> { }; } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 42 "/usr/include/boost/type_traits/is_arithmetic.hpp" 2 3 4 # 13 "/usr/include/boost/type_traits/is_scalar.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/is_enum.hpp" 1 3 4 # 17 "/usr/include/boost/type_traits/is_enum.hpp" 3 4 # 1 "/usr/include/boost/type_traits/is_convertible.hpp" 1 3 4 # 17 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4 # 1 "/usr/include/boost/type_traits/is_array.hpp" 1 3 4 # 27 "/usr/include/boost/type_traits/is_array.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 28 "/usr/include/boost/type_traits/is_array.hpp" 2 3 4 namespace boost { template< typename T > struct is_array : ::boost::integral_constant { }; template< typename T, std::size_t N > struct is_array< T[N] > : ::boost::integral_constant { }; template< typename T, std::size_t N > struct is_array< T const[N] > : ::boost::integral_constant { }; template< typename T, std::size_t N > struct is_array< T volatile[N] > : ::boost::integral_constant { }; template< typename T, std::size_t N > struct is_array< T const volatile[N] > : ::boost::integral_constant { }; template< typename T > struct is_array< T[] > : ::boost::integral_constant { }; template< typename T > struct is_array< T const[] > : ::boost::integral_constant { }; template< typename T > struct is_array< T volatile[] > : ::boost::integral_constant { }; template< typename T > struct is_array< T const volatile[] > : ::boost::integral_constant { }; # 86 "/usr/include/boost/type_traits/is_array.hpp" 3 4 } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 89 "/usr/include/boost/type_traits/is_array.hpp" 2 3 4 # 18 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/is_abstract.hpp" 1 3 4 # 53 "/usr/include/boost/type_traits/is_abstract.hpp" 3 4 # 1 "/usr/include/boost/type_traits/is_class.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/is_class.hpp" 3 4 # 1 "/usr/include/boost/type_traits/is_union.hpp" 1 3 4 # 19 "/usr/include/boost/type_traits/is_union.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 20 "/usr/include/boost/type_traits/is_union.hpp" 2 3 4 namespace boost { namespace detail { # 36 "/usr/include/boost/type_traits/is_union.hpp" 3 4 template struct is_union_impl { static const bool value = false; }; } template< typename T > struct is_union : ::boost::integral_constant::value> { }; } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 48 "/usr/include/boost/type_traits/is_union.hpp" 2 3 4 # 15 "/usr/include/boost/type_traits/is_class.hpp" 2 3 4 # 33 "/usr/include/boost/type_traits/is_class.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 34 "/usr/include/boost/type_traits/is_class.hpp" 2 3 4 namespace boost { namespace detail { # 53 "/usr/include/boost/type_traits/is_class.hpp" 3 4 template ::boost::type_traits::yes_type is_class_tester(void(U::*)(void)); template ::boost::type_traits::no_type is_class_tester(...); template struct is_class_impl { static const bool value = (::boost::type_traits::ice_and< sizeof(is_class_tester(0)) == sizeof(::boost::type_traits::yes_type), ::boost::type_traits::ice_not< ::boost::is_union::value >::value >::value); }; # 115 "/usr/include/boost/type_traits/is_class.hpp" 3 4 } template< typename T > struct is_class : ::boost::integral_constant::value> { }; } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 127 "/usr/include/boost/type_traits/is_class.hpp" 2 3 4 # 54 "/usr/include/boost/type_traits/is_abstract.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 60 "/usr/include/boost/type_traits/is_abstract.hpp" 2 3 4 namespace boost { namespace detail{ template struct is_abstract_imp2 { template static type_traits::no_type check_sig(U (*)[1]); template static type_traits::yes_type check_sig(...); typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( sizeof(T) != 0 ) >)> boost_static_assert_typedef_81; static const unsigned s1 = sizeof(is_abstract_imp2::template check_sig(0)); static const bool value = (s1 == sizeof(type_traits::yes_type)); }; template struct is_abstract_select { template struct rebind { typedef is_abstract_imp2 type; }; }; template <> struct is_abstract_select { template struct rebind { typedef false_type type; }; }; template struct is_abstract_imp { typedef is_abstract_select< ::boost::is_class::value> selector; typedef typename selector::template rebind binder; typedef typename binder::type type; static const bool value = type::value; }; } template< typename T > struct is_abstract : ::boost::integral_constant::value> { }; } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 136 "/usr/include/boost/type_traits/is_abstract.hpp" 2 3 4 # 24 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 # 32 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 33 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 namespace boost { # 46 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4 namespace detail { # 113 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4 struct any_conversion { template any_conversion(const volatile T&); template any_conversion(T&); }; template struct checker { static boost::type_traits::no_type _m_check(any_conversion ...); static boost::type_traits::yes_type _m_check(T, int); }; template struct is_convertible_basic_impl { static From _m_from; static bool const value = sizeof( detail::checker::_m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type); }; # 282 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4 template struct is_convertible_impl { typedef typename add_reference::type ref_type; static const bool value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::detail::is_convertible_basic_impl::value, ::boost::is_void::value >::value, ::boost::type_traits::ice_not< ::boost::is_array::value >::value >::value); # 297 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4 }; template struct is_convertible_impl_select { template struct rebind { typedef is_convertible_impl type; }; }; template <> struct is_convertible_impl_select { template struct rebind { typedef true_type type; }; }; template <> struct is_convertible_impl_select { template struct rebind { typedef false_type type; }; }; template <> struct is_convertible_impl_select { template struct rebind { typedef false_type type; }; }; template struct is_convertible_impl_dispatch_base { typedef is_convertible_impl_select< ::boost::is_arithmetic::value, ::boost::is_arithmetic::value, ::boost::is_abstract::value > selector; typedef typename selector::template rebind isc_binder; typedef typename isc_binder::type type; }; template struct is_convertible_impl_dispatch : public is_convertible_impl_dispatch_base::type {}; # 385 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4 template<> struct is_convertible_impl< void,void > { static const bool value = (true); }; template<> struct is_convertible_impl< void,void const > { static const bool value = (true); }; template<> struct is_convertible_impl< void,void volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void,void const volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void const,void > { static const bool value = (true); }; template<> struct is_convertible_impl< void const,void const > { static const bool value = (true); }; template<> struct is_convertible_impl< void const,void volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void const,void const volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void > { static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void const > { static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void const volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void > { static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void const > { static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void const volatile > { static const bool value = (true); }; # 395 "/usr/include/boost/type_traits/is_convertible.hpp" 3 4 template< typename To > struct is_convertible_impl< void,To > { static const bool value = (false); }; template< typename From > struct is_convertible_impl< From,void > { static const bool value = (true); }; template< typename To > struct is_convertible_impl< void const,To > { static const bool value = (false); }; template< typename To > struct is_convertible_impl< void volatile,To > { static const bool value = (false); }; template< typename To > struct is_convertible_impl< void const volatile,To > { static const bool value = (false); }; template< typename From > struct is_convertible_impl< From,void const > { static const bool value = (true); }; template< typename From > struct is_convertible_impl< From,void volatile > { static const bool value = (true); }; template< typename From > struct is_convertible_impl< From,void const volatile > { static const bool value = (true); }; } template< typename From, typename To > struct is_convertible : ::boost::integral_constant::value)> { }; } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 414 "/usr/include/boost/type_traits/is_convertible.hpp" 2 3 4 # 18 "/usr/include/boost/type_traits/is_enum.hpp" 2 3 4 # 30 "/usr/include/boost/type_traits/is_enum.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 31 "/usr/include/boost/type_traits/is_enum.hpp" 2 3 4 namespace boost { namespace detail { template struct is_class_or_union { static const bool value = (::boost::type_traits::ice_or< ::boost::is_class::value , ::boost::is_union::value >::value); }; # 75 "/usr/include/boost/type_traits/is_enum.hpp" 3 4 struct int_convertible { int_convertible(int); }; template struct is_enum_helper { template struct type { static const bool value = false; }; }; template <> struct is_enum_helper { template struct type : ::boost::is_convertible::type,::boost::detail::int_convertible> { }; }; template struct is_enum_impl { # 112 "/usr/include/boost/type_traits/is_enum.hpp" 3 4 static const bool selector = (::boost::type_traits::ice_or< ::boost::is_arithmetic::value , ::boost::is_reference::value , ::boost::is_function::value , is_class_or_union::value , is_array::value >::value); # 149 "/usr/include/boost/type_traits/is_enum.hpp" 3 4 typedef ::boost::detail::is_enum_helper se_t; typedef typename se_t::template type helper; static const bool value = helper::value; }; template<> struct is_enum_impl< void > { static const bool value = (false); }; template<> struct is_enum_impl< void const > { static const bool value = (false); }; template<> struct is_enum_impl< void volatile > { static const bool value = (false); }; template<> struct is_enum_impl< void const volatile > { static const bool value = (false); }; } template< typename T > struct is_enum : ::boost::integral_constant::value> { }; # 176 "/usr/include/boost/type_traits/is_enum.hpp" 3 4 } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 179 "/usr/include/boost/type_traits/is_enum.hpp" 2 3 4 # 14 "/usr/include/boost/type_traits/is_scalar.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/is_pointer.hpp" 1 3 4 # 24 "/usr/include/boost/type_traits/is_pointer.hpp" 3 4 # 1 "/usr/include/boost/type_traits/is_member_pointer.hpp" 1 3 4 # 28 "/usr/include/boost/type_traits/is_member_pointer.hpp" 3 4 # 1 "/usr/include/boost/type_traits/is_member_function_pointer.hpp" 1 3 4 # 24 "/usr/include/boost/type_traits/is_member_function_pointer.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp" 1 3 4 # 25 "/usr/include/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp" 3 4 namespace boost { namespace type_traits { template struct is_mem_fun_pointer_impl { static const bool value = false; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; # 776 "/usr/include/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp" 3 4 } } # 25 "/usr/include/boost/type_traits/is_member_function_pointer.hpp" 2 3 4 # 35 "/usr/include/boost/type_traits/is_member_function_pointer.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 36 "/usr/include/boost/type_traits/is_member_function_pointer.hpp" 2 3 4 namespace boost { template< typename T > struct is_member_function_pointer : ::boost::integral_constant::value> { }; # 122 "/usr/include/boost/type_traits/is_member_function_pointer.hpp" 3 4 } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 125 "/usr/include/boost/type_traits/is_member_function_pointer.hpp" 2 3 4 # 29 "/usr/include/boost/type_traits/is_member_pointer.hpp" 2 3 4 # 39 "/usr/include/boost/type_traits/is_member_pointer.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 40 "/usr/include/boost/type_traits/is_member_pointer.hpp" 2 3 4 namespace boost { template< typename T > struct is_member_pointer : ::boost::integral_constant::value> { }; template< typename T, typename U > struct is_member_pointer< U T::* > : ::boost::integral_constant { }; # 104 "/usr/include/boost/type_traits/is_member_pointer.hpp" 3 4 } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 107 "/usr/include/boost/type_traits/is_member_pointer.hpp" 2 3 4 # 25 "/usr/include/boost/type_traits/is_pointer.hpp" 2 3 4 # 38 "/usr/include/boost/type_traits/is_pointer.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 39 "/usr/include/boost/type_traits/is_pointer.hpp" 2 3 4 namespace boost { namespace detail { template< typename T > struct is_pointer_helper { static const bool value = false; }; # 58 "/usr/include/boost/type_traits/is_pointer.hpp" 3 4 template< typename T > struct is_pointer_helper { static const bool value = true; }; template< typename T > struct is_pointer_helper { static const bool value = true; }; template< typename T > struct is_pointer_helper { static const bool value = true; }; template< typename T > struct is_pointer_helper { static const bool value = true; }; template< typename T > struct is_pointer_impl { static const bool value = (::boost::type_traits::ice_and< ::boost::detail::is_pointer_helper::value , ::boost::type_traits::ice_not< ::boost::is_member_pointer::value >::value >::value); }; } template< typename T > struct is_pointer : ::boost::integral_constant::value> { }; # 145 "/usr/include/boost/type_traits/is_pointer.hpp" 3 4 } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 148 "/usr/include/boost/type_traits/is_pointer.hpp" 2 3 4 # 15 "/usr/include/boost/type_traits/is_scalar.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 21 "/usr/include/boost/type_traits/is_scalar.hpp" 2 3 4 namespace boost { namespace detail { template struct is_scalar_impl { static const bool value = (::boost::type_traits::ice_or< ::boost::is_arithmetic::value, ::boost::is_enum::value, ::boost::is_pointer::value, ::boost::is_member_pointer::value >::value); }; template <> struct is_scalar_impl{ static const bool value = false; }; template <> struct is_scalar_impl{ static const bool value = false; }; template <> struct is_scalar_impl{ static const bool value = false; }; template <> struct is_scalar_impl{ static const bool value = false; }; } template< typename T > struct is_scalar : ::boost::integral_constant::value> { }; } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 54 "/usr/include/boost/type_traits/is_scalar.hpp" 2 3 4 # 15 "/usr/include/boost/type_traits/is_pod.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 22 "/usr/include/boost/type_traits/is_pod.hpp" 2 3 4 namespace boost { template< typename T > struct is_POD; namespace detail { template struct is_pod_impl { static const bool value = (::boost::type_traits::ice_or< ::boost::is_scalar::value, ::boost::is_void::value, false >::value); }; template struct is_pod_impl : is_pod_impl { }; # 118 "/usr/include/boost/type_traits/is_pod.hpp" 3 4 template<> struct is_pod_impl< void > { static const bool value = (true); }; template<> struct is_pod_impl< void const > { static const bool value = (true); }; template<> struct is_pod_impl< void volatile > { static const bool value = (true); }; template<> struct is_pod_impl< void const volatile > { static const bool value = (true); }; } template< typename T > struct is_POD : ::boost::integral_constant::value> { }; template< typename T > struct is_pod : ::boost::integral_constant::value> { }; } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 134 "/usr/include/boost/type_traits/is_pod.hpp" 2 3 4 # 15 "/usr/include/boost/type_traits/has_trivial_assign.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 23 "/usr/include/boost/type_traits/has_trivial_assign.hpp" 2 3 4 namespace boost { namespace detail { template struct has_trivial_assign_impl { static const bool value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::is_pod::value, false >::value, ::boost::type_traits::ice_not< ::boost::is_const::value >::value, ::boost::type_traits::ice_not< ::boost::is_volatile::value >::value >::value); # 40 "/usr/include/boost/type_traits/has_trivial_assign.hpp" 3 4 }; } template< typename T > struct has_trivial_assign : ::boost::integral_constant::value> { }; } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 49 "/usr/include/boost/type_traits/has_trivial_assign.hpp" 2 3 4 # 18 "/usr/include/boost/type_traits/object_traits.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/has_trivial_constructor.hpp" 1 3 4 # 18 "/usr/include/boost/type_traits/has_trivial_constructor.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 19 "/usr/include/boost/type_traits/has_trivial_constructor.hpp" 2 3 4 namespace boost { namespace detail { template struct has_trivial_ctor_impl { static const bool value = (::boost::type_traits::ice_or< ::boost::is_pod::value, false >::value); }; } template< typename T > struct has_trivial_constructor : ::boost::integral_constant::value> { }; } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 41 "/usr/include/boost/type_traits/has_trivial_constructor.hpp" 2 3 4 # 19 "/usr/include/boost/type_traits/object_traits.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/has_trivial_copy.hpp" 1 3 4 # 21 "/usr/include/boost/type_traits/has_trivial_copy.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 22 "/usr/include/boost/type_traits/has_trivial_copy.hpp" 2 3 4 namespace boost { namespace detail { template struct has_trivial_copy_impl { static const bool value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::is_pod::value, false >::value, ::boost::type_traits::ice_not< ::boost::is_volatile::value >::value >::value); }; } template< typename T > struct has_trivial_copy : ::boost::integral_constant::value> { }; } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 47 "/usr/include/boost/type_traits/has_trivial_copy.hpp" 2 3 4 # 20 "/usr/include/boost/type_traits/object_traits.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/has_trivial_destructor.hpp" 1 3 4 # 18 "/usr/include/boost/type_traits/has_trivial_destructor.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 19 "/usr/include/boost/type_traits/has_trivial_destructor.hpp" 2 3 4 namespace boost { namespace detail { template struct has_trivial_dtor_impl { static const bool value = (::boost::type_traits::ice_or< ::boost::is_pod::value, false >::value); }; } template< typename T > struct has_trivial_destructor : ::boost::integral_constant::value> { }; } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 41 "/usr/include/boost/type_traits/has_trivial_destructor.hpp" 2 3 4 # 21 "/usr/include/boost/type_traits/object_traits.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/has_nothrow_constructor.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/has_nothrow_constructor.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 16 "/usr/include/boost/type_traits/has_nothrow_constructor.hpp" 2 3 4 namespace boost { namespace detail{ template struct has_nothrow_constructor_imp{ static const bool value = (::boost::type_traits::ice_or< ::boost::has_trivial_constructor::value, false >::value); }; } template< typename T > struct has_nothrow_constructor : ::boost::integral_constant::value> { }; } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 37 "/usr/include/boost/type_traits/has_nothrow_constructor.hpp" 2 3 4 # 22 "/usr/include/boost/type_traits/object_traits.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/has_nothrow_copy.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/has_nothrow_copy.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 16 "/usr/include/boost/type_traits/has_nothrow_copy.hpp" 2 3 4 namespace boost { namespace detail{ template struct has_nothrow_copy_imp{ static const bool value = (::boost::type_traits::ice_or< ::boost::has_trivial_copy::value, false >::value); }; } template< typename T > struct has_nothrow_copy : ::boost::integral_constant::value> { }; } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 37 "/usr/include/boost/type_traits/has_nothrow_copy.hpp" 2 3 4 # 23 "/usr/include/boost/type_traits/object_traits.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/has_nothrow_assign.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/has_nothrow_assign.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 16 "/usr/include/boost/type_traits/has_nothrow_assign.hpp" 2 3 4 namespace boost { namespace detail{ template struct has_nothrow_assign_imp{ static const bool value = (::boost::type_traits::ice_or< ::boost::has_trivial_assign::value, false >::value); }; } template< typename T > struct has_nothrow_assign : ::boost::integral_constant::value> { }; } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 37 "/usr/include/boost/type_traits/has_nothrow_assign.hpp" 2 3 4 # 24 "/usr/include/boost/type_traits/object_traits.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/is_base_and_derived.hpp" 1 3 4 # 13 "/usr/include/boost/type_traits/is_base_and_derived.hpp" 3 4 # 1 "/usr/include/boost/type_traits/is_same.hpp" 1 3 4 # 31 "/usr/include/boost/type_traits/is_same.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 32 "/usr/include/boost/type_traits/is_same.hpp" 2 3 4 namespace boost { template< typename T, typename U > struct is_same : ::boost::integral_constant { }; template< typename T > struct is_same< T,T > : ::boost::integral_constant { }; # 98 "/usr/include/boost/type_traits/is_same.hpp" 3 4 } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 101 "/usr/include/boost/type_traits/is_same.hpp" 2 3 4 # 14 "/usr/include/boost/type_traits/is_base_and_derived.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 21 "/usr/include/boost/type_traits/is_base_and_derived.hpp" 2 3 4 namespace boost { namespace detail { # 110 "/usr/include/boost/type_traits/is_base_and_derived.hpp" 3 4 template struct bd_helper { template static type_traits::yes_type check_sig(D const volatile *, T); static type_traits::no_type check_sig(B const volatile *, int); }; template struct is_base_and_derived_impl2 { struct Host { operator B const volatile *() const; operator D const volatile *(); }; static const bool value = sizeof(bd_helper::check_sig(Host(), 0)) == sizeof(type_traits::yes_type); }; # 161 "/usr/include/boost/type_traits/is_base_and_derived.hpp" 3 4 template struct is_base_and_derived_impl3 { static const bool value = false; }; template struct is_base_and_derived_select { template struct rebind { typedef is_base_and_derived_impl3 type; }; }; template <> struct is_base_and_derived_select { template struct rebind { typedef is_base_and_derived_impl2 type; }; }; template struct is_base_and_derived_impl { typedef typename remove_cv::type ncvB; typedef typename remove_cv::type ncvD; typedef is_base_and_derived_select< ::boost::is_class::value, ::boost::is_class::value, ::boost::is_same::value> selector; typedef typename selector::template rebind binder; typedef typename binder::type bound_type; static const bool value = bound_type::value; }; } template< typename Base, typename Derived > struct is_base_and_derived : ::boost::integral_constant::value)> { }; template< typename Base, typename Derived > struct is_base_and_derived< Base&,Derived > : ::boost::integral_constant { }; template< typename Base, typename Derived > struct is_base_and_derived< Base,Derived& > : ::boost::integral_constant { }; template< typename Base, typename Derived > struct is_base_and_derived< Base&,Derived& > : ::boost::integral_constant { }; } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 221 "/usr/include/boost/type_traits/is_base_and_derived.hpp" 2 3 4 # 25 "/usr/include/boost/type_traits/object_traits.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/is_compound.hpp" 1 3 4 # 13 "/usr/include/boost/type_traits/is_compound.hpp" 3 4 # 1 "/usr/include/boost/type_traits/is_fundamental.hpp" 1 3 4 # 17 "/usr/include/boost/type_traits/is_fundamental.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 18 "/usr/include/boost/type_traits/is_fundamental.hpp" 2 3 4 namespace boost { namespace detail { template struct is_fundamental_impl : ::boost::type_traits::ice_or< ::boost::is_arithmetic::value , ::boost::is_void::value > { }; } template< typename T > struct is_fundamental : ::boost::integral_constant::value> { }; } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 40 "/usr/include/boost/type_traits/is_fundamental.hpp" 2 3 4 # 14 "/usr/include/boost/type_traits/is_compound.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 18 "/usr/include/boost/type_traits/is_compound.hpp" 2 3 4 namespace boost { namespace detail { template struct is_compound_impl { static const bool value = (::boost::type_traits::ice_not< ::boost::is_fundamental::value >::value); }; } template< typename T > struct is_compound : ::boost::integral_constant::value> { }; } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 39 "/usr/include/boost/type_traits/is_compound.hpp" 2 3 4 # 27 "/usr/include/boost/type_traits/object_traits.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/is_empty.hpp" 1 3 4 # 32 "/usr/include/boost/type_traits/is_empty.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 33 "/usr/include/boost/type_traits/is_empty.hpp" 2 3 4 namespace boost { namespace detail { template struct empty_helper_t1 : public T { empty_helper_t1(); int i[256]; private: empty_helper_t1(const empty_helper_t1&); empty_helper_t1& operator=(const empty_helper_t1&); }; struct empty_helper_t2 { int i[256]; }; template struct empty_helper { static const bool value = false; }; template struct empty_helper { static const bool value = (sizeof(empty_helper_t1) == sizeof(empty_helper_t2)); }; template struct is_empty_impl { typedef typename remove_cv::type cvt; static const bool value = ( ::boost::type_traits::ice_or< ::boost::detail::empty_helper::value>::value , false >::value ); }; # 195 "/usr/include/boost/type_traits/is_empty.hpp" 3 4 template<> struct is_empty_impl< void > { static const bool value = (false); }; template<> struct is_empty_impl< void const > { static const bool value = (false); }; template<> struct is_empty_impl< void volatile > { static const bool value = (false); }; template<> struct is_empty_impl< void const volatile > { static const bool value = (false); }; } template< typename T > struct is_empty : ::boost::integral_constant::value> { }; } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 209 "/usr/include/boost/type_traits/is_empty.hpp" 2 3 4 # 28 "/usr/include/boost/type_traits/object_traits.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/is_object.hpp" 1 3 4 # 20 "/usr/include/boost/type_traits/is_object.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 21 "/usr/include/boost/type_traits/is_object.hpp" 2 3 4 namespace boost { namespace detail { template struct is_object_impl { static const bool value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_not< ::boost::is_reference::value>::value, ::boost::type_traits::ice_not< ::boost::is_void::value>::value, ::boost::type_traits::ice_not< ::boost::is_function::value>::value >::value); # 43 "/usr/include/boost/type_traits/is_object.hpp" 3 4 }; } template< typename T > struct is_object : ::boost::integral_constant::value> { }; } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 52 "/usr/include/boost/type_traits/is_object.hpp" 2 3 4 # 29 "/usr/include/boost/type_traits/object_traits.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/is_stateless.hpp" 1 3 4 # 21 "/usr/include/boost/type_traits/is_stateless.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 22 "/usr/include/boost/type_traits/is_stateless.hpp" 2 3 4 namespace boost { namespace detail { template struct is_stateless_impl { static const bool value = (::boost::type_traits::ice_and< ::boost::has_trivial_constructor::value, ::boost::has_trivial_copy::value, ::boost::has_trivial_destructor::value, ::boost::is_class::value, ::boost::is_empty::value >::value); }; } template< typename T > struct is_stateless : ::boost::integral_constant::value> { }; } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 47 "/usr/include/boost/type_traits/is_stateless.hpp" 2 3 4 # 32 "/usr/include/boost/type_traits/object_traits.hpp" 2 3 4 # 19 "/usr/include/boost/lambda/detail/lambda_traits.hpp" 2 3 4 namespace boost { namespace lambda { namespace detail { template struct IF { typedef Then RET; }; template struct IF { typedef Else RET; }; # 42 "/usr/include/boost/lambda/detail/lambda_traits.hpp" 3 4 template struct IF_type_ { typedef typename T::type type; }; template struct IF_type { typedef typename IF_type_::RET >::type type; }; template struct identity_mapping { typedef T type; }; template struct IF_value_ { static const int value = T::value; }; template struct IF_value { static const int value = (IF_value_::RET>::value); }; template class remove_reference_if_valid { typedef typename boost::remove_reference::type plainT; public: typedef typename IF< boost::is_function::value, T, plainT >::RET type; }; template struct remove_reference_and_cv { typedef typename boost::remove_cv< typename boost::remove_reference::type >::type type; }; template struct tuple_element_as_reference { typedef typename boost::tuples::access_traits< typename boost::tuples::element::type >::non_const_type type; }; template struct tuple_element_stripped { typedef typename remove_reference_and_cv< typename boost::tuples::element::type >::type type; }; template struct is_lambda_functor_ { static const bool value = false; }; template struct is_lambda_functor_ > { static const bool value = true; }; } template struct is_lambda_functor { static const bool value = detail::is_lambda_functor_< typename detail::remove_reference_and_cv::type >::value; }; namespace detail { # 158 "/usr/include/boost/lambda/detail/lambda_traits.hpp" 3 4 template struct parameter_traits_ { typedef T2 type; }; template struct parameter_traits_ { typedef typename generate_error:: parameter_traits_class_instantiated_with_reference_type type; }; template struct parameter_traits_ { typedef T (&type)[n]; }; template struct parameter_traits_ { typedef const T (&type)[n]; }; template struct parameter_traits_ { typedef volatile T (&type)[n]; }; template struct parameter_traits_ { typedef const volatile T (&type)[n]; }; template struct parameter_traits_, Any >{ typedef T& type; }; template struct parameter_traits_, Any >{ typedef T& type; }; template struct parameter_traits_, Any >{ typedef T& type; }; template struct parameter_traits_, Any >{ typedef T& type; }; template struct parameter_traits_ { typedef void type; }; template struct parameter_traits_, Any > { typedef lambda_functor type; }; template struct parameter_traits_, Any > { typedef lambda_functor type; }; template struct parameter_traits_, Any > { typedef lambda_functor type; }; template struct parameter_traits_, Any > { typedef lambda_functor type; }; } # 250 "/usr/include/boost/lambda/detail/lambda_traits.hpp" 3 4 template struct const_copy_argument { typedef typename detail::parameter_traits_< T, typename detail::IF::value, T&, const T>::RET >::type type; }; # 266 "/usr/include/boost/lambda/detail/lambda_traits.hpp" 3 4 template struct const_copy_argument { typedef const T (&type)[n]; }; template struct const_copy_argument { typedef const volatile T (&type)[n]; }; template struct const_copy_argument {}; template<> struct const_copy_argument { typedef void type; }; template struct bound_argument_conversion { typedef typename const_copy_argument::type type; }; template struct bound_argument_conversion { typedef T& type; }; template struct reference_argument { typedef typename detail::parameter_traits_::type type; }; template struct reference_argument { typedef typename detail::generate_error::references_not_allowed type; }; template struct reference_argument > { typedef lambda_functor type; }; template struct reference_argument > { typedef lambda_functor type; }; template struct reference_argument > { typedef lambda_functor type; }; template struct reference_argument > { typedef lambda_functor type; }; template<> struct reference_argument { typedef void type; }; namespace detail { template struct array_to_pointer { typedef T type; }; template struct array_to_pointer { typedef const T* type; }; template struct array_to_pointer { typedef T* type; }; template struct array_to_pointer { typedef const T* type; }; template struct array_to_pointer { typedef T* type; }; # 387 "/usr/include/boost/lambda/detail/lambda_traits.hpp" 3 4 template struct bind_traits { typedef const T type; }; template struct bind_traits { typedef T& type; }; template<> struct bind_traits { typedef null_type type; }; template<> struct bind_traits { typedef null_type type; }; template struct bind_traits { typedef const T (&type)[n]; }; template struct bind_traits { typedef const T (&type)[n]; }; template struct bind_traits { typedef const volatile T (&type)[n]; }; template struct bind_traits { typedef const volatile T (&type)[n]; }; template struct bind_traits >{ typedef T& type; }; template struct bind_traits >{ typedef T& type; }; template<> struct bind_traits { typedef void type; }; template < class T0 = null_type, class T1 = null_type, class T2 = null_type, class T3 = null_type, class T4 = null_type, class T5 = null_type, class T6 = null_type, class T7 = null_type, class T8 = null_type, class T9 = null_type > struct bind_tuple_mapper { typedef tuple::type, typename bind_traits::type, typename bind_traits::type, typename bind_traits::type, typename bind_traits::type, typename bind_traits::type, typename bind_traits::type, typename bind_traits::type, typename bind_traits::type, typename bind_traits::type> type; }; template struct remove_const_reference { typedef typename bind_traits::type type; }; template struct remove_const_reference { typedef const T type; }; template < class T0 = null_type, class T1 = null_type, class T2 = null_type, class T3 = null_type, class T4 = null_type, class T5 = null_type, class T6 = null_type, class T7 = null_type, class T8 = null_type, class T9 = null_type > class bind_type_generator { typedef typename detail::bind_tuple_mapper< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type args_t; static const int nof_elems = boost::tuples::length::value; typedef action< nof_elems, function_action > action_type; public: typedef lambda_functor< lambda_functor_base< action_type, args_t > > type; }; } template inline const T& make_const(const T& t) { return t; } } } # 47 "/usr/include/boost/lambda/core.hpp" 2 3 4 # 1 "/usr/include/boost/lambda/detail/function_adaptors.hpp" 1 3 4 # 15 "/usr/include/boost/lambda/detail/function_adaptors.hpp" 3 4 # 1 "/usr/include/boost/type_traits/same_traits.hpp" 1 3 4 # 16 "/usr/include/boost/lambda/detail/function_adaptors.hpp" 2 3 4 namespace boost { namespace lambda { template struct function_adaptor { template class sig { typedef typename Args::head_type F; typedef typename detail::remove_reference_and_cv::type plainF; public: typedef typename plainF::template sig::type type; }; template static RET apply(A1& a1) { return a1(); } template static RET apply(A1& a1, A2& a2) { return a1(a2); } template static RET apply(A1& a1, A2& a2, A3& a3) { return a1(a2, a3); } template static RET apply(A1& a1, A2& a2, A3& a3, A4& a4) { return a1(a2, a3, a4); } template static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) { return a1(a2, a3, a4, a5); } template static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) { return a1(a2, a3, a4, a5, a6); } template static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) { return a1(a2, a3, a4, a5, a6, a7); } template static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) { return a1(a2, a3, a4, a5, a6, a7, a8); } template static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8, A9& a9) { return a1(a2, a3, a4, a5, a6, a7, a8, a9); } template static RET apply(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8, A9& a9, A10& a10) { return a1(a2, a3, a4, a5, a6, a7, a8, a9, a10); } }; template struct function_adaptor; template struct function_adaptor { template class sig { typedef typename boost::tuples::element<1, Args>::type argument_type; typedef typename detail::IF::value, typename boost::add_const::type, T >::RET properly_consted_return_type; typedef typename detail::IF< boost::is_volatile::value, typename boost::add_volatile::type, properly_consted_return_type >::RET properly_cvd_return_type; public: typedef typename boost::add_reference::type type; }; template static RET apply( T Object::*data, Object& o) { return o.*data; } template static RET apply( T Object::*data, const Object& o) { return o.*data; } template static RET apply( T Object::*data, volatile Object& o) { return o.*data; } template static RET apply( T Object::*data, const volatile Object& o) { return o.*data; } template static RET apply( T Object::*data, Object* o) { return o->*data; } template static RET apply( T Object::*data, const Object* o) { return o->*data; } template static RET apply( T Object::*data, volatile Object* o) { return o->*data; } template static RET apply( T Object::*data, const volatile Object* o) { return o->*data; } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply(Result (*func)()) { return func(); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply(Result (*func)()) { return func(); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply( Result (Object::*func)() const, const Object* o) { return (o->*func)(); } template static Result apply( Result (Object::*func)() const, const Object& o) { return (o.*func)(); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply( Result (Object::*func)(), Object* o) { return (o->*func)(); } template static Result apply( Result (Object::*func)(), Object& o) { return (o.*func)(); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply(Result (*func)(Arg1), A1& a1) { return func(a1); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply(Result (*func)(Arg1), A1& a1) { return func(a1); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply( Result (Object::*func)(Arg1) const, const Object* o, A1& a1) { return (o->*func)(a1); } template static Result apply( Result (Object::*func)(Arg1) const, const Object& o, A1& a1) { return (o.*func)(a1); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply( Result (Object::*func)(Arg1), Object* o, A1& a1) { return (o->*func)(a1); } template static Result apply( Result (Object::*func)(Arg1), Object& o, A1& a1) { return (o.*func)(a1); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply(Result (*func)(Arg1, Arg2), A1& a1, A2& a2) { return func(a1, a2); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply(Result (*func)(Arg1, Arg2), A1& a1, A2& a2) { return func(a1, a2); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply( Result (Object::*func)(Arg1, Arg2) const, const Object* o, A1& a1, A2& a2) { return (o->*func)(a1, a2); } template static Result apply( Result (Object::*func)(Arg1, Arg2) const, const Object& o, A1& a1, A2& a2) { return (o.*func)(a1, a2); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply( Result (Object::*func)(Arg1, Arg2), Object* o, A1& a1, A2& a2) { return (o->*func)(a1, a2); } template static Result apply( Result (Object::*func)(Arg1, Arg2), Object& o, A1& a1, A2& a2) { return (o.*func)(a1, a2); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply(Result (*func)(Arg1, Arg2, Arg3), A1& a1, A2& a2, A3& a3) { return func(a1, a2, a3); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply(Result (*func)(Arg1, Arg2, Arg3), A1& a1, A2& a2, A3& a3) { return func(a1, a2, a3); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3) const, const Object* o, A1& a1, A2& a2, A3& a3) { return (o->*func)(a1, a2, a3); } template static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3) const, const Object& o, A1& a1, A2& a2, A3& a3) { return (o.*func)(a1, a2, a3); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3), Object* o, A1& a1, A2& a2, A3& a3) { return (o->*func)(a1, a2, a3); } template static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3), Object& o, A1& a1, A2& a2, A3& a3) { return (o.*func)(a1, a2, a3); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4), A1& a1, A2& a2, A3& a3, A4& a4) { return func(a1, a2, a3, a4); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4), A1& a1, A2& a2, A3& a3, A4& a4) { return func(a1, a2, a3, a4); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4) const, const Object* o, A1& a1, A2& a2, A3& a3, A4& a4) { return (o->*func)(a1, a2, a3, a4); } template static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4) const, const Object& o, A1& a1, A2& a2, A3& a3, A4& a4) { return (o.*func)(a1, a2, a3, a4); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4), Object* o, A1& a1, A2& a2, A3& a3, A4& a4) { return (o->*func)(a1, a2, a3, a4); } template static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4), Object& o, A1& a1, A2& a2, A3& a3, A4& a4) { return (o.*func)(a1, a2, a3, a4); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) { return func(a1, a2, a3, a4, a5); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) { return func(a1, a2, a3, a4, a5); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5) const, const Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) { return (o->*func)(a1, a2, a3, a4, a5); } template static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5) const, const Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) { return (o.*func)(a1, a2, a3, a4, a5); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5), Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) { return (o->*func)(a1, a2, a3, a4, a5); } template static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5), Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) { return (o.*func)(a1, a2, a3, a4, a5); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) { return func(a1, a2, a3, a4, a5, a6); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) { return func(a1, a2, a3, a4, a5, a6); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6) const, const Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) { return (o->*func)(a1, a2, a3, a4, a5, a6); } template static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6) const, const Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) { return (o.*func)(a1, a2, a3, a4, a5, a6); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6), Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) { return (o->*func)(a1, a2, a3, a4, a5, a6); } template static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6), Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) { return (o.*func)(a1, a2, a3, a4, a5, a6); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) { return func(a1, a2, a3, a4, a5, a6, a7); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) { return func(a1, a2, a3, a4, a5, a6, a7); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7) const, const Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) { return (o->*func)(a1, a2, a3, a4, a5, a6, a7); } template static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7) const, const Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) { return (o.*func)(a1, a2, a3, a4, a5, a6, a7); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7), Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) { return (o->*func)(a1, a2, a3, a4, a5, a6, a7); } template static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7), Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) { return (o.*func)(a1, a2, a3, a4, a5, a6, a7); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) { return func(a1, a2, a3, a4, a5, a6, a7, a8); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) { return func(a1, a2, a3, a4, a5, a6, a7, a8); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8) const, const Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) { return (o->*func)(a1, a2, a3, a4, a5, a6, a7, a8); } template static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8) const, const Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) { return (o.*func)(a1, a2, a3, a4, a5, a6, a7, a8); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8), Object* o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) { return (o->*func)(a1, a2, a3, a4, a5, a6, a7, a8); } template static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8), Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) { return (o.*func)(a1, a2, a3, a4, a5, a6, a7, a8); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8, A9& a9) { return func(a1, a2, a3, a4, a5, a6, a7, a8, a9); } }; template struct function_adaptor { template struct sig { typedef Result type; }; template static Result apply(Result (*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9), A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8, A9& a9) { return func(a1, a2, a3, a4, a5, a6, a7, a8, a9); } }; } } # 49 "/usr/include/boost/lambda/core.hpp" 2 3 4 # 1 "/usr/include/boost/lambda/detail/return_type_traits.hpp" 1 3 4 # 15 "/usr/include/boost/lambda/detail/return_type_traits.hpp" 3 4 # 1 "/usr/include/boost/mpl/has_xxx.hpp" 1 3 4 # 19 "/usr/include/boost/mpl/has_xxx.hpp" 3 4 # 1 "/usr/include/boost/mpl/aux_/type_wrapper.hpp" 1 3 4 # 20 "/usr/include/boost/mpl/aux_/type_wrapper.hpp" 3 4 namespace boost { namespace mpl { namespace aux { template< typename T > struct type_wrapper { typedef T type; }; template< typename T > struct wrapped_type; template< typename T > struct wrapped_type< type_wrapper > { typedef T type; }; }}} # 20 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 # 1 "/usr/include/boost/mpl/aux_/yes_no.hpp" 1 3 4 # 18 "/usr/include/boost/mpl/aux_/yes_no.hpp" 3 4 # 1 "/usr/include/boost/mpl/aux_/config/arrays.hpp" 1 3 4 # 19 "/usr/include/boost/mpl/aux_/yes_no.hpp" 2 3 4 namespace boost { namespace mpl { namespace aux { typedef char (&no_tag)[1]; typedef char (&yes_tag)[2]; template< bool C_ > struct yes_no_tag { typedef no_tag type; }; template<> struct yes_no_tag { typedef yes_tag type; }; template< long n > struct weighted_tag { typedef char (&type)[n]; }; # 56 "/usr/include/boost/mpl/aux_/yes_no.hpp" 3 4 }}} # 21 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 # 1 "/usr/include/boost/mpl/aux_/config/has_xxx.hpp" 1 3 4 # 22 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 # 1 "/usr/include/boost/mpl/aux_/config/msvc_typename.hpp" 1 3 4 # 23 "/usr/include/boost/mpl/has_xxx.hpp" 2 3 4 # 16 "/usr/include/boost/lambda/detail/return_type_traits.hpp" 2 3 4 namespace boost { namespace lambda { using ::boost::type_traits::ice_and; using ::boost::type_traits::ice_or; using ::boost::type_traits::ice_not; template struct return_type_1; template struct return_type_2; template struct return_type_N; template struct return_type_1_prot; template struct return_type_2_prot; template struct return_type_N_prot; namespace detail { template class return_type_deduction_failure {}; # 60 "/usr/include/boost/lambda/detail/return_type_traits.hpp" 3 4 } # 76 "/usr/include/boost/lambda/detail/return_type_traits.hpp" 3 4 template struct return_type_1_prot { public: typedef typename detail::IF< ice_and::value, is_lambda_functor::value>::value, lambda_functor< lambda_functor_base< Act, tuple::type> > >, typename return_type_1::type >::RET type; }; template struct return_type_1_prot { typedef null_type type; }; template struct return_type_1 { typedef typename detail::return_type_deduction_failure type; }; namespace detail { template class protect_conversion { typedef typename boost::remove_reference::type non_ref_T; public: typedef typename detail::IF_type< ice_and::value, ice_not::value>::value>::value, detail::identity_mapping, const_copy_argument >::type type; }; } template struct return_type_2_prot { # 146 "/usr/include/boost/lambda/detail/return_type_traits.hpp" 3 4 typedef typename boost::remove_reference::type non_ref_A; typedef typename boost::remove_reference::type non_ref_B; typedef typename detail::IF< ice_and::value, ice_or::value, is_lambda_functor::value>::value>::value, lambda_functor< lambda_functor_base< Act, tuple::type, typename detail::protect_conversion::type> > >, typename return_type_2::type >::RET type; }; template struct return_type_2_prot { typedef null_type type; }; template struct return_type_2_prot { typedef null_type type; }; template struct return_type_2_prot { typedef null_type type; }; template struct return_type_2_comma { typedef typename boost::remove_reference::type non_ref_A; typedef typename boost::remove_reference::type non_ref_B; typedef typename detail::IF< ice_and >::value, ice_or::value, is_lambda_functor::value>::value>::value, lambda_functor< lambda_functor_base< other_action, tuple::type, typename detail::protect_conversion::type> > >, typename return_type_2, non_ref_A, non_ref_B>::type >::RET type1; typedef typename detail::IF< boost::is_same::value, B, type1 >::RET type; }; template struct return_type_N_prot { typedef typename return_type_N::type type; }; template struct return_type_N_prot { typedef null_type type; }; template struct return_type_N, Args> { typedef Ret type; }; namespace detail { template< typename T, typename fallback_ = boost::mpl::bool_ > struct has_result_type { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; template struct get_result_type { typedef typename F::result_type type; }; template struct get_sig { typedef typename function_adaptor::template sig::type type; }; } template struct return_type_N, Args > { typedef typename Args::head_type Func; typedef typename detail::remove_reference_and_cv::type plain_Func; public: typedef typename detail::IF< detail::has_result_type::value, detail::get_result_type, detail::get_sig >::RET::type type; }; } } # 50 "/usr/include/boost/lambda/core.hpp" 2 3 4 # 1 "/usr/include/boost/lambda/detail/select_functions.hpp" 1 3 4 # 15 "/usr/include/boost/lambda/detail/select_functions.hpp" 3 4 namespace boost { namespace lambda { namespace detail { template inline Any& select(Any& any, A& a, B& b, C& c, Env& env) { ::boost::lambda::detail::do_nothing(a, b, c, env); return any; } template inline typename Arg::template sig >::type select ( const lambda_functor& op, A& a, B& b, C& c, Env& env ) { return op.template call< typename Arg::template sig >::type >(a, b, c, env); } template inline typename Arg::template sig >::type select ( lambda_functor& op, A& a, B& b, C& c, Env& env) { return op.template call< typename Arg::template sig >::type >(a, b, c, env); } # 50 "/usr/include/boost/lambda/detail/select_functions.hpp" 3 4 template struct r_select { template static inline RET go (Any& any, A& a, B& b, C& c, Env& env) { ::boost::lambda::detail::do_nothing(a, b, c, env); return any; } template static inline RET go (const lambda_functor& op, A& a, B& b, C& c, Env& env ) { return op.template call(a, b, c, env); } template static inline RET go (lambda_functor& op, A& a, B& b, C& c, Env& env ) { return op.template call(a, b, c, env); } }; } } } # 52 "/usr/include/boost/lambda/core.hpp" 2 3 4 # 1 "/usr/include/boost/lambda/detail/lambda_functor_base.hpp" 1 3 4 # 16 "/usr/include/boost/lambda/detail/lambda_functor_base.hpp" 3 4 namespace boost { namespace lambda { template class identity { T elem; public: typedef T element_t; typedef typename boost::add_reference< typename boost::add_const::type >::type par_t; explicit identity(par_t t) : elem(t) {} template struct sig { typedef element_t type; }; template RET call(A& a, B& b, C& c, Env& env) const { ::boost::lambda::detail::do_nothing(a, b, c, env); return elem; } }; template inline lambda_functor > var(T& t) { return identity(t); } template lambda_functor var(const lambda_functor& t) { return t; } template struct var_type { typedef lambda_functor > type; }; template inline lambda_functor::type> > constant(const T& t) { return identity::type>(t); } template lambda_functor constant(const lambda_functor& t) { return t; } template struct constant_type { typedef lambda_functor< identity::type> > type; }; template inline lambda_functor > constant_ref(const T& t) { return identity(t); } template lambda_functor constant_ref(const lambda_functor& t) { return t; } template struct constant_ref_type { typedef lambda_functor > type; }; template struct as_lambda_functor { typedef typename detail::remove_reference_and_cv::type plain_T; typedef typename detail::IF::value, plain_T, lambda_functor< identity::type> > >::RET type; }; template inline lambda_functor::type> > to_lambda_functor(const T& t) { return identity::type>(t); } template inline lambda_functor to_lambda_functor(const lambda_functor& t) { return t; } namespace detail { # 130 "/usr/include/boost/lambda/detail/lambda_functor_base.hpp" 3 4 template struct constify_rvals { template static inline const U& go(const U& u) { return u; } }; template struct constify_rvals { template static inline U& go(U& u) { return u; } }; template struct is_null_type { static const bool value = false; }; template <> struct is_null_type { static const bool value = true; }; template struct has_null_type { static const bool value = (is_null_type::value || has_null_type::value); }; template<> struct has_null_type { static const bool value = false; }; template class deduce_argument_types_ { typedef typename as_lambda_functor::type lf_t; typedef typename lf_t::inherited::template sig::type el_t; public: typedef boost::tuples::cons< el_t, typename deduce_argument_types_::type > type; }; template class deduce_argument_types_ { public: typedef null_type type; }; # 188 "/usr/include/boost/lambda/detail/lambda_functor_base.hpp" 3 4 template class deduce_non_ref_argument_types_ { typedef typename as_lambda_functor::type lf_t; typedef typename lf_t::inherited::template sig::type el_t; public: typedef boost::tuples::cons< typename boost::remove_reference::type, typename deduce_non_ref_argument_types_::type > type; }; template class deduce_non_ref_argument_types_ { public: typedef null_type type; }; template class deduce_argument_types { typedef typename deduce_argument_types_::type t1; public: typedef typename detail::IF< has_null_type::value, null_type, t1 >::RET type; }; template class deduce_non_ref_argument_types { typedef typename deduce_non_ref_argument_types_::type t1; public: typedef typename detail::IF< has_null_type::value, null_type, t1 >::RET type; }; template struct nth_return_type_sig { typedef typename as_lambda_functor< typename boost::tuples::element::type >::type lf_type; typedef typename lf_type::inherited::template sig::type type; }; template struct element_or_null { typedef typename boost::tuples::element::type type; }; template struct element_or_null { typedef null_type type; }; } template class lambda_functor_base, Args> { public: Args args; explicit lambda_functor_base(const Args& a) : args(a) {} template struct sig { typedef RET type; }; template RET call(A& a, B& b, C& c, Env& env) const { return detail::constify_rvals::go( detail::r_select::go(boost::tuples::get<0>(args), a, b, c, env)); } }; template class lambda_functor_base { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { ::boost::lambda::detail::do_nothing(a, b, c, env); return boost::tuples::get<0>(args); } template struct sig { typedef typename boost::tuples::element<0, Args>::type type; }; }; class do_nothing_action {}; template class lambda_functor_base { public: lambda_functor_base() {} template RET call(A& a, B& b, C& c, Env& env) const { return ::boost::lambda::detail::do_nothing(a, b, c, env); } template struct sig { typedef void type; }; }; # 335 "/usr/include/boost/lambda/detail/lambda_functor_base.hpp" 3 4 template class lambda_functor_base, Args> { public: explicit lambda_functor_base(const Args& a) {} template struct sig { typedef typename return_type_N::type type; }; template RET call(A& a, B& b, C& c, Env& env) const { ::boost::lambda::detail::do_nothing(a, b, c, env); return Act::template apply(); } }; # 385 "/usr/include/boost/lambda/detail/lambda_functor_base.hpp" 3 4 template class lambda_functor_base, Args> { public: Args args; explicit lambda_functor_base(const Args& a) : args(a) {} template struct sig { typedef typename detail::deduce_non_ref_argument_types::type rets_t; public: typedef typename return_type_N_prot::type type; }; template RET call(A& a, B& b, C& c, Env& env) const { using boost::tuples::get; using detail::constify_rvals; using detail::r_select; using detail::element_or_null; using detail::deduce_argument_types; typedef typename deduce_argument_types >::type rets_t; typedef typename element_or_null<0, rets_t>::type rt0; return Act::template apply( constify_rvals::go(r_select::go(get<0>(args), a, b, c, env)) ); } }; template class lambda_functor_base, Args> { public: Args args; explicit lambda_functor_base(const Args& a) : args(a) {} template struct sig { typedef typename detail::deduce_non_ref_argument_types::type rets_t; public: typedef typename return_type_N_prot::type type; }; template RET call(A& a, B& b, C& c, Env& env) const { using boost::tuples::get; using detail::constify_rvals; using detail::r_select; using detail::element_or_null; using detail::deduce_argument_types; typedef typename deduce_argument_types >::type rets_t; typedef typename element_or_null<0, rets_t>::type rt0; typedef typename element_or_null<1, rets_t>::type rt1; return Act::template apply( constify_rvals::go(r_select::go(get<0>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<1>(args), a, b, c, env)) ); } }; template class lambda_functor_base, Args> { public: Args args; explicit lambda_functor_base(const Args& a) : args(a) {} template struct sig { typedef typename detail::deduce_non_ref_argument_types::type rets_t; public: typedef typename return_type_N_prot::type type; }; template RET call(A& a, B& b, C& c, Env& env) const { using boost::tuples::get; using detail::constify_rvals; using detail::r_select; using detail::element_or_null; using detail::deduce_argument_types; typedef typename deduce_argument_types >::type rets_t; typedef typename element_or_null<0, rets_t>::type rt0; typedef typename element_or_null<1, rets_t>::type rt1; typedef typename element_or_null<2, rets_t>::type rt2; return Act::template apply( constify_rvals::go(r_select::go(get<0>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<1>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<2>(args), a, b, c, env)) ); } }; template class lambda_functor_base, Args> { public: Args args; explicit lambda_functor_base(const Args& a) : args(a) {} template struct sig { typedef typename detail::deduce_non_ref_argument_types::type rets_t; public: typedef typename return_type_N_prot::type type; }; template RET call(A& a, B& b, C& c, Env& env) const { using boost::tuples::get; using detail::constify_rvals; using detail::r_select; using detail::element_or_null; using detail::deduce_argument_types; typedef typename deduce_argument_types >::type rets_t; typedef typename element_or_null<0, rets_t>::type rt0; typedef typename element_or_null<1, rets_t>::type rt1; typedef typename element_or_null<2, rets_t>::type rt2; typedef typename element_or_null<3, rets_t>::type rt3; return Act::template apply( constify_rvals::go(r_select::go(get<0>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<1>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<2>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<3>(args), a, b, c, env)) ); } }; template class lambda_functor_base, Args> { public: Args args; explicit lambda_functor_base(const Args& a) : args(a) {} template struct sig { typedef typename detail::deduce_non_ref_argument_types::type rets_t; public: typedef typename return_type_N_prot::type type; }; template RET call(A& a, B& b, C& c, Env& env) const { using boost::tuples::get; using detail::constify_rvals; using detail::r_select; using detail::element_or_null; using detail::deduce_argument_types; typedef typename deduce_argument_types >::type rets_t; typedef typename element_or_null<0, rets_t>::type rt0; typedef typename element_or_null<1, rets_t>::type rt1; typedef typename element_or_null<2, rets_t>::type rt2; typedef typename element_or_null<3, rets_t>::type rt3; typedef typename element_or_null<4, rets_t>::type rt4; return Act::template apply( constify_rvals::go(r_select::go(get<0>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<1>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<2>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<3>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<4>(args), a, b, c, env)) ); } }; template class lambda_functor_base, Args> { public: Args args; explicit lambda_functor_base(const Args& a) : args(a) {} template struct sig { typedef typename detail::deduce_non_ref_argument_types::type rets_t; public: typedef typename return_type_N_prot::type type; }; template RET call(A& a, B& b, C& c, Env& env) const { using boost::tuples::get; using detail::constify_rvals; using detail::r_select; using detail::element_or_null; using detail::deduce_argument_types; typedef typename deduce_argument_types >::type rets_t; typedef typename element_or_null<0, rets_t>::type rt0; typedef typename element_or_null<1, rets_t>::type rt1; typedef typename element_or_null<2, rets_t>::type rt2; typedef typename element_or_null<3, rets_t>::type rt3; typedef typename element_or_null<4, rets_t>::type rt4; typedef typename element_or_null<5, rets_t>::type rt5; return Act::template apply( constify_rvals::go(r_select::go(get<0>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<1>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<2>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<3>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<4>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<5>(args), a, b, c, env)) ); } }; template class lambda_functor_base, Args> { public: Args args; explicit lambda_functor_base(const Args& a) : args(a) {} template struct sig { typedef typename detail::deduce_non_ref_argument_types::type rets_t; public: typedef typename return_type_N_prot::type type; }; template RET call(A& a, B& b, C& c, Env& env) const { using boost::tuples::get; using detail::constify_rvals; using detail::r_select; using detail::element_or_null; using detail::deduce_argument_types; typedef typename deduce_argument_types >::type rets_t; typedef typename element_or_null<0, rets_t>::type rt0; typedef typename element_or_null<1, rets_t>::type rt1; typedef typename element_or_null<2, rets_t>::type rt2; typedef typename element_or_null<3, rets_t>::type rt3; typedef typename element_or_null<4, rets_t>::type rt4; typedef typename element_or_null<5, rets_t>::type rt5; typedef typename element_or_null<6, rets_t>::type rt6; return Act::template apply( constify_rvals::go(r_select::go(get<0>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<1>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<2>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<3>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<4>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<5>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<6>(args), a, b, c, env)) ); } }; template class lambda_functor_base, Args> { public: Args args; explicit lambda_functor_base(const Args& a) : args(a) {} template struct sig { typedef typename detail::deduce_non_ref_argument_types::type rets_t; public: typedef typename return_type_N_prot::type type; }; template RET call(A& a, B& b, C& c, Env& env) const { using boost::tuples::get; using detail::constify_rvals; using detail::r_select; using detail::element_or_null; using detail::deduce_argument_types; typedef typename deduce_argument_types >::type rets_t; typedef typename element_or_null<0, rets_t>::type rt0; typedef typename element_or_null<1, rets_t>::type rt1; typedef typename element_or_null<2, rets_t>::type rt2; typedef typename element_or_null<3, rets_t>::type rt3; typedef typename element_or_null<4, rets_t>::type rt4; typedef typename element_or_null<5, rets_t>::type rt5; typedef typename element_or_null<6, rets_t>::type rt6; typedef typename element_or_null<7, rets_t>::type rt7; return Act::template apply( constify_rvals::go(r_select::go(get<0>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<1>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<2>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<3>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<4>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<5>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<6>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<7>(args), a, b, c, env)) ); } }; template class lambda_functor_base, Args> { public: Args args; explicit lambda_functor_base(const Args& a) : args(a) {} template struct sig { typedef typename detail::deduce_non_ref_argument_types::type rets_t; public: typedef typename return_type_N_prot::type type; }; template RET call(A& a, B& b, C& c, Env& env) const { using boost::tuples::get; using detail::constify_rvals; using detail::r_select; using detail::element_or_null; using detail::deduce_argument_types; typedef typename deduce_argument_types >::type rets_t; typedef typename element_or_null<0, rets_t>::type rt0; typedef typename element_or_null<1, rets_t>::type rt1; typedef typename element_or_null<2, rets_t>::type rt2; typedef typename element_or_null<3, rets_t>::type rt3; typedef typename element_or_null<4, rets_t>::type rt4; typedef typename element_or_null<5, rets_t>::type rt5; typedef typename element_or_null<6, rets_t>::type rt6; typedef typename element_or_null<7, rets_t>::type rt7; typedef typename element_or_null<8, rets_t>::type rt8; return Act::template apply( constify_rvals::go(r_select::go(get<0>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<1>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<2>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<3>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<4>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<5>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<6>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<7>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<8>(args), a, b, c, env)) ); } }; template class lambda_functor_base, Args> { public: Args args; explicit lambda_functor_base(const Args& a) : args(a) {} template struct sig { typedef typename detail::deduce_non_ref_argument_types::type rets_t; public: typedef typename return_type_N_prot::type type; }; template RET call(A& a, B& b, C& c, Env& env) const { using boost::tuples::get; using detail::constify_rvals; using detail::r_select; using detail::element_or_null; using detail::deduce_argument_types; typedef typename deduce_argument_types >::type rets_t; typedef typename element_or_null<0, rets_t>::type rt0; typedef typename element_or_null<1, rets_t>::type rt1; typedef typename element_or_null<2, rets_t>::type rt2; typedef typename element_or_null<3, rets_t>::type rt3; typedef typename element_or_null<4, rets_t>::type rt4; typedef typename element_or_null<5, rets_t>::type rt5; typedef typename element_or_null<6, rets_t>::type rt6; typedef typename element_or_null<7, rets_t>::type rt7; typedef typename element_or_null<8, rets_t>::type rt8; typedef typename element_or_null<9, rets_t>::type rt9; return Act::template apply( constify_rvals::go(r_select::go(get<0>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<1>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<2>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<3>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<4>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<5>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<6>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<7>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<8>(args), a, b, c, env)), constify_rvals::go(r_select::go(get<9>(args), a, b, c, env)) ); } }; } } # 54 "/usr/include/boost/lambda/core.hpp" 2 3 4 # 1 "/usr/include/boost/lambda/detail/lambda_functors.hpp" 1 3 4 # 16 "/usr/include/boost/lambda/detail/lambda_functors.hpp" 3 4 namespace boost { namespace lambda { namespace detail { namespace { static const null_type constant_null_type = null_type(); } } class unused {}; namespace detail { template struct get_element_or_null_type { typedef typename detail::tuple_element_as_reference::type type; }; template struct get_element_or_null_type { typedef null_type type; }; } template struct placeholder; template<> struct placeholder { template struct sig { typedef typename detail::get_element_or_null_type<0, SigArgs>::type type; }; template RET call(A& a, B& b, C& c, Env& env) const { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( boost::is_reference::value ) >)> boost_static_assert_typedef_60; ::boost::lambda::detail::do_nothing(a, b, c, env); return a; } }; template<> struct placeholder { template struct sig { typedef typename detail::get_element_or_null_type<1, SigArgs>::type type; }; template RET call(A& a, B& b, C& c, Env& env) const { ::boost::lambda::detail::do_nothing(a, b, c, env); return b; } }; template<> struct placeholder { template struct sig { typedef typename detail::get_element_or_null_type<2, SigArgs>::type type; }; template RET call(A& a, B& b, C& c, Env& env) const { ::boost::lambda::detail::do_nothing(a, b, c, env); return c; } }; template<> struct placeholder { template struct sig { typedef typename detail::get_element_or_null_type<3, SigArgs>::type type; }; template RET call(A& a, B& b, C& c, Env& env) const { ::boost::lambda::detail::do_nothing(a, b, c, env); return env; } }; typedef const lambda_functor > placeholder1_type; typedef const lambda_functor > placeholder2_type; typedef const lambda_functor > placeholder3_type; # 111 "/usr/include/boost/lambda/detail/lambda_functors.hpp" 3 4 template class lambda_functor : public T { static const int arity_bits = get_arity::value; public: typedef T inherited; lambda_functor() {} lambda_functor(const lambda_functor& l) : inherited(l) {} lambda_functor(const T& t) : inherited(t) {} template struct sig { typedef typename inherited::template sig::type type; }; typedef typename inherited::template sig::type nullary_return_type; nullary_return_type operator()() const { return inherited::template call (detail::constant_null_type, detail::constant_null_type, detail::constant_null_type, detail::constant_null_type); } template typename inherited::template sig >::type operator()(A& a) const { return inherited::template call< typename inherited::template sig >::type >(a, detail::constant_null_type, detail::constant_null_type, detail::constant_null_type); } template typename inherited::template sig >::type operator()(A& a, B& b) const { return inherited::template call< typename inherited::template sig >::type >(a, b, detail::constant_null_type, detail::constant_null_type); } template typename inherited::template sig >::type operator()(A& a, B& b, C& c) const { return inherited::template call< typename inherited::template sig >::type >(a, b, c, detail::constant_null_type); } template typename inherited::template sig >::type internal_call(A& a, B& b, C& c, Env& env) const { return inherited::template call >::type>(a, b, c, env); } template const lambda_functor, boost::tuple::type> > > operator=(const A& a) const { return lambda_functor_base< other_action, boost::tuple::type> > ( boost::tuple::type>(*this, a) ); } template const lambda_functor, boost::tuple::type> > > operator[](const A& a) const { return lambda_functor_base< other_action, boost::tuple::type> > ( boost::tuple::type>(*this, a ) ); } }; } } # 56 "/usr/include/boost/lambda/core.hpp" 2 3 4 # 1 "/usr/include/boost/lambda/detail/ret.hpp" 1 3 4 # 15 "/usr/include/boost/lambda/detail/ret.hpp" 3 4 namespace boost { namespace lambda { # 38 "/usr/include/boost/lambda/detail/ret.hpp" 3 4 template inline const lambda_functor< lambda_functor_base< explicit_return_type_action, tuple > > > ret(const lambda_functor& a1) { return lambda_functor_base< explicit_return_type_action, tuple > > (tuple >(a1)); } template inline const T& protect(const T& t) { return t; } template inline const lambda_functor< lambda_functor_base< protect_action, tuple > > > protect(const lambda_functor& a1) { return lambda_functor_base< protect_action, tuple > > (tuple >(a1)); } # 90 "/usr/include/boost/lambda/detail/ret.hpp" 3 4 template class non_lambda_functor { LambdaFunctor lf; public: template struct sig { typedef typename LambdaFunctor::inherited:: template sig::type type; }; explicit non_lambda_functor(const LambdaFunctor& a) : lf(a) {} typename LambdaFunctor::nullary_return_type operator()() const { return lf.template call (detail::constant_null_type, detail::constant_null_type, detail::constant_null_type, detail::constant_null_type); } template typename sig >::type operator()(A& a) const { return lf.template call >::type >(a, detail::constant_null_type, detail::constant_null_type, detail::constant_null_type); } template typename sig >::type operator()(A& a, B& b) const { return lf.template call >::type >(a, b, detail::constant_null_type, detail::constant_null_type); } template typename sig >::type operator()(A& a, B& b, C& c) const { return lf.template call >::type>(a, b, c, detail::constant_null_type); } }; template inline const Arg& unlambda(const Arg& a) { return a; } template inline const non_lambda_functor > unlambda(const lambda_functor& a) { return non_lambda_functor >(a); } # 155 "/usr/include/boost/lambda/detail/ret.hpp" 3 4 template struct const_incorrect_lambda_functor { LambdaFunctor lf; public: explicit const_incorrect_lambda_functor(const LambdaFunctor& a) : lf(a) {} template struct sig { typedef typename LambdaFunctor::inherited::template sig::type type; }; template typename sig >::type operator()(const A& a) const { return lf.template call >::type >(const_cast(a), detail::constant_null_type, detail::constant_null_type, detail::constant_null_type); } template typename sig >::type operator()(const A& a, const B& b) const { return lf.template call >::type >(const_cast(a), const_cast(b), detail::constant_null_type, detail::constant_null_type); } template typename sig >::type operator()(const A& a, const B& b, const C& c) const { return lf.template call >::type>(const_cast(a), const_cast(b), const_cast(c), detail::constant_null_type); } }; # 196 "/usr/include/boost/lambda/detail/ret.hpp" 3 4 template struct const_parameter_lambda_functor { LambdaFunctor lf; public: explicit const_parameter_lambda_functor(const LambdaFunctor& a) : lf(a) {} template struct sig { typedef typename LambdaFunctor::inherited::template sig::type type; }; template typename sig >::type operator()(const A& a) const { return lf.template call >::type >(a, detail::constant_null_type, detail::constant_null_type, detail::constant_null_type); } template typename sig >::type operator()(const A& a, const B& b) const { return lf.template call >::type >(a, b, detail::constant_null_type, detail::constant_null_type); } template typename sig >::type operator()(const A& a, const B& b, const C& c) const { return lf.template call >::type>(a, b, c, detail::constant_null_type); } }; template inline const const_incorrect_lambda_functor > break_const(const lambda_functor& lf) { return const_incorrect_lambda_functor >(lf); } template inline const const_parameter_lambda_functor > const_parameters(const lambda_functor& lf) { return const_parameter_lambda_functor >(lf); } # 254 "/usr/include/boost/lambda/detail/ret.hpp" 3 4 struct voidifier_action { template static void apply(A&) {} }; template struct return_type_N { typedef void type; }; template inline const lambda_functor< lambda_functor_base< action<1, voidifier_action>, tuple > > > make_void(const lambda_functor& a1) { return lambda_functor_base< action<1, voidifier_action>, tuple > > (tuple > (a1)); } template inline const lambda_functor< lambda_functor_base > make_void(const Arg1& a1) { return lambda_functor_base(); } # 305 "/usr/include/boost/lambda/detail/ret.hpp" 3 4 template struct result_type_to_sig : public T { template struct sig { typedef typename T::result_type type; }; result_type_to_sig(const T& t) : T(t) {} }; template inline result_type_to_sig std_functor(const F& f) { return f; } } } # 58 "/usr/include/boost/lambda/core.hpp" 2 3 4 namespace boost { namespace lambda { namespace { boost::lambda::placeholder1_type free1 = boost::lambda::placeholder1_type(); boost::lambda::placeholder2_type free2 = boost::lambda::placeholder2_type(); boost::lambda::placeholder3_type free3 = boost::lambda::placeholder3_type(); boost::lambda::placeholder1_type& _1 = free1; boost::lambda::placeholder2_type& _2 = free2; boost::lambda::placeholder3_type& _3 = free3; } } } # 15 "/usr/include/boost/lambda/lambda.hpp" 2 3 4 # 1 "/usr/include/boost/lambda/detail/operator_actions.hpp" 1 3 4 # 14 "/usr/include/boost/lambda/detail/operator_actions.hpp" 3 4 namespace boost { namespace lambda { class plus_action {}; class minus_action {}; class multiply_action {}; class divide_action {}; class remainder_action {}; class leftshift_action {}; class rightshift_action {}; class xor_action {}; class and_action {}; class or_action {}; class not_action {}; class less_action {}; class greater_action {}; class lessorequal_action {}; class greaterorequal_action {}; class equal_action {}; class notequal_action {}; class increment_action {}; class decrement_action {}; class addressof_action {}; class contentsof_action {}; template class arithmetic_action; template class bitwise_action; template class logical_action; template class relational_action; template class arithmetic_assignment_action; template class bitwise_assignment_action; template class unary_arithmetic_action; template class pre_increment_decrement_action; template class post_increment_decrement_action; template struct is_protectable > { static const bool value = true; }; template struct is_protectable > { static const bool value = true; }; template struct is_protectable > { static const bool value = true; }; template struct is_protectable > { static const bool value = true; }; template struct is_protectable > { static const bool value = true; }; template struct is_protectable > { static const bool value = true; }; template struct is_protectable > { static const bool value = true; }; template struct is_protectable > { static const bool value = true; }; template struct is_protectable > { static const bool value = true; }; template <> struct is_protectable > { static const bool value = true; }; template <> struct is_protectable > { static const bool value = true; }; template<> struct is_protectable > { static const bool value = true; }; template<> struct is_protectable > { static const bool value = true; }; } } # 22 "/usr/include/boost/lambda/lambda.hpp" 2 3 4 # 1 "/usr/include/boost/lambda/detail/operator_lambda_func_base.hpp" 1 3 4 # 16 "/usr/include/boost/lambda/detail/operator_lambda_func_base.hpp" 3 4 namespace boost { namespace lambda { template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env), detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { private: typedef typename detail::deduce_argument_types::type rets_t; public: typedef typename return_type_2_comma< typename detail::element_or_null<0, rets_t>::type, typename detail::element_or_null<1, rets_t>::type >::type type; }; }; namespace detail { template class binary_rt { private: typedef typename detail::deduce_argument_types::type rets_t; public: typedef typename return_type_2_prot< Action, typename detail::element_or_null<0, rets_t>::type, typename detail::element_or_null<1, rets_t>::type >::type type; }; template class unary_rt { private: typedef typename detail::deduce_argument_types::type rets_t; public: typedef typename return_type_1_prot< Action, typename detail::element_or_null<0, rets_t>::type >::type type; }; } template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) && detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) || detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) [detail::select(boost::tuples::get<1>(args), a, b, c, env)]; } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; # 206 "/usr/include/boost/lambda/detail/operator_lambda_func_base.hpp" 3 4 template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) + detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) - detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) * detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) / detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) % detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) << detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) >> detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) & detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) | detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) ^ detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) < detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) > detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) <= detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) >= detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) == detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) != detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) += detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) -= detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) *= detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) /= detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) %= detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) <<= detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) >>= detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) &= detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) |= detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) ^= detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) = detail::select(boost::tuples::get<1>(args), a, b, c, env); } template struct sig { typedef typename detail::binary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return + detail::select(boost::tuples::get<0>(args), a, b, c, env); } template struct sig { typedef typename detail::unary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return - detail::select(boost::tuples::get<0>(args), a, b, c, env); } template struct sig { typedef typename detail::unary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return ~ detail::select(boost::tuples::get<0>(args), a, b, c, env); } template struct sig { typedef typename detail::unary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return ! detail::select(boost::tuples::get<0>(args), a, b, c, env); } template struct sig { typedef typename detail::unary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return ++ detail::select(boost::tuples::get<0>(args), a, b, c, env); } template struct sig { typedef typename detail::unary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return -- detail::select(boost::tuples::get<0>(args), a, b, c, env); } template struct sig { typedef typename detail::unary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return & detail::select(boost::tuples::get<0>(args), a, b, c, env); } template struct sig { typedef typename detail::unary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return * detail::select(boost::tuples::get<0>(args), a, b, c, env); } template struct sig { typedef typename detail::unary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) ++; } template struct sig { typedef typename detail::unary_rt, Args, SigArgs>::type type; }; }; template class lambda_functor_base, Args> { public: Args args; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return detail::select(boost::tuples::get<0>(args), a, b, c, env) --; } template struct sig { typedef typename detail::unary_rt, Args, SigArgs>::type type; }; }; } } # 23 "/usr/include/boost/lambda/lambda.hpp" 2 3 4 # 1 "/usr/include/boost/lambda/detail/operator_return_type_traits.hpp" 1 3 4 # 14 "/usr/include/boost/lambda/detail/operator_return_type_traits.hpp" 3 4 # 1 "/usr/include/boost/lambda/detail/is_instance_of.hpp" 1 3 4 # 17 "/usr/include/boost/lambda/detail/is_instance_of.hpp" 3 4 # 1 "/usr/include/boost/type_traits/conversion_traits.hpp" 1 3 4 # 18 "/usr/include/boost/lambda/detail/is_instance_of.hpp" 2 3 4 # 1 "/usr/include/boost/preprocessor/enum_shifted_params.hpp" 1 3 4 # 15 "/usr/include/boost/preprocessor/enum_shifted_params.hpp" 3 4 # 1 "/usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp" 1 3 4 # 17 "/usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp" 3 4 # 1 "/usr/include/boost/preprocessor/arithmetic/dec.hpp" 1 3 4 # 18 "/usr/include/boost/preprocessor/repetition/enum_shifted_params.hpp" 2 3 4 # 16 "/usr/include/boost/preprocessor/enum_shifted_params.hpp" 2 3 4 # 19 "/usr/include/boost/lambda/detail/is_instance_of.hpp" 2 3 4 # 1 "/usr/include/boost/preprocessor/repeat_2nd.hpp" 1 3 4 # 20 "/usr/include/boost/lambda/detail/is_instance_of.hpp" 2 3 4 # 51 "/usr/include/boost/lambda/detail/is_instance_of.hpp" 3 4 namespace boost { namespace lambda { # 85 "/usr/include/boost/lambda/detail/is_instance_of.hpp" 3 4 namespace detail { template class F> struct conversion_tester_1 { template< class A0> conversion_tester_1 (const F< A0>&); }; } template class To> struct is_instance_of_1 { private: typedef ::boost::is_convertible< From, detail::conversion_tester_1 > helper_type; public: static const bool value = helper_type::value; }; namespace detail { template class F> struct conversion_tester_2 { template< class A0 , class A1> conversion_tester_2 (const F< A0 , A1>&); }; } template class To> struct is_instance_of_2 { private: typedef ::boost::is_convertible< From, detail::conversion_tester_2 > helper_type; public: static const bool value = helper_type::value; }; namespace detail { template class F> struct conversion_tester_3 { template< class A0 , class A1 , class A2> conversion_tester_3 (const F< A0 , A1 , A2>&); }; } template class To> struct is_instance_of_3 { private: typedef ::boost::is_convertible< From, detail::conversion_tester_3 > helper_type; public: static const bool value = helper_type::value; }; namespace detail { template class F> struct conversion_tester_4 { template< class A0 , class A1 , class A2 , class A3> conversion_tester_4 (const F< A0 , A1 , A2 , A3>&); }; } template class To> struct is_instance_of_4 { private: typedef ::boost::is_convertible< From, detail::conversion_tester_4 > helper_type; public: static const bool value = helper_type::value; }; # 96 "/usr/include/boost/lambda/detail/is_instance_of.hpp" 3 4 } } # 15 "/usr/include/boost/lambda/detail/operator_return_type_traits.hpp" 2 3 4 # 1 "/usr/include/boost/indirect_reference.hpp" 1 3 4 # 14 "/usr/include/boost/indirect_reference.hpp" 3 4 # 1 "/usr/include/boost/detail/is_incrementable.hpp" 1 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 8 "/usr/include/boost/detail/is_incrementable.hpp" 2 3 4 # 1 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 1 3 4 # 14 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 3 4 # 1 "/usr/include/boost/type_traits/detail/template_arity_spec.hpp" 1 3 4 # 15 "/usr/include/boost/type_traits/detail/bool_trait_def.hpp" 2 3 4 # 15 "/usr/include/boost/detail/is_incrementable.hpp" 2 3 4 namespace boost { namespace detail { # 25 "/usr/include/boost/detail/is_incrementable.hpp" 3 4 namespace is_incrementable_ { struct tag {}; struct any { template any(T const&); }; # 53 "/usr/include/boost/detail/is_incrementable.hpp" 3 4 tag operator++(any const&); tag operator++(any const&,int); # 63 "/usr/include/boost/detail/is_incrementable.hpp" 3 4 tag operator,(tag,int); char (& check(tag) )[2]; template char check(T const&); template struct impl { static typename boost::remove_cv::type& x; static const bool value = sizeof(is_incrementable_::check((++x,0))) == 1; }; template struct postfix_impl { static typename boost::remove_cv::type& x; static const bool value = sizeof(is_incrementable_::check((x++,0))) == 1; }; } template struct is_incrementable : ::boost::integral_constant::value> { }; template struct is_postfix_incrementable : ::boost::integral_constant::value> { }; } } # 1 "/usr/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 4 # 123 "/usr/include/boost/detail/is_incrementable.hpp" 2 3 4 # 15 "/usr/include/boost/indirect_reference.hpp" 2 3 4 # 1 "/usr/include/boost/iterator/iterator_traits.hpp" 1 3 4 # 1 "/usr/include/boost/detail/iterator.hpp" 1 3 4 # 77 "/usr/include/boost/detail/iterator.hpp" 3 4 namespace boost { namespace detail { template struct iterator_traits : std::iterator_traits {}; using std::distance; }} # 9 "/usr/include/boost/iterator/iterator_traits.hpp" 2 3 4 namespace boost { # 27 "/usr/include/boost/iterator/iterator_traits.hpp" 3 4 template struct iterator_value { typedef typename detail::iterator_traits::value_type type; }; template struct iterator_reference { typedef typename detail::iterator_traits::reference type; }; template struct iterator_pointer { typedef typename detail::iterator_traits::pointer type; }; template struct iterator_difference { typedef typename detail::iterator_traits::difference_type type; }; template struct iterator_category { typedef typename detail::iterator_traits::iterator_category type; }; # 90 "/usr/include/boost/iterator/iterator_traits.hpp" 3 4 } # 16 "/usr/include/boost/indirect_reference.hpp" 2 3 4 # 1 "/usr/include/boost/mpl/eval_if.hpp" 1 3 4 # 17 "/usr/include/boost/mpl/eval_if.hpp" 3 4 # 1 "/usr/include/boost/mpl/if.hpp" 1 3 4 # 17 "/usr/include/boost/mpl/if.hpp" 3 4 # 1 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 1 3 4 # 18 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 3 4 # 1 "/usr/include/boost/mpl/aux_/config/integral.hpp" 1 3 4 # 19 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 2 3 4 # 1 "/usr/include/boost/mpl/aux_/config/eti.hpp" 1 3 4 # 20 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 2 3 4 # 73 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 3 4 namespace boost { namespace mpl { namespace aux { template< typename T > struct value_type_wknd { typedef typename T::value_type type; }; # 87 "/usr/include/boost/mpl/aux_/value_wknd.hpp" 3 4 }}} # 18 "/usr/include/boost/mpl/if.hpp" 2 3 4 # 1 "/usr/include/boost/mpl/aux_/na_spec.hpp" 1 3 4 # 18 "/usr/include/boost/mpl/aux_/na_spec.hpp" 3 4 # 1 "/usr/include/boost/mpl/lambda_fwd.hpp" 1 3 4 # 17 "/usr/include/boost/mpl/lambda_fwd.hpp" 3 4 # 1 "/usr/include/boost/mpl/void_fwd.hpp" 1 3 4 # 19 "/usr/include/boost/mpl/void_fwd.hpp" 3 4 namespace mpl_ { struct void_; } namespace boost { namespace mpl { using ::mpl_::void_; } } # 18 "/usr/include/boost/mpl/lambda_fwd.hpp" 2 3 4 # 1 "/usr/include/boost/mpl/aux_/na.hpp" 1 3 4 # 18 "/usr/include/boost/mpl/aux_/na.hpp" 3 4 # 1 "/usr/include/boost/mpl/aux_/na_fwd.hpp" 1 3 4 # 19 "/usr/include/boost/mpl/aux_/na_fwd.hpp" 3 4 namespace mpl_ { struct na { typedef na type; enum { value = 0 }; }; } namespace boost { namespace mpl { using ::mpl_::na; } } # 19 "/usr/include/boost/mpl/aux_/na.hpp" 2 3 4 namespace boost { namespace mpl { template< typename T > struct is_na : false_ { }; template<> struct is_na : true_ { }; template< typename T > struct is_not_na : true_ { }; template<> struct is_not_na : false_ { }; template< typename T, typename U > struct if_na { typedef T type; }; template< typename U > struct if_na { typedef U type; }; # 93 "/usr/include/boost/mpl/aux_/na.hpp" 3 4 }} # 19 "/usr/include/boost/mpl/lambda_fwd.hpp" 2 3 4 # 1 "/usr/include/boost/mpl/aux_/lambda_arity_param.hpp" 1 3 4 # 25 "/usr/include/boost/mpl/lambda_fwd.hpp" 2 3 4 namespace boost { namespace mpl { template< typename T = na , typename Tag = void_ , typename Arity = int_< aux::template_arity::value > > struct lambda; }} # 19 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4 # 1 "/usr/include/boost/mpl/aux_/arity.hpp" 1 3 4 # 17 "/usr/include/boost/mpl/aux_/arity.hpp" 3 4 # 1 "/usr/include/boost/mpl/aux_/config/dtp.hpp" 1 3 4 # 18 "/usr/include/boost/mpl/aux_/arity.hpp" 2 3 4 # 23 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4 # 1 "/usr/include/boost/mpl/aux_/preprocessor/enum.hpp" 1 3 4 # 28 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4 # 1 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 1 3 4 # 17 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 3 4 # 1 "/usr/include/boost/mpl/limits/arity.hpp" 1 3 4 # 18 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4 # 1 "/usr/include/boost/preprocessor/logical/and.hpp" 1 3 4 # 19 "/usr/include/boost/preprocessor/logical/and.hpp" 3 4 # 1 "/usr/include/boost/preprocessor/logical/bitand.hpp" 1 3 4 # 20 "/usr/include/boost/preprocessor/logical/and.hpp" 2 3 4 # 23 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4 # 1 "/usr/include/boost/preprocessor/identity.hpp" 1 3 4 # 15 "/usr/include/boost/preprocessor/identity.hpp" 3 4 # 1 "/usr/include/boost/preprocessor/facilities/identity.hpp" 1 3 4 # 16 "/usr/include/boost/preprocessor/identity.hpp" 2 3 4 # 24 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4 # 1 "/usr/include/boost/preprocessor/empty.hpp" 1 3 4 # 25 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4 # 66 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 3 4 # 1 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 1 3 4 # 20 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 3 4 # 1 "/usr/include/boost/preprocessor/control/while.hpp" 1 3 4 # 20 "/usr/include/boost/preprocessor/control/while.hpp" 3 4 # 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 # 21 "/usr/include/boost/preprocessor/control/while.hpp" 2 3 4 # 1 "/usr/include/boost/preprocessor/list/fold_left.hpp" 1 3 4 # 18 "/usr/include/boost/preprocessor/list/fold_left.hpp" 3 4 # 1 "/usr/include/boost/preprocessor/control/while.hpp" 1 3 4 # 19 "/usr/include/boost/preprocessor/list/fold_left.hpp" 2 3 4 # 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 # 21 "/usr/include/boost/preprocessor/list/fold_left.hpp" 2 3 4 # 41 "/usr/include/boost/preprocessor/list/fold_left.hpp" 3 4 # 1 "/usr/include/boost/preprocessor/list/detail/fold_left.hpp" 1 3 4 # 17 "/usr/include/boost/preprocessor/list/detail/fold_left.hpp" 3 4 # 1 "/usr/include/boost/preprocessor/control/expr_iif.hpp" 1 3 4 # 18 "/usr/include/boost/preprocessor/list/detail/fold_left.hpp" 2 3 4 # 1 "/usr/include/boost/preprocessor/list/adt.hpp" 1 3 4 # 18 "/usr/include/boost/preprocessor/list/adt.hpp" 3 4 # 1 "/usr/include/boost/preprocessor/detail/is_binary.hpp" 1 3 4 # 16 "/usr/include/boost/preprocessor/detail/is_binary.hpp" 3 4 # 1 "/usr/include/boost/preprocessor/detail/check.hpp" 1 3 4 # 17 "/usr/include/boost/preprocessor/detail/is_binary.hpp" 2 3 4 # 19 "/usr/include/boost/preprocessor/list/adt.hpp" 2 3 4 # 1 "/usr/include/boost/preprocessor/logical/compl.hpp" 1 3 4 # 20 "/usr/include/boost/preprocessor/list/adt.hpp" 2 3 4 # 20 "/usr/include/boost/preprocessor/list/detail/fold_left.hpp" 2 3 4 # 42 "/usr/include/boost/preprocessor/list/fold_left.hpp" 2 3 4 # 22 "/usr/include/boost/preprocessor/control/while.hpp" 2 3 4 # 1 "/usr/include/boost/preprocessor/list/fold_right.hpp" 1 3 4 # 20 "/usr/include/boost/preprocessor/list/fold_right.hpp" 3 4 # 1 "/usr/include/boost/preprocessor/detail/auto_rec.hpp" 1 3 4 # 21 "/usr/include/boost/preprocessor/list/fold_right.hpp" 2 3 4 # 37 "/usr/include/boost/preprocessor/list/fold_right.hpp" 3 4 # 1 "/usr/include/boost/preprocessor/list/detail/fold_right.hpp" 1 3 4 # 18 "/usr/include/boost/preprocessor/list/detail/fold_right.hpp" 3 4 # 1 "/usr/include/boost/preprocessor/list/reverse.hpp" 1 3 4 # 19 "/usr/include/boost/preprocessor/list/detail/fold_right.hpp" 2 3 4 # 38 "/usr/include/boost/preprocessor/list/fold_right.hpp" 2 3 4 # 23 "/usr/include/boost/preprocessor/control/while.hpp" 2 3 4 # 48 "/usr/include/boost/preprocessor/control/while.hpp" 3 4 # 1 "/usr/include/boost/preprocessor/control/detail/while.hpp" 1 3 4 # 49 "/usr/include/boost/preprocessor/control/while.hpp" 2 3 4 # 21 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 2 3 4 # 1 "/usr/include/boost/preprocessor/tuple/elem.hpp" 1 3 4 # 22 "/usr/include/boost/preprocessor/arithmetic/add.hpp" 2 3 4 # 67 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4 # 1 "/usr/include/boost/preprocessor/arithmetic/sub.hpp" 1 3 4 # 68 "/usr/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 3 4 # 29 "/usr/include/boost/mpl/aux_/na_spec.hpp" 2 3 4 # 20 "/usr/include/boost/mpl/if.hpp" 2 3 4 namespace boost { namespace mpl { template< bool C , typename T1 , typename T2 > struct if_c { typedef T1 type; }; template< typename T1 , typename T2 > struct if_c { typedef T2 type; }; template< typename T1 = na , typename T2 = na , typename T3 = na > struct if_ { private: typedef if_c< static_cast(T1::value) , T2 , T3 > almost_type_; public: typedef typename almost_type_::type type; }; # 131 "/usr/include/boost/mpl/if.hpp" 3 4 template<> struct if_< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : if_< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< if_< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef if_< na , na , na > result_; typedef if_< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< if_< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< if_< na , na , na > > : int_<-1> { }; } }} # 18 "/usr/include/boost/mpl/eval_if.hpp" 2 3 4 namespace boost { namespace mpl { template< typename C = na , typename F1 = na , typename F2 = na > struct eval_if { typedef typename if_::type f_; typedef typename f_::type type; }; template< bool C , typename F1 , typename F2 > struct eval_if_c { typedef typename if_c::type f_; typedef typename f_::type type; }; template<> struct eval_if< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : eval_if< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< eval_if< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef eval_if< na , na , na > result_; typedef eval_if< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< eval_if< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< eval_if< na , na , na > > : int_<-1> { }; } }} # 18 "/usr/include/boost/indirect_reference.hpp" 2 3 4 # 1 "/usr/include/boost/pointee.hpp" 1 3 4 # 23 "/usr/include/boost/pointee.hpp" 3 4 namespace boost { namespace detail { template struct smart_ptr_pointee { typedef typename P::element_type type; }; template struct iterator_pointee { typedef typename iterator_traits::value_type value_type; struct impl { template static char test(T const&); static char (& test(value_type&) )[2]; static Iterator& x; }; static const bool is_constant = sizeof(impl::test(*impl::x)) == 1; typedef typename mpl::if_c< is_constant , typename add_const::type , value_type >::type type; }; } template struct pointee : mpl::eval_if< detail::is_incrementable

, detail::iterator_pointee

, detail::smart_ptr_pointee

> { }; } # 19 "/usr/include/boost/indirect_reference.hpp" 2 3 4 namespace boost { namespace detail { template struct smart_ptr_reference { typedef typename boost::pointee

::type& type; }; } template struct indirect_reference : mpl::eval_if< detail::is_incrementable

, iterator_reference

, detail::smart_ptr_reference

> { }; } # 18 "/usr/include/boost/lambda/detail/operator_return_type_traits.hpp" 2 3 4 namespace boost { namespace lambda { namespace detail { template struct promote_code { static const int value = -1; }; template <> struct promote_code { static const int value = 10; }; template <> struct promote_code { static const int value = 20; }; template <> struct promote_code { static const int value = 30; }; template <> struct promote_code { static const int value = 40; }; template <> struct promote_code { static const int value = 50; }; template <> struct promote_code { static const int value = 100; }; template <> struct promote_code { static const int value = 200; }; template <> struct promote_code { static const int value = 300; }; template <> struct promote_code { static const int value = 400; }; template <> struct promote_code { static const int value = 500; }; template <> struct promote_code { static const int value = 600; }; template <> struct promote_code { static const int value = 700; }; } } } namespace std { template class complex; } namespace boost { namespace lambda { namespace detail { template <> struct promote_code< std::complex > { static const int value = 800; }; template <> struct promote_code< std::complex > { static const int value = 900; }; template <> struct promote_code< std::complex > { static const int value = 1000; }; template struct promote_to_int { typedef T type; }; template <> struct promote_to_int { typedef int type; }; template <> struct promote_to_int { typedef int type; }; template <> struct promote_to_int { typedef int type; }; template <> struct promote_to_int { typedef int type; }; template <> struct promote_to_int { typedef int type; }; template <> struct promote_to_int { typedef detail::IF::RET type; }; } template struct plain_return_type_1 { typedef detail::unspecified type; }; template struct plain_return_type_1, A> { typedef A type; }; template struct return_type_1, A> { typedef typename plain_return_type_1< unary_arithmetic_action, typename detail::remove_reference_and_cv::type >::type type; }; template struct plain_return_type_1, A> { typedef A type; }; template struct return_type_1, A> { typedef typename plain_return_type_1< bitwise_action, typename detail::remove_reference_and_cv::type >::type type; }; template struct plain_return_type_1, A> { typedef A& type; }; template struct return_type_1, A> { typedef typename plain_return_type_1< pre_increment_decrement_action, typename detail::remove_reference_and_cv::type >::type type; }; template struct plain_return_type_1, A> { typedef A type; }; template struct return_type_1, A> { typedef typename plain_return_type_1< post_increment_decrement_action, typename detail::remove_reference_and_cv::type >::type type; }; template struct plain_return_type_1, A> { typedef bool type; }; template struct return_type_1, A> { typedef typename plain_return_type_1< logical_action, typename detail::remove_reference_and_cv::type >::type type; }; template struct return_type_1, A> { typedef typename plain_return_type_1< other_action, typename detail::remove_reference_and_cv::type >::type type1; typedef typename detail::IF< boost::is_same::value, typename boost::remove_reference::type*, type1 >::RET type; }; # 217 "/usr/include/boost/lambda/detail/operator_return_type_traits.hpp" 3 4 namespace detail { template struct contentsof_type { typedef typename boost::indirect_reference::type type; }; template <> struct contentsof_type { typedef detail::unspecified type; }; template struct contentsof_type { typedef typename contentsof_type::type type1; typedef typename detail::IF< is_reference::value, const typename boost::remove_reference::type &, const type1 >::RET type; }; template struct contentsof_type { typedef typename contentsof_type::type type1; typedef typename detail::IF< is_reference::value, volatile typename boost::remove_reference::type &, volatile type1 >::RET type; }; template struct contentsof_type { typedef typename contentsof_type::type type1; typedef typename detail::IF< is_reference::value, const volatile typename boost::remove_reference::type &, const volatile type1 >::RET type; }; template struct contentsof_type { typedef A& type; }; template struct contentsof_type { typedef A& type; }; template struct contentsof_type { typedef A& type; }; template struct contentsof_type { typedef A& type; }; template struct contentsof_type { typedef A& type; }; template struct contentsof_type { typedef const A& type; }; template struct contentsof_type { typedef volatile A& type; }; template struct contentsof_type { typedef const volatile A& type; }; } template struct return_type_1, A> { typedef typename plain_return_type_1< other_action, typename detail::remove_reference_and_cv::type >::type type1; typedef typename detail::IF_type< boost::is_same::value, detail::contentsof_type< typename boost::remove_reference::type >, detail::identity_mapping >::type type; }; template struct plain_return_type_2 { typedef detail::unspecified type; }; namespace detail { class illegal_pointer_arithmetic{}; template struct pointer_arithmetic_traits { static const bool value = false; }; template struct pointer_arithmetic_traits { typedef typename array_to_pointer::type>::type AP; typedef typename array_to_pointer::type>::type BP; static const bool is_pointer_A = boost::is_pointer::value; static const bool is_pointer_B = boost::is_pointer::value; static const bool value = is_pointer_A || is_pointer_B; typedef typename detail::IF< is_pointer_A && is_pointer_B, detail::return_type_deduction_failure< detail::illegal_pointer_arithmetic >, typename detail::IF::RET >::RET type; }; template struct pointer_arithmetic_traits { typedef typename array_to_pointer::type>::type AP; typedef typename array_to_pointer::type>::type BP; static const bool is_pointer_A = boost::is_pointer::value; static const bool is_pointer_B = boost::is_pointer::value; static const bool value = is_pointer_A || is_pointer_B; static const bool same_pointer_type = is_pointer_A && is_pointer_B && boost::is_same< typename boost::remove_const< typename boost::remove_pointer< typename boost::remove_const::type >::type >::type, typename boost::remove_const< typename boost::remove_pointer< typename boost::remove_const::type >::type >::type >::value; typedef typename detail::IF< same_pointer_type, const std::ptrdiff_t, typename detail::IF< is_pointer_A, AP, detail::return_type_deduction_failure >::RET >::RET type; }; } namespace detail { template struct return_type_2_arithmetic_phase_1; template struct return_type_2_arithmetic_phase_2; template struct return_type_2_arithmetic_phase_3; } template struct return_type_2, A, B> { typedef typename detail::remove_reference_and_cv::type plain_A; typedef typename detail::remove_reference_and_cv::type plain_B; typedef typename plain_return_type_2, plain_A, plain_B>::type type1; typedef typename detail::IF_type< boost::is_same::value, detail::return_type_2_arithmetic_phase_1< detail::pointer_arithmetic_traits::value, Act, A, B >, plain_return_type_2, plain_A, plain_B> >::type type; }; namespace detail { template struct return_type_2_arithmetic_phase_1 { typedef typename return_type_2_arithmetic_phase_2< typename remove_reference_and_cv::type, typename remove_reference_and_cv::type >::type type; }; template struct return_type_2_arithmetic_phase_1 { typedef typename pointer_arithmetic_traits::type type; }; template struct return_type_2_arithmetic_phase_2 { typedef typename return_type_2_arithmetic_phase_3< typename promote_to_int::type, typename promote_to_int::type >::type type; }; # 488 "/usr/include/boost/lambda/detail/operator_return_type_traits.hpp" 3 4 struct promotion_of_unsigned_int { typedef detail::IF::RET type; }; template<> struct return_type_2_arithmetic_phase_2 { typedef promotion_of_unsigned_int::type type; }; template<> struct return_type_2_arithmetic_phase_2 { typedef promotion_of_unsigned_int::type type; }; template struct return_type_2_arithmetic_phase_3 { enum { promote_code_A_value = promote_code::value, promote_code_B_value = promote_code::value }; typedef typename detail::IF< promote_code_A_value == -1 || promote_code_B_value == -1, detail::return_type_deduction_failure, typename detail::IF< ((int)promote_code_A_value > (int)promote_code_B_value), A, B >::RET >::RET type; }; } template struct return_type_2, A, B> { typedef typename detail::remove_reference_and_cv::type plain_A; typedef typename detail::remove_reference_and_cv::type plain_B; typedef typename plain_return_type_2, plain_A, plain_B>::type type1; typedef typename detail::IF_type< boost::is_same::value, return_type_2, A, B>, plain_return_type_2, plain_A, plain_B> >::type type; # 555 "/usr/include/boost/lambda/detail/operator_return_type_traits.hpp" 3 4 typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( !(boost::is_float::value && boost::is_float::value) ) >)> boost_static_assert_typedef_555; }; namespace detail { # 592 "/usr/include/boost/lambda/detail/operator_return_type_traits.hpp" 3 4 template struct get_ostream_type { typedef std::basic_ostream& type; }; template struct get_istream_type { typedef std::basic_istream& type; }; template struct leftshift_type { private: typedef typename boost::remove_reference::type plainA; public: typedef typename detail::IF_type< is_instance_of_2::value, get_ostream_type, detail::remove_reference_and_cv >::type type; }; template struct rightshift_type { private: typedef typename boost::remove_reference::type plainA; public: typedef typename detail::IF_type< is_instance_of_2::value, get_istream_type, detail::remove_reference_and_cv >::type type; }; } template struct return_type_2, A, B> { typedef typename detail::remove_reference_and_cv::type plain_A; typedef typename detail::remove_reference_and_cv::type plain_B; typedef typename plain_return_type_2, plain_A, plain_B>::type type1; typedef typename detail::IF_type< boost::is_same::value, detail::leftshift_type, plain_return_type_2, plain_A, plain_B> >::type type; }; template struct return_type_2, A, B> { typedef typename detail::remove_reference_and_cv::type plain_A; typedef typename detail::remove_reference_and_cv::type plain_B; typedef typename plain_return_type_2, plain_A, plain_B>::type type1; typedef typename detail::IF_type< boost::is_same::value, detail::rightshift_type, plain_return_type_2, plain_A, plain_B> >::type type; }; template struct plain_return_type_2, A, B> { typedef bool type; }; template struct return_type_2, A, B> { typedef typename detail::remove_reference_and_cv::type plain_A; typedef typename detail::remove_reference_and_cv::type plain_B; typedef typename plain_return_type_2, plain_A, plain_B>::type type; }; template struct plain_return_type_2, A, B> { typedef bool type; }; template struct return_type_2, A, B> { typedef typename detail::remove_reference_and_cv::type plain_A; typedef typename detail::remove_reference_and_cv::type plain_B; typedef typename plain_return_type_2, plain_A, plain_B>::type type; }; # 715 "/usr/include/boost/lambda/detail/operator_return_type_traits.hpp" 3 4 template struct return_type_2, A, B> { typedef typename detail::remove_reference_and_cv::type plain_A; typedef typename detail::remove_reference_and_cv::type plain_B; typedef typename plain_return_type_2< arithmetic_assignment_action, plain_A, plain_B >::type type1; typedef typename detail::IF< boost::is_same::value, typename boost::add_reference::type, type1 >::RET type; }; template struct return_type_2, A, B> { typedef typename detail::remove_reference_and_cv::type plain_A; typedef typename detail::remove_reference_and_cv::type plain_B; typedef typename plain_return_type_2< bitwise_assignment_action, plain_A, plain_B >::type type1; typedef typename detail::IF< boost::is_same::value, typename boost::add_reference::type, type1 >::RET type; }; template struct return_type_2, A, B> { typedef typename detail::remove_reference_and_cv::type plain_A; typedef typename detail::remove_reference_and_cv::type plain_B; typedef typename plain_return_type_2< other_action, plain_A, plain_B >::type type1; typedef typename detail::IF< boost::is_same::value, typename boost::add_reference::type, type1 >::RET type; }; # 781 "/usr/include/boost/lambda/detail/operator_return_type_traits.hpp" 3 4 template struct return_type_2, A, B> { typedef typename detail::remove_reference_and_cv::type plain_A; typedef typename detail::remove_reference_and_cv::type plain_B; typedef typename plain_return_type_2< other_action, plain_A, plain_B >::type type; }; namespace detail { template struct subscript_type { typedef detail::unspecified type; }; template struct subscript_type { typedef A& type; }; template struct subscript_type { typedef A& type; }; template struct subscript_type { typedef A& type; }; template struct subscript_type { typedef A& type; }; template struct subscript_type { typedef A& type; }; template struct subscript_type { typedef const A& type; }; template struct subscript_type { typedef volatile A& type; }; template struct subscript_type { typedef const volatile A& type; }; } template struct return_type_2, A, B> { typedef typename detail::remove_reference_and_cv::type plain_A; typedef typename detail::remove_reference_and_cv::type plain_B; typedef typename boost::remove_reference::type nonref_A; typedef typename boost::remove_reference::type nonref_B; typedef typename plain_return_type_2< other_action, plain_A, plain_B >::type type1; typedef typename detail::IF_type< boost::is_same::value, detail::subscript_type, plain_return_type_2, plain_A, plain_B> >::type type; }; } } # 874 "/usr/include/boost/lambda/detail/operator_return_type_traits.hpp" 3 4 namespace std { template class deque; } namespace std { template class basic_string; template class vector; template class map; template class multimap; } namespace boost { namespace lambda { template struct plain_return_type_2, std::map, B> { typedef T& type; }; template struct plain_return_type_2, std::multimap, B> { typedef T& type; }; template struct plain_return_type_2, std::deque, B> { typedef typename std::deque::reference type; }; template struct plain_return_type_2, const std::deque, B> { typedef typename std::deque::const_reference type; }; template struct plain_return_type_2, std::vector, B> { typedef typename std::vector::reference type; }; template struct plain_return_type_2, const std::vector, B> { typedef typename std::vector::const_reference type; }; template struct plain_return_type_2, std::basic_string, B> { typedef typename std::basic_string::reference type; }; template struct plain_return_type_2, const std::basic_string, B> { typedef typename std::basic_string::const_reference type; }; } } # 24 "/usr/include/boost/lambda/lambda.hpp" 2 3 4 # 1 "/usr/include/boost/lambda/detail/operators.hpp" 1 3 4 # 18 "/usr/include/boost/lambda/detail/operators.hpp" 3 4 namespace boost { namespace lambda { # 109 "/usr/include/boost/lambda/detail/operators.hpp" 3 4 template inline const lambda_functor< lambda_functor_base< arithmetic_action, tuple, typename const_copy_argument ::type> > > operator+ (const lambda_functor& a, const B& b) { return lambda_functor_base< arithmetic_action, tuple, typename const_copy_argument ::type> > (tuple, typename const_copy_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_action, tuple::type, lambda_functor > > > operator+ (const A& a, const lambda_functor& b) { return lambda_functor_base< arithmetic_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_action, tuple, lambda_functor > > > operator+ (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< arithmetic_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_action, tuple, typename const_copy_argument ::type> > > operator- (const lambda_functor& a, const B& b) { return lambda_functor_base< arithmetic_action, tuple, typename const_copy_argument ::type> > (tuple, typename const_copy_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_action, tuple::type, lambda_functor > > > operator- (const A& a, const lambda_functor& b) { return lambda_functor_base< arithmetic_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_action, tuple, lambda_functor > > > operator- (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< arithmetic_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_action, tuple, typename const_copy_argument ::type> > > operator* (const lambda_functor& a, const B& b) { return lambda_functor_base< arithmetic_action, tuple, typename const_copy_argument ::type> > (tuple, typename const_copy_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_action, tuple::type, lambda_functor > > > operator* (const A& a, const lambda_functor& b) { return lambda_functor_base< arithmetic_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_action, tuple, lambda_functor > > > operator* (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< arithmetic_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_action, tuple, typename const_copy_argument ::type> > > operator/ (const lambda_functor& a, const B& b) { return lambda_functor_base< arithmetic_action, tuple, typename const_copy_argument ::type> > (tuple, typename const_copy_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_action, tuple::type, lambda_functor > > > operator/ (const A& a, const lambda_functor& b) { return lambda_functor_base< arithmetic_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_action, tuple, lambda_functor > > > operator/ (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< arithmetic_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_action, tuple, typename const_copy_argument ::type> > > operator% (const lambda_functor& a, const B& b) { return lambda_functor_base< arithmetic_action, tuple, typename const_copy_argument ::type> > (tuple, typename const_copy_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_action, tuple::type, lambda_functor > > > operator% (const A& a, const lambda_functor& b) { return lambda_functor_base< arithmetic_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_action, tuple, lambda_functor > > > operator% (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< arithmetic_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_action, tuple, typename const_copy_argument ::type> > > operator<< (const lambda_functor& a, const B& b) { return lambda_functor_base< bitwise_action, tuple, typename const_copy_argument ::type> > (tuple, typename const_copy_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_action, tuple::type, lambda_functor > > > operator<< (const A& a, const lambda_functor& b) { return lambda_functor_base< bitwise_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_action, tuple, lambda_functor > > > operator<< (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< bitwise_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_action, tuple, typename const_copy_argument ::type> > > operator>> (const lambda_functor& a, const B& b) { return lambda_functor_base< bitwise_action, tuple, typename const_copy_argument ::type> > (tuple, typename const_copy_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_action, tuple::type, lambda_functor > > > operator>> (const A& a, const lambda_functor& b) { return lambda_functor_base< bitwise_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_action, tuple, lambda_functor > > > operator>> (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< bitwise_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_action, tuple, typename const_copy_argument ::type> > > operator& (const lambda_functor& a, const B& b) { return lambda_functor_base< bitwise_action, tuple, typename const_copy_argument ::type> > (tuple, typename const_copy_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_action, tuple::type, lambda_functor > > > operator& (const A& a, const lambda_functor& b) { return lambda_functor_base< bitwise_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_action, tuple, lambda_functor > > > operator& (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< bitwise_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_action, tuple, typename const_copy_argument ::type> > > operator| (const lambda_functor& a, const B& b) { return lambda_functor_base< bitwise_action, tuple, typename const_copy_argument ::type> > (tuple, typename const_copy_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_action, tuple::type, lambda_functor > > > operator| (const A& a, const lambda_functor& b) { return lambda_functor_base< bitwise_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_action, tuple, lambda_functor > > > operator| (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< bitwise_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_action, tuple, typename const_copy_argument ::type> > > operator^ (const lambda_functor& a, const B& b) { return lambda_functor_base< bitwise_action, tuple, typename const_copy_argument ::type> > (tuple, typename const_copy_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_action, tuple::type, lambda_functor > > > operator^ (const A& a, const lambda_functor& b) { return lambda_functor_base< bitwise_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_action, tuple, lambda_functor > > > operator^ (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< bitwise_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< logical_action, tuple, typename const_copy_argument ::type> > > operator&& (const lambda_functor& a, const B& b) { return lambda_functor_base< logical_action, tuple, typename const_copy_argument ::type> > (tuple, typename const_copy_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< logical_action, tuple::type, lambda_functor > > > operator&& (const A& a, const lambda_functor& b) { return lambda_functor_base< logical_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< logical_action, tuple, lambda_functor > > > operator&& (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< logical_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< logical_action, tuple, typename const_copy_argument ::type> > > operator|| (const lambda_functor& a, const B& b) { return lambda_functor_base< logical_action, tuple, typename const_copy_argument ::type> > (tuple, typename const_copy_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< logical_action, tuple::type, lambda_functor > > > operator|| (const A& a, const lambda_functor& b) { return lambda_functor_base< logical_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< logical_action, tuple, lambda_functor > > > operator|| (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< logical_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< relational_action, tuple, typename const_copy_argument ::type> > > operator< (const lambda_functor& a, const B& b) { return lambda_functor_base< relational_action, tuple, typename const_copy_argument ::type> > (tuple, typename const_copy_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< relational_action, tuple::type, lambda_functor > > > operator< (const A& a, const lambda_functor& b) { return lambda_functor_base< relational_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< relational_action, tuple, lambda_functor > > > operator< (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< relational_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< relational_action, tuple, typename const_copy_argument ::type> > > operator> (const lambda_functor& a, const B& b) { return lambda_functor_base< relational_action, tuple, typename const_copy_argument ::type> > (tuple, typename const_copy_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< relational_action, tuple::type, lambda_functor > > > operator> (const A& a, const lambda_functor& b) { return lambda_functor_base< relational_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< relational_action, tuple, lambda_functor > > > operator> (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< relational_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< relational_action, tuple, typename const_copy_argument ::type> > > operator<= (const lambda_functor& a, const B& b) { return lambda_functor_base< relational_action, tuple, typename const_copy_argument ::type> > (tuple, typename const_copy_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< relational_action, tuple::type, lambda_functor > > > operator<= (const A& a, const lambda_functor& b) { return lambda_functor_base< relational_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< relational_action, tuple, lambda_functor > > > operator<= (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< relational_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< relational_action, tuple, typename const_copy_argument ::type> > > operator>= (const lambda_functor& a, const B& b) { return lambda_functor_base< relational_action, tuple, typename const_copy_argument ::type> > (tuple, typename const_copy_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< relational_action, tuple::type, lambda_functor > > > operator>= (const A& a, const lambda_functor& b) { return lambda_functor_base< relational_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< relational_action, tuple, lambda_functor > > > operator>= (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< relational_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< relational_action, tuple, typename const_copy_argument ::type> > > operator== (const lambda_functor& a, const B& b) { return lambda_functor_base< relational_action, tuple, typename const_copy_argument ::type> > (tuple, typename const_copy_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< relational_action, tuple::type, lambda_functor > > > operator== (const A& a, const lambda_functor& b) { return lambda_functor_base< relational_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< relational_action, tuple, lambda_functor > > > operator== (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< relational_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< relational_action, tuple, typename const_copy_argument ::type> > > operator!= (const lambda_functor& a, const B& b) { return lambda_functor_base< relational_action, tuple, typename const_copy_argument ::type> > (tuple, typename const_copy_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< relational_action, tuple::type, lambda_functor > > > operator!= (const A& a, const lambda_functor& b) { return lambda_functor_base< relational_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< relational_action, tuple, lambda_functor > > > operator!= (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< relational_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action, tuple, typename reference_argument ::type> > > operator+= (const lambda_functor& a, const B& b) { return lambda_functor_base< arithmetic_assignment_action, tuple, typename reference_argument ::type> > (tuple, typename reference_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action, tuple::type, lambda_functor > > > operator+= (A& a, const lambda_functor& b) { return lambda_functor_base< arithmetic_assignment_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action, tuple, lambda_functor > > > operator+= (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< arithmetic_assignment_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action, tuple, typename reference_argument ::type> > > operator-= (const lambda_functor& a, const B& b) { return lambda_functor_base< arithmetic_assignment_action, tuple, typename reference_argument ::type> > (tuple, typename reference_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action, tuple::type, lambda_functor > > > operator-= (A& a, const lambda_functor& b) { return lambda_functor_base< arithmetic_assignment_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action, tuple, lambda_functor > > > operator-= (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< arithmetic_assignment_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action, tuple, typename reference_argument ::type> > > operator*= (const lambda_functor& a, const B& b) { return lambda_functor_base< arithmetic_assignment_action, tuple, typename reference_argument ::type> > (tuple, typename reference_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action, tuple::type, lambda_functor > > > operator*= (A& a, const lambda_functor& b) { return lambda_functor_base< arithmetic_assignment_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action, tuple, lambda_functor > > > operator*= (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< arithmetic_assignment_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action, tuple, typename reference_argument ::type> > > operator/= (const lambda_functor& a, const B& b) { return lambda_functor_base< arithmetic_assignment_action, tuple, typename reference_argument ::type> > (tuple, typename reference_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action, tuple::type, lambda_functor > > > operator/= (A& a, const lambda_functor& b) { return lambda_functor_base< arithmetic_assignment_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action, tuple, lambda_functor > > > operator/= (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< arithmetic_assignment_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action, tuple, typename reference_argument ::type> > > operator%= (const lambda_functor& a, const B& b) { return lambda_functor_base< arithmetic_assignment_action, tuple, typename reference_argument ::type> > (tuple, typename reference_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action, tuple::type, lambda_functor > > > operator%= (A& a, const lambda_functor& b) { return lambda_functor_base< arithmetic_assignment_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< arithmetic_assignment_action, tuple, lambda_functor > > > operator%= (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< arithmetic_assignment_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_assignment_action, tuple, typename reference_argument ::type> > > operator<<= (const lambda_functor& a, const B& b) { return lambda_functor_base< bitwise_assignment_action, tuple, typename reference_argument ::type> > (tuple, typename reference_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_assignment_action, tuple::type, lambda_functor > > > operator<<= (A& a, const lambda_functor& b) { return lambda_functor_base< bitwise_assignment_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_assignment_action, tuple, lambda_functor > > > operator<<= (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< bitwise_assignment_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_assignment_action, tuple, typename reference_argument ::type> > > operator>>= (const lambda_functor& a, const B& b) { return lambda_functor_base< bitwise_assignment_action, tuple, typename reference_argument ::type> > (tuple, typename reference_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_assignment_action, tuple::type, lambda_functor > > > operator>>= (A& a, const lambda_functor& b) { return lambda_functor_base< bitwise_assignment_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_assignment_action, tuple, lambda_functor > > > operator>>= (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< bitwise_assignment_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_assignment_action, tuple, typename reference_argument ::type> > > operator&= (const lambda_functor& a, const B& b) { return lambda_functor_base< bitwise_assignment_action, tuple, typename reference_argument ::type> > (tuple, typename reference_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_assignment_action, tuple::type, lambda_functor > > > operator&= (A& a, const lambda_functor& b) { return lambda_functor_base< bitwise_assignment_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_assignment_action, tuple, lambda_functor > > > operator&= (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< bitwise_assignment_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_assignment_action, tuple, typename reference_argument ::type> > > operator|= (const lambda_functor& a, const B& b) { return lambda_functor_base< bitwise_assignment_action, tuple, typename reference_argument ::type> > (tuple, typename reference_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_assignment_action, tuple::type, lambda_functor > > > operator|= (A& a, const lambda_functor& b) { return lambda_functor_base< bitwise_assignment_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_assignment_action, tuple, lambda_functor > > > operator|= (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< bitwise_assignment_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_assignment_action, tuple, typename reference_argument ::type> > > operator^= (const lambda_functor& a, const B& b) { return lambda_functor_base< bitwise_assignment_action, tuple, typename reference_argument ::type> > (tuple, typename reference_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_assignment_action, tuple::type, lambda_functor > > > operator^= (A& a, const lambda_functor& b) { return lambda_functor_base< bitwise_assignment_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_assignment_action, tuple, lambda_functor > > > operator^= (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< bitwise_assignment_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } # 147 "/usr/include/boost/lambda/detail/operators.hpp" 3 4 template inline const lambda_functor< lambda_functor_base< other_action, tuple, typename const_copy_argument ::type> > > operator, (const lambda_functor& a, const B& b) { return lambda_functor_base< other_action, tuple, typename const_copy_argument ::type> > (tuple, typename const_copy_argument ::type>(a, b)); } template inline const lambda_functor< lambda_functor_base< other_action, tuple::type, lambda_functor > > > operator, (const A& a, const lambda_functor& b) { return lambda_functor_base< other_action, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< other_action, tuple, lambda_functor > > > operator, (const lambda_functor& a, const lambda_functor& b) { return lambda_functor_base< other_action, tuple, lambda_functor > > (tuple, lambda_functor >(a, b)); } namespace detail { # 182 "/usr/include/boost/lambda/detail/operators.hpp" 3 4 template struct convert_ostream_to_ref_others_to_c_plain_by_default { typedef typename detail::IF< is_instance_of_2< T, std::basic_ostream >::value, T&, typename const_copy_argument ::type >::RET type; }; template struct convert_istream_to_ref_others_to_c_plain_by_default { typedef typename detail::IF< is_instance_of_2< T, std::basic_istream >::value, T&, typename const_copy_argument ::type >::RET type; }; } template inline const lambda_functor< lambda_functor_base< bitwise_action< leftshift_action>, tuple::type, lambda_functor > > > operator<< (A& a, const lambda_functor& b) { return lambda_functor_base< bitwise_action< leftshift_action>, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_action< rightshift_action>, tuple::type, lambda_functor > > > operator>> (A& a, const lambda_functor& b) { return lambda_functor_base< bitwise_action< rightshift_action>, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a, b)); } template inline const lambda_functor< lambda_functor_base< bitwise_action, tuple, Ret(&)(ManipArg)> > > operator<<(const lambda_functor& a, Ret(&b)(ManipArg)) { return lambda_functor_base< bitwise_action, tuple, Ret(&)(ManipArg)> > ( tuple, Ret(&)(ManipArg)>(a, b) ); } template inline const lambda_functor< lambda_functor_base< bitwise_action, tuple, Ret(&)(ManipArg)> > > operator>>(const lambda_functor& a, Ret(&b)(ManipArg)) { return lambda_functor_base< bitwise_action, tuple, Ret(&)(ManipArg)> > ( tuple, Ret(&)(ManipArg)>(a, b) ); } # 293 "/usr/include/boost/lambda/detail/operators.hpp" 3 4 template inline const lambda_functor< lambda_functor_base, tuple, B(&)[N]> > > operator+ (const lambda_functor& a, B(&b)[N]) { return lambda_functor< lambda_functor_base, tuple, B(&)[N]> > >(tuple, B(&)[N]>(a, b)); } template inline const lambda_functor< lambda_functor_base, tuple > > > operator+ (A(&a)[N], const lambda_functor& b) { return lambda_functor_base, tuple > > (tuple >(a, b)); } template inline const lambda_functor< lambda_functor_base, tuple, const B(&)[N]> > > operator+ (const lambda_functor& a, const B(&b)[N]) { return lambda_functor< lambda_functor_base, tuple, const B(&)[N]> > >(tuple, const B(&)[N]>(a, b)); } template inline const lambda_functor< lambda_functor_base, tuple > > > operator+ (const A(&a)[N], const lambda_functor& b) { return lambda_functor_base, tuple > > (tuple >(a, b)); } template inline const lambda_functor< lambda_functor_base, tuple > > > operator- (A(&a)[N], const lambda_functor& b) { return lambda_functor_base, tuple > > (tuple >(a, b)); } template inline const lambda_functor< lambda_functor_base, tuple > > > operator- (const A(&a)[N], const lambda_functor& b) { return lambda_functor_base, tuple > > (tuple >(a, b)); } # 336 "/usr/include/boost/lambda/detail/operators.hpp" 3 4 template inline const lambda_functor, tuple > > > operator+ (const lambda_functor& a) { return lambda_functor_base, tuple > > ( tuple >(a) ); } template inline const lambda_functor, tuple > > > operator- (const lambda_functor& a) { return lambda_functor_base, tuple > > ( tuple >(a) ); } template inline const lambda_functor, tuple > > > operator~ (const lambda_functor& a) { return lambda_functor_base, tuple > > ( tuple >(a) ); } template inline const lambda_functor, tuple > > > operator! (const lambda_functor& a) { return lambda_functor_base, tuple > > ( tuple >(a) ); } template inline const lambda_functor, tuple > > > operator++ (const lambda_functor& a) { return lambda_functor_base, tuple > > ( tuple >(a) ); } template inline const lambda_functor, tuple > > > operator-- (const lambda_functor& a) { return lambda_functor_base, tuple > > ( tuple >(a) ); } template inline const lambda_functor, tuple > > > operator* (const lambda_functor& a) { return lambda_functor_base, tuple > > ( tuple >(a) ); } template inline const lambda_functor, tuple > > > operator& (const lambda_functor& a) { return lambda_functor_base, tuple > > ( tuple >(a) ); } # 361 "/usr/include/boost/lambda/detail/operators.hpp" 3 4 template inline const lambda_functor, tuple > > > operator++ (const lambda_functor& a, int) { return lambda_functor_base, tuple > > ( tuple >(a) ); } template inline const lambda_functor, tuple > > > operator-- (const lambda_functor& a, int) { return lambda_functor_base, tuple > > ( tuple >(a) ); } } } # 27 "/usr/include/boost/lambda/lambda.hpp" 2 3 4 # 1 "/usr/include/boost/lambda/detail/member_ptr.hpp" 1 3 4 # 17 "/usr/include/boost/lambda/detail/member_ptr.hpp" 3 4 namespace boost { namespace lambda { class member_pointer_action {}; namespace detail { template struct member_pointer { typedef typename boost::add_reference::type type; typedef detail::unspecified class_type; typedef detail::unspecified qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = false; }; template struct member_pointer { typedef typename boost::add_reference::type type; typedef U class_type; typedef U qualified_class_type; static const bool is_data_member = true; static const bool is_function_member = false; }; template struct member_pointer { typedef typename boost::add_reference::type type; typedef U class_type; typedef const U qualified_class_type; static const bool is_data_member = true; static const bool is_function_member = false; }; template struct member_pointer { typedef typename boost::add_reference::type type; typedef U class_type; typedef volatile U qualified_class_type; static const bool is_data_member = true; static const bool is_function_member = false; }; template struct member_pointer { typedef typename boost::add_reference::type type; typedef U class_type; typedef const volatile U qualified_class_type; static const bool is_data_member = true; static const bool is_function_member = false; }; template struct member_pointer { typedef T type; typedef U class_type; typedef U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef const U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef const U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef const U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef const U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef const U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef const U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef const U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef const U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef const U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef const U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef volatile U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef volatile U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef volatile U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef volatile U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef volatile U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef volatile U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef volatile U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef volatile U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef volatile U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef volatile U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef const volatile U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef const volatile U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef const volatile U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef const volatile U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef const volatile U qualified_class_type; }; template struct member_pointer { typedef T type; typedef U class_type; typedef const volatile U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef const volatile U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef const volatile U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef const volatile U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; template struct member_pointer { typedef T type; typedef U class_type; typedef const volatile U qualified_class_type; static const bool is_data_member = false; static const bool is_function_member = true; }; } namespace detail { # 432 "/usr/include/boost/lambda/detail/member_ptr.hpp" 3 4 template class member_pointer_caller { A a; B b; public: member_pointer_caller(const A& aa, const B& bb) : a(aa), b(bb) {} RET operator()() const { return (a->*b)(); } template RET operator()(const A1& a1) const { return (a->*b)(a1); } template RET operator()(const A1& a1, const A2& a2) const { return (a->*b)(a1, a2); } template RET operator()(const A1& a1, const A2& a2, const A3& a3) const { return (a->*b)(a1, a2, a3); } template RET operator()(const A1& a1, const A2& a2, const A3& a3, const A4& a4) const { return (a->*b)(a1, a2, a3, a4); } template RET operator()(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5) const { return (a->*b)(a1, a2, a3, a4, a5); } template RET operator()(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6) const { return (a->*b)(a1, a2, a3, a4, a5, a6); } template RET operator()(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7) const { return (a->*b)(a1, a2, a3, a4, a5, a6, a7); } template RET operator()(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8) const { return (a->*b)(a1, a2, a3, a4, a5, a6, a7, a8); } template RET operator()(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9) const { return (a->*b)(a1, a2, a3, a4, a5, a6, a7, a8, a9); } }; template struct member_pointer_action_helper; template <> struct member_pointer_action_helper { public: template static RET apply(A& a, B& b) { return a->*b; } template struct return_type { private: typedef typename detail::remove_reference_and_cv::type plainB; typedef typename detail::member_pointer::type type0; typedef typename boost::remove_reference::type type1; typedef typename detail::remove_reference_and_cv::type non_ref_A; typedef typename ::boost::remove_pointer::type non_pointer_A; public: typedef typename detail::IF< ::boost::is_const::value, typename ::boost::add_const::type, type1 >::RET type2; typedef typename detail::IF< ::boost::is_volatile::value, typename ::boost::add_volatile::type, type2 >::RET type3; typedef typename ::boost::add_reference::type type; }; }; template <> struct member_pointer_action_helper { public: template static RET apply(A& a, B& b) { return a->*b; } template struct return_type { typedef typename plain_return_type_2< other_action, A, B >::type type; }; }; template <> struct member_pointer_action_helper { public: template static RET apply(A& a, B& b) { typedef typename ::boost::remove_cv::type plainB; typedef typename detail::member_pointer::type ret_t; typedef typename ::boost::remove_cv::type plainA; return detail::member_pointer_caller(a, b); } template struct return_type { typedef typename detail::remove_reference_and_cv::type plainB; typedef typename detail::member_pointer::type ret_t; typedef typename detail::remove_reference_and_cv::type plainA; typedef detail::member_pointer_caller type; }; }; } template<> class other_action { public: template static RET apply(A& a, B& b) { typedef typename ::boost::remove_cv::type plainB; return detail::member_pointer_action_helper< boost::is_pointer::value && detail::member_pointer::is_data_member, boost::is_pointer::value && detail::member_pointer::is_function_member >::template apply(a, b); } }; # 642 "/usr/include/boost/lambda/detail/member_ptr.hpp" 3 4 template struct return_type_2, A, B> { private: typedef typename detail::remove_reference_and_cv::type plainB; public: typedef typename detail::member_pointer_action_helper< detail::member_pointer::is_data_member, detail::member_pointer::is_function_member >::template return_type::type type; }; template struct return_type_N, Args> { typedef typename boost::tuples::element<0, Args>::type A; typedef typename boost::tuples::element<1, Args>::type B; typedef typename return_type_2, typename boost::remove_reference::type, typename boost::remove_reference::type >::type type; }; template inline const lambda_functor< lambda_functor_base< action<2, other_action >, tuple, typename const_copy_argument::type> > > operator->*(const lambda_functor& a1, const Arg2& a2) { return lambda_functor_base< action<2, other_action >, tuple, typename const_copy_argument::type> > (tuple, typename const_copy_argument::type>(a1, a2)); } template inline const lambda_functor< lambda_functor_base< action<2, other_action >, tuple, lambda_functor > > > operator->*(const lambda_functor& a1, const lambda_functor& a2) { return lambda_functor_base< action<2, other_action >, tuple, lambda_functor > > (tuple, lambda_functor >(a1, a2)); } template inline const lambda_functor< lambda_functor_base< action<2, other_action >, tuple::type, lambda_functor > > > operator->*(const Arg1& a1, const lambda_functor& a2) { return lambda_functor_base< action<2, other_action >, tuple::type, lambda_functor > > (tuple::type, lambda_functor >(a1, a2)); } } } # 31 "/usr/include/boost/lambda/lambda.hpp" 2 3 4 # 28 "anneal.h" 2 # 1 "/usr/include/boost/lambda/bind.hpp" 1 3 4 # 17 "/usr/include/boost/lambda/bind.hpp" 3 4 # 1 "/usr/include/boost/lambda/detail/bind_functions.hpp" 1 3 4 # 17 "/usr/include/boost/lambda/detail/bind_functions.hpp" 3 4 namespace boost { namespace lambda { # 40 "/usr/include/boost/lambda/detail/bind_functions.hpp" 3 4 template inline const lambda_functor< lambda_functor_base< action<1, function_action<1, Result> >, typename detail::bind_tuple_mapper::type > > bind(Result(& a1)()) { return lambda_functor_base< action<1, function_action<1, Result> >, typename detail::bind_tuple_mapper::type > ( typename detail::bind_tuple_mapper::type (a1) ); } template inline const lambda_functor< lambda_functor_base< action<1, function_action<1> >, typename detail::bind_tuple_mapper::type > > bind(const Arg1& a1) { return lambda_functor_base< action<1, function_action<1> >, typename detail::bind_tuple_mapper::type > ( typename detail::bind_tuple_mapper::type (a1) ); } template inline const lambda_functor< lambda_functor_base< action<1, function_action<1, Result> >, typename detail::bind_tuple_mapper::type > > bind(const Arg1& a1) { return lambda_functor_base< action<1, function_action<1, Result> >, typename detail::bind_tuple_mapper::type > ( typename detail::bind_tuple_mapper::type (a1) ); } # 181 "/usr/include/boost/lambda/detail/bind_functions.hpp" 3 4 template inline const lambda_functor< lambda_functor_base< action<2, function_action<2, Result> >, typename detail::bind_tuple_mapper::type > > bind(Result(&a1)(Par1), const Arg2& a2) { return lambda_functor_base< action<2, function_action<2, Result> >, typename detail::bind_tuple_mapper::type > ( typename detail::bind_tuple_mapper::type (a1, a2) ); } template inline const lambda_functor< lambda_functor_base< action<2, function_action<2> >, typename detail::bind_tuple_mapper::type > > bind(const Arg1& a1, const Arg2& a2) { return lambda_functor_base< action<2, function_action<2> >, typename detail::bind_tuple_mapper::type > ( typename detail::bind_tuple_mapper::type (a1, a2) ); } template inline const lambda_functor< lambda_functor_base< action<2, function_action<2, Result> >, typename detail::bind_tuple_mapper::type > > bind(const Arg1& a1, const Arg2& a2) { return lambda_functor_base< action<2, function_action<2, Result> >, typename detail::bind_tuple_mapper::type > ( typename detail::bind_tuple_mapper::type (a1, a2) ); } # 322 "/usr/include/boost/lambda/detail/bind_functions.hpp" 3 4 template inline const lambda_functor< lambda_functor_base< action<3, function_action<3, Result> >, typename detail::bind_tuple_mapper< Result(&)(Par1, Par2), const Arg2, const Arg3 >::type > > bind(Result(&a1)(Par1, Par2), const Arg2& a2, const Arg3& a3) { return lambda_functor_base< action<3, function_action<3, Result> >, typename detail::bind_tuple_mapper< Result(&)(Par1, Par2), const Arg2, const Arg3 >::type > ( typename detail::bind_tuple_mapper< Result(&)(Par1, Par2), const Arg2, const Arg3 >::type (a1, a2, a3) ); } template inline const lambda_functor< lambda_functor_base< action<3, function_action<3> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3 >::type > > bind(const Arg1& a1, const Arg2& a2, const Arg3& a3) { return lambda_functor_base< action<3, function_action<3> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3 >::type > ( typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3 >::type (a1, a2, a3) ); } template inline const lambda_functor< lambda_functor_base< action<3, function_action<3, Result> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3 >::type > > bind(const Arg1& a1, const Arg2& a2, const Arg3& a3) { return lambda_functor_base< action<3, function_action<3, Result> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3 >::type > ( typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3 >::type (a1, a2, a3) ); } # 491 "/usr/include/boost/lambda/detail/bind_functions.hpp" 3 4 template inline const lambda_functor< lambda_functor_base< action<4, function_action<4, Result> >, typename detail::bind_tuple_mapper< Result(&)(Par1, Par2, Par3), const Arg2, const Arg3, const Arg4 >::type > > bind(Result(&a1)(Par1, Par2, Par3), const Arg2& a2, const Arg3& a3, const Arg4& a4) { return lambda_functor_base< action<4, function_action<4, Result> >, typename detail::bind_tuple_mapper< Result(&)(Par1, Par2, Par3), const Arg2, const Arg3, const Arg4 >::type > ( typename detail::bind_tuple_mapper< Result(&)(Par1, Par2, Par3), const Arg2, const Arg3, const Arg4 >::type (a1, a2, a3, a4) ); } template inline const lambda_functor< lambda_functor_base< action<4, function_action<4> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4 >::type > > bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4) { return lambda_functor_base< action<4, function_action<4> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4 >::type > ( typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4 >::type (a1, a2, a3, a4) ); } template inline const lambda_functor< lambda_functor_base< action<4, function_action<4, Result> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4 >::type > > bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4) { return lambda_functor_base< action<4, function_action<4, Result> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4 >::type > ( typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4 >::type (a1, a2, a3, a4) ); } # 666 "/usr/include/boost/lambda/detail/bind_functions.hpp" 3 4 template inline const lambda_functor< lambda_functor_base< action<5, function_action<5, Result> >, typename detail::bind_tuple_mapper< Result(&)(Par1, Par2, Par3, Par4), const Arg2, const Arg3, const Arg4, const Arg5 >::type > > bind(Result(&a1)(Par1, Par2, Par3, Par4), const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5) { return lambda_functor_base< action<5, function_action<5, Result> >, typename detail::bind_tuple_mapper< Result(&)(Par1, Par2, Par3, Par4), const Arg2, const Arg3, const Arg4, const Arg5 >::type > ( typename detail::bind_tuple_mapper< Result(&)(Par1, Par2, Par3, Par4), const Arg2, const Arg3, const Arg4, const Arg5 >::type (a1, a2, a3, a4, a5) ); } template inline const lambda_functor< lambda_functor_base< action<5, function_action<5> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5 >::type > > bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5) { return lambda_functor_base< action<5, function_action<5> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5 >::type > ( typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5 >::type (a1, a2, a3, a4, a5) ); } template inline const lambda_functor< lambda_functor_base< action<5, function_action<5, Result> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5 >::type > > bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5) { return lambda_functor_base< action<5, function_action<5, Result> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5 >::type > ( typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5 >::type (a1, a2, a3, a4, a5) ); } # 853 "/usr/include/boost/lambda/detail/bind_functions.hpp" 3 4 template inline const lambda_functor< lambda_functor_base< action<6, function_action<6, Result> >, typename detail::bind_tuple_mapper< Result(&)(Par1, Par2, Par3, Par4, Par5), const Arg2, const Arg3, const Arg4, const Arg5, const Arg6 >::type > > bind(Result(&a1)(Par1, Par2, Par3, Par4, Par5), const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5, const Arg6& a6) { return lambda_functor_base< action<6, function_action<6, Result> >, typename detail::bind_tuple_mapper< Result(&)(Par1, Par2, Par3, Par4, Par5), const Arg2, const Arg3, const Arg4, const Arg5, const Arg6 >::type > ( typename detail::bind_tuple_mapper< Result(&)(Par1, Par2, Par3, Par4, Par5), const Arg2, const Arg3, const Arg4, const Arg5, const Arg6 >::type (a1, a2, a3, a4, a5, a6) ); } template inline const lambda_functor< lambda_functor_base< action<6, function_action<6> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6 >::type > > bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5, const Arg6& a6) { return lambda_functor_base< action<6, function_action<6> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6 >::type > ( typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6 >::type (a1, a2, a3, a4, a5, a6) ); } template inline const lambda_functor< lambda_functor_base< action<6, function_action<6, Result> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6 >::type > > bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5, const Arg6& a6) { return lambda_functor_base< action<6, function_action<6, Result> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6 >::type > ( typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6 >::type (a1, a2, a3, a4, a5, a6) ); } # 1044 "/usr/include/boost/lambda/detail/bind_functions.hpp" 3 4 template inline const lambda_functor< lambda_functor_base< action<7, function_action<7, Result> >, typename detail::bind_tuple_mapper< Result(&)(Par1, Par2, Par3, Par4, Par5, Par6), const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7 >::type > > bind(Result(&a1)(Par1, Par2, Par3, Par4, Par5, Par6), const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5, const Arg6& a6, const Arg7& a7) { return lambda_functor_base< action<7, function_action<7, Result> >, typename detail::bind_tuple_mapper< Result(&)(Par1, Par2, Par3, Par4, Par5, Par6), const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7 >::type > ( typename detail::bind_tuple_mapper< Result(&)(Par1, Par2, Par3, Par4, Par5, Par6), const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7 >::type (a1, a2, a3, a4, a5, a6, a7) ); } template inline const lambda_functor< lambda_functor_base< action<7, function_action<7> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7 >::type > > bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5, const Arg6& a6, const Arg7& a7) { return lambda_functor_base< action<7, function_action<7> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7 >::type > ( typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7 >::type (a1, a2, a3, a4, a5, a6, a7) ); } template inline const lambda_functor< lambda_functor_base< action<7, function_action<7, Result> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7 >::type > > bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5, const Arg6& a6, const Arg7& a7) { return lambda_functor_base< action<7, function_action<7, Result> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7 >::type > ( typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7 >::type (a1, a2, a3, a4, a5, a6, a7) ); } # 1243 "/usr/include/boost/lambda/detail/bind_functions.hpp" 3 4 template inline const lambda_functor< lambda_functor_base< action<8, function_action<8, Result> >, typename detail::bind_tuple_mapper< Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7), const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8 >::type > > bind(Result(&a1)(Par1, Par2, Par3, Par4, Par5, Par6, Par7), const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8) { return lambda_functor_base< action<8, function_action<8, Result> >, typename detail::bind_tuple_mapper< Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7), const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8 >::type > ( typename detail::bind_tuple_mapper< Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7), const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8 >::type (a1, a2, a3, a4, a5, a6, a7, a8) ); } template inline const lambda_functor< lambda_functor_base< action<8, function_action<8> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8 >::type > > bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8) { return lambda_functor_base< action<8, function_action<8> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8 >::type > ( typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8 >::type (a1, a2, a3, a4, a5, a6, a7, a8) ); } template inline const lambda_functor< lambda_functor_base< action<8, function_action<8, Result> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8 >::type > > bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8) { return lambda_functor_base< action<8, function_action<8, Result> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8 >::type > ( typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8 >::type (a1, a2, a3, a4, a5, a6, a7, a8) ); } # 1442 "/usr/include/boost/lambda/detail/bind_functions.hpp" 3 4 template inline const lambda_functor< lambda_functor_base< action<9, function_action<9, Result> >, typename detail::bind_tuple_mapper< Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8), const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8, const Arg9 >::type > > bind(Result(&a1)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8), const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8, const Arg9& a9) { return lambda_functor_base< action<9, function_action<9, Result> >, typename detail::bind_tuple_mapper< Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8), const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8, const Arg9 >::type > ( typename detail::bind_tuple_mapper< Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8), const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8, const Arg9 >::type (a1, a2, a3, a4, a5, a6, a7, a8, a9) ); } template inline const lambda_functor< lambda_functor_base< action<9, function_action<9> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8, const Arg9 >::type > > bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8, const Arg9& a9) { return lambda_functor_base< action<9, function_action<9> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8, const Arg9 >::type > ( typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8, const Arg9 >::type (a1, a2, a3, a4, a5, a6, a7, a8, a9) ); } template inline const lambda_functor< lambda_functor_base< action<9, function_action<9, Result> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8, const Arg9 >::type > > bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8, const Arg9& a9) { return lambda_functor_base< action<9, function_action<9, Result> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8, const Arg9 >::type > ( typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8, const Arg9 >::type (a1, a2, a3, a4, a5, a6, a7, a8, a9) ); } # 1657 "/usr/include/boost/lambda/detail/bind_functions.hpp" 3 4 template inline const lambda_functor< lambda_functor_base< action<10, function_action<10, Result> >, typename detail::bind_tuple_mapper< Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8, Par9), const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8, const Arg9, const Arg10 >::type > > bind(Result(&a1)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8, Par9), const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8, const Arg9& a9, const Arg10& a10) { return lambda_functor_base< action<10, function_action<10, Result> >, typename detail::bind_tuple_mapper< Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8, Par9), const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8, const Arg9, const Arg10 >::type > ( typename detail::bind_tuple_mapper< Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8, Par9), const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8, const Arg9, const Arg10 >::type (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) ); } template inline const lambda_functor< lambda_functor_base< action<10, function_action<10> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8, const Arg9, const Arg10 >::type > > bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8, const Arg9& a9, const Arg10& a10) { return lambda_functor_base< action<10, function_action<10> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8, const Arg9, const Arg10 >::type > ( typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8, const Arg9, const Arg10 >::type (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) ); } template inline const lambda_functor< lambda_functor_base< action<10, function_action<10, Result> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8, const Arg9, const Arg10 >::type > > bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8, const Arg9& a9, const Arg10& a10) { return lambda_functor_base< action<10, function_action<10, Result> >, typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8, const Arg9, const Arg10 >::type > ( typename detail::bind_tuple_mapper< const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8, const Arg9, const Arg10 >::type (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) ); } # 1876 "/usr/include/boost/lambda/detail/bind_functions.hpp" 3 4 } } # 18 "/usr/include/boost/lambda/bind.hpp" 2 3 4 # 29 "anneal.h" 2 # 1 "/usr/include/boost/lambda/construct.hpp" 1 3 4 # 17 "/usr/include/boost/lambda/construct.hpp" 3 4 namespace boost { namespace lambda { template struct constructor { template struct sig { typedef T type; }; T operator()() const { return T(); } template T operator()(A1& a1) const { return T(a1); } template T operator()(A1& a1, A2& a2) const { return T(a1, a2); } template T operator()(A1& a1, A2& a2, A3& a3) const { return T(a1, a2, a3); } template T operator()(A1& a1, A2& a2, A3& a3, A4& a4) const { return T(a1, a2, a3, a4); } template T operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) const { return T(a1, a2, a3, a4, a5); } template T operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) const { return T(a1, a2, a3, a4, a5, a6); } template T operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) const { return T(a1, a2, a3, a4, a5, a6, a7); } template T operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) const { return T(a1, a2, a3, a4, a5, a6, a7, a8); } template T operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8, A9& a9) const { return T(a1, a2, a3, a4, a5, a6, a7, a8, a9); } template T operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8, A9& a9, A10& a10) const { return T(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); } }; namespace detail { template struct destructor_helper { template static void exec(A1& a1) { typedef typename boost::remove_cv::type plainA1; a1.~plainA1(); } }; template <> struct destructor_helper { template static void exec(A1* a1) { typedef typename boost::remove_cv::type plainA1; (*a1).~plainA1(); } }; } struct destructor { template struct sig { typedef void type; }; template void operator()(A1& a1) const { typedef typename boost::remove_cv::type plainA1; detail::destructor_helper::value>::exec(a1); } }; template struct new_ptr { template struct sig { typedef T* type; }; T* operator()() const { return new T(); } template T* operator()(A1& a1) const { return new T(a1); } template T* operator()(A1& a1, A2& a2) const { return new T(a1, a2); } template T* operator()(A1& a1, A2& a2, A3& a3) const { return new T(a1, a2, a3); } template T* operator()(A1& a1, A2& a2, A3& a3, A4& a4) const { return new T(a1, a2, a3, a4); } template T* operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) const { return new T(a1, a2, a3, a4, a5); } template T* operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) const { return new T(a1, a2, a3, a4, a5, a6); } template T* operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) const { return new T(a1, a2, a3, a4, a5, a6, a7); } template T* operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) const { return new T(a1, a2, a3, a4, a5, a6, a7, a8); } template T* operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8, A9& a9) const { return new T(a1, a2, a3, a4, a5, a6, a7, a8, a9); } template T* operator()(A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8, A9& a9, A10& a10) const { return new T(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); } }; struct delete_ptr { template struct sig { typedef void type; }; template void operator()(A1& a1) const { delete a1; } }; template struct new_array { template struct sig { typedef T* type; }; T* operator()(int size) const { return new T[size]; } }; struct delete_array { template struct sig { typedef void type; }; template void operator()(A1& a1) const { delete[] a1; } }; } } # 30 "anneal.h" 2 # 45 "anneal.h" # 1 "gpu.h" 1 # 24 "gpu.h" # 1 "../config.h" 1 # 25 "gpu.h" 2 # 1 "/usr/include/GL/glew.h" 1 3 4 # 180 "/usr/include/GL/glew.h" 3 4 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/stddef.h" 1 3 4 # 181 "/usr/include/GL/glew.h" 2 3 4 # 197 "/usr/include/GL/glew.h" 3 4 extern "C" { # 212 "/usr/include/GL/glew.h" 3 4 typedef unsigned int GLenum; typedef unsigned int GLbitfield; typedef unsigned int GLuint; typedef int GLint; typedef int GLsizei; typedef unsigned char GLboolean; typedef signed char GLbyte; typedef short GLshort; typedef unsigned char GLubyte; typedef unsigned short GLushort; typedef float GLfloat; typedef float GLclampf; typedef double GLdouble; typedef double GLclampd; typedef void GLvoid; # 237 "/usr/include/GL/glew.h" 3 4 typedef signed long long GLint64EXT; typedef unsigned long long GLuint64EXT; # 776 "/usr/include/GL/glew.h" 3 4 extern void glAccum (GLenum op, GLfloat value); extern void glAlphaFunc (GLenum func, GLclampf ref); extern GLboolean glAreTexturesResident (GLsizei n, const GLuint *textures, GLboolean *residences); extern void glArrayElement (GLint i); extern void glBegin (GLenum mode); extern void glBindTexture (GLenum target, GLuint texture); extern void glBitmap (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap); extern void glBlendFunc (GLenum sfactor, GLenum dfactor); extern void glCallList (GLuint list); extern void glCallLists (GLsizei n, GLenum type, const GLvoid *lists); extern void glClear (GLbitfield mask); extern void glClearAccum (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); extern void glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); extern void glClearDepth (GLclampd depth); extern void glClearIndex (GLfloat c); extern void glClearStencil (GLint s); extern void glClipPlane (GLenum plane, const GLdouble *equation); extern void glColor3b (GLbyte red, GLbyte green, GLbyte blue); extern void glColor3bv (const GLbyte *v); extern void glColor3d (GLdouble red, GLdouble green, GLdouble blue); extern void glColor3dv (const GLdouble *v); extern void glColor3f (GLfloat red, GLfloat green, GLfloat blue); extern void glColor3fv (const GLfloat *v); extern void glColor3i (GLint red, GLint green, GLint blue); extern void glColor3iv (const GLint *v); extern void glColor3s (GLshort red, GLshort green, GLshort blue); extern void glColor3sv (const GLshort *v); extern void glColor3ub (GLubyte red, GLubyte green, GLubyte blue); extern void glColor3ubv (const GLubyte *v); extern void glColor3ui (GLuint red, GLuint green, GLuint blue); extern void glColor3uiv (const GLuint *v); extern void glColor3us (GLushort red, GLushort green, GLushort blue); extern void glColor3usv (const GLushort *v); extern void glColor4b (GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); extern void glColor4bv (const GLbyte *v); extern void glColor4d (GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); extern void glColor4dv (const GLdouble *v); extern void glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); extern void glColor4fv (const GLfloat *v); extern void glColor4i (GLint red, GLint green, GLint blue, GLint alpha); extern void glColor4iv (const GLint *v); extern void glColor4s (GLshort red, GLshort green, GLshort blue, GLshort alpha); extern void glColor4sv (const GLshort *v); extern void glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); extern void glColor4ubv (const GLubyte *v); extern void glColor4ui (GLuint red, GLuint green, GLuint blue, GLuint alpha); extern void glColor4uiv (const GLuint *v); extern void glColor4us (GLushort red, GLushort green, GLushort blue, GLushort alpha); extern void glColor4usv (const GLushort *v); extern void glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); extern void glColorMaterial (GLenum face, GLenum mode); extern void glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); extern void glCopyPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); extern void glCopyTexImage1D (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border); extern void glCopyTexImage2D (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); extern void glCopyTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); extern void glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); extern void glCullFace (GLenum mode); extern void glDeleteLists (GLuint list, GLsizei range); extern void glDeleteTextures (GLsizei n, const GLuint *textures); extern void glDepthFunc (GLenum func); extern void glDepthMask (GLboolean flag); extern void glDepthRange (GLclampd zNear, GLclampd zFar); extern void glDisable (GLenum cap); extern void glDisableClientState (GLenum array); extern void glDrawArrays (GLenum mode, GLint first, GLsizei count); extern void glDrawBuffer (GLenum mode); extern void glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices); extern void glDrawPixels (GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); extern void glEdgeFlag (GLboolean flag); extern void glEdgeFlagPointer (GLsizei stride, const GLvoid *pointer); extern void glEdgeFlagv (const GLboolean *flag); extern void glEnable (GLenum cap); extern void glEnableClientState (GLenum array); extern void glEnd (void); extern void glEndList (void); extern void glEvalCoord1d (GLdouble u); extern void glEvalCoord1dv (const GLdouble *u); extern void glEvalCoord1f (GLfloat u); extern void glEvalCoord1fv (const GLfloat *u); extern void glEvalCoord2d (GLdouble u, GLdouble v); extern void glEvalCoord2dv (const GLdouble *u); extern void glEvalCoord2f (GLfloat u, GLfloat v); extern void glEvalCoord2fv (const GLfloat *u); extern void glEvalMesh1 (GLenum mode, GLint i1, GLint i2); extern void glEvalMesh2 (GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); extern void glEvalPoint1 (GLint i); extern void glEvalPoint2 (GLint i, GLint j); extern void glFeedbackBuffer (GLsizei size, GLenum type, GLfloat *buffer); extern void glFinish (void); extern void glFlush (void); extern void glFogf (GLenum pname, GLfloat param); extern void glFogfv (GLenum pname, const GLfloat *params); extern void glFogi (GLenum pname, GLint param); extern void glFogiv (GLenum pname, const GLint *params); extern void glFrontFace (GLenum mode); extern void glFrustum (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); extern GLuint glGenLists (GLsizei range); extern void glGenTextures (GLsizei n, GLuint *textures); extern void glGetBooleanv (GLenum pname, GLboolean *params); extern void glGetClipPlane (GLenum plane, GLdouble *equation); extern void glGetDoublev (GLenum pname, GLdouble *params); extern GLenum glGetError (void); extern void glGetFloatv (GLenum pname, GLfloat *params); extern void glGetIntegerv (GLenum pname, GLint *params); extern void glGetLightfv (GLenum light, GLenum pname, GLfloat *params); extern void glGetLightiv (GLenum light, GLenum pname, GLint *params); extern void glGetMapdv (GLenum target, GLenum query, GLdouble *v); extern void glGetMapfv (GLenum target, GLenum query, GLfloat *v); extern void glGetMapiv (GLenum target, GLenum query, GLint *v); extern void glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params); extern void glGetMaterialiv (GLenum face, GLenum pname, GLint *params); extern void glGetPixelMapfv (GLenum map, GLfloat *values); extern void glGetPixelMapuiv (GLenum map, GLuint *values); extern void glGetPixelMapusv (GLenum map, GLushort *values); extern void glGetPointerv (GLenum pname, GLvoid* *params); extern void glGetPolygonStipple (GLubyte *mask); extern const GLubyte * glGetString (GLenum name); extern void glGetTexEnvfv (GLenum target, GLenum pname, GLfloat *params); extern void glGetTexEnviv (GLenum target, GLenum pname, GLint *params); extern void glGetTexGendv (GLenum coord, GLenum pname, GLdouble *params); extern void glGetTexGenfv (GLenum coord, GLenum pname, GLfloat *params); extern void glGetTexGeniv (GLenum coord, GLenum pname, GLint *params); extern void glGetTexImage (GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); extern void glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params); extern void glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params); extern void glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); extern void glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); extern void glHint (GLenum target, GLenum mode); extern void glIndexMask (GLuint mask); extern void glIndexPointer (GLenum type, GLsizei stride, const GLvoid *pointer); extern void glIndexd (GLdouble c); extern void glIndexdv (const GLdouble *c); extern void glIndexf (GLfloat c); extern void glIndexfv (const GLfloat *c); extern void glIndexi (GLint c); extern void glIndexiv (const GLint *c); extern void glIndexs (GLshort c); extern void glIndexsv (const GLshort *c); extern void glIndexub (GLubyte c); extern void glIndexubv (const GLubyte *c); extern void glInitNames (void); extern void glInterleavedArrays (GLenum format, GLsizei stride, const GLvoid *pointer); extern GLboolean glIsEnabled (GLenum cap); extern GLboolean glIsList (GLuint list); extern GLboolean glIsTexture (GLuint texture); extern void glLightModelf (GLenum pname, GLfloat param); extern void glLightModelfv (GLenum pname, const GLfloat *params); extern void glLightModeli (GLenum pname, GLint param); extern void glLightModeliv (GLenum pname, const GLint *params); extern void glLightf (GLenum light, GLenum pname, GLfloat param); extern void glLightfv (GLenum light, GLenum pname, const GLfloat *params); extern void glLighti (GLenum light, GLenum pname, GLint param); extern void glLightiv (GLenum light, GLenum pname, const GLint *params); extern void glLineStipple (GLint factor, GLushort pattern); extern void glLineWidth (GLfloat width); extern void glListBase (GLuint base); extern void glLoadIdentity (void); extern void glLoadMatrixd (const GLdouble *m); extern void glLoadMatrixf (const GLfloat *m); extern void glLoadName (GLuint name); extern void glLogicOp (GLenum opcode); extern void glMap1d (GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); extern void glMap1f (GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); extern void glMap2d (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); extern void glMap2f (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); extern void glMapGrid1d (GLint un, GLdouble u1, GLdouble u2); extern void glMapGrid1f (GLint un, GLfloat u1, GLfloat u2); extern void glMapGrid2d (GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); extern void glMapGrid2f (GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); extern void glMaterialf (GLenum face, GLenum pname, GLfloat param); extern void glMaterialfv (GLenum face, GLenum pname, const GLfloat *params); extern void glMateriali (GLenum face, GLenum pname, GLint param); extern void glMaterialiv (GLenum face, GLenum pname, const GLint *params); extern void glMatrixMode (GLenum mode); extern void glMultMatrixd (const GLdouble *m); extern void glMultMatrixf (const GLfloat *m); extern void glNewList (GLuint list, GLenum mode); extern void glNormal3b (GLbyte nx, GLbyte ny, GLbyte nz); extern void glNormal3bv (const GLbyte *v); extern void glNormal3d (GLdouble nx, GLdouble ny, GLdouble nz); extern void glNormal3dv (const GLdouble *v); extern void glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz); extern void glNormal3fv (const GLfloat *v); extern void glNormal3i (GLint nx, GLint ny, GLint nz); extern void glNormal3iv (const GLint *v); extern void glNormal3s (GLshort nx, GLshort ny, GLshort nz); extern void glNormal3sv (const GLshort *v); extern void glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer); extern void glOrtho (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); extern void glPassThrough (GLfloat token); extern void glPixelMapfv (GLenum map, GLsizei mapsize, const GLfloat *values); extern void glPixelMapuiv (GLenum map, GLsizei mapsize, const GLuint *values); extern void glPixelMapusv (GLenum map, GLsizei mapsize, const GLushort *values); extern void glPixelStoref (GLenum pname, GLfloat param); extern void glPixelStorei (GLenum pname, GLint param); extern void glPixelTransferf (GLenum pname, GLfloat param); extern void glPixelTransferi (GLenum pname, GLint param); extern void glPixelZoom (GLfloat xfactor, GLfloat yfactor); extern void glPointSize (GLfloat size); extern void glPolygonMode (GLenum face, GLenum mode); extern void glPolygonOffset (GLfloat factor, GLfloat units); extern void glPolygonStipple (const GLubyte *mask); extern void glPopAttrib (void); extern void glPopClientAttrib (void); extern void glPopMatrix (void); extern void glPopName (void); extern void glPrioritizeTextures (GLsizei n, const GLuint *textures, const GLclampf *priorities); extern void glPushAttrib (GLbitfield mask); extern void glPushClientAttrib (GLbitfield mask); extern void glPushMatrix (void); extern void glPushName (GLuint name); extern void glRasterPos2d (GLdouble x, GLdouble y); extern void glRasterPos2dv (const GLdouble *v); extern void glRasterPos2f (GLfloat x, GLfloat y); extern void glRasterPos2fv (const GLfloat *v); extern void glRasterPos2i (GLint x, GLint y); extern void glRasterPos2iv (const GLint *v); extern void glRasterPos2s (GLshort x, GLshort y); extern void glRasterPos2sv (const GLshort *v); extern void glRasterPos3d (GLdouble x, GLdouble y, GLdouble z); extern void glRasterPos3dv (const GLdouble *v); extern void glRasterPos3f (GLfloat x, GLfloat y, GLfloat z); extern void glRasterPos3fv (const GLfloat *v); extern void glRasterPos3i (GLint x, GLint y, GLint z); extern void glRasterPos3iv (const GLint *v); extern void glRasterPos3s (GLshort x, GLshort y, GLshort z); extern void glRasterPos3sv (const GLshort *v); extern void glRasterPos4d (GLdouble x, GLdouble y, GLdouble z, GLdouble w); extern void glRasterPos4dv (const GLdouble *v); extern void glRasterPos4f (GLfloat x, GLfloat y, GLfloat z, GLfloat w); extern void glRasterPos4fv (const GLfloat *v); extern void glRasterPos4i (GLint x, GLint y, GLint z, GLint w); extern void glRasterPos4iv (const GLint *v); extern void glRasterPos4s (GLshort x, GLshort y, GLshort z, GLshort w); extern void glRasterPos4sv (const GLshort *v); extern void glReadBuffer (GLenum mode); extern void glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); extern void glRectd (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); extern void glRectdv (const GLdouble *v1, const GLdouble *v2); extern void glRectf (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); extern void glRectfv (const GLfloat *v1, const GLfloat *v2); extern void glRecti (GLint x1, GLint y1, GLint x2, GLint y2); extern void glRectiv (const GLint *v1, const GLint *v2); extern void glRects (GLshort x1, GLshort y1, GLshort x2, GLshort y2); extern void glRectsv (const GLshort *v1, const GLshort *v2); extern GLint glRenderMode (GLenum mode); extern void glRotated (GLdouble angle, GLdouble x, GLdouble y, GLdouble z); extern void glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z); extern void glScaled (GLdouble x, GLdouble y, GLdouble z); extern void glScalef (GLfloat x, GLfloat y, GLfloat z); extern void glScissor (GLint x, GLint y, GLsizei width, GLsizei height); extern void glSelectBuffer (GLsizei size, GLuint *buffer); extern void glShadeModel (GLenum mode); extern void glStencilFunc (GLenum func, GLint ref, GLuint mask); extern void glStencilMask (GLuint mask); extern void glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); extern void glTexCoord1d (GLdouble s); extern void glTexCoord1dv (const GLdouble *v); extern void glTexCoord1f (GLfloat s); extern void glTexCoord1fv (const GLfloat *v); extern void glTexCoord1i (GLint s); extern void glTexCoord1iv (const GLint *v); extern void glTexCoord1s (GLshort s); extern void glTexCoord1sv (const GLshort *v); extern void glTexCoord2d (GLdouble s, GLdouble t); extern void glTexCoord2dv (const GLdouble *v); extern void glTexCoord2f (GLfloat s, GLfloat t); extern void glTexCoord2fv (const GLfloat *v); extern void glTexCoord2i (GLint s, GLint t); extern void glTexCoord2iv (const GLint *v); extern void glTexCoord2s (GLshort s, GLshort t); extern void glTexCoord2sv (const GLshort *v); extern void glTexCoord3d (GLdouble s, GLdouble t, GLdouble r); extern void glTexCoord3dv (const GLdouble *v); extern void glTexCoord3f (GLfloat s, GLfloat t, GLfloat r); extern void glTexCoord3fv (const GLfloat *v); extern void glTexCoord3i (GLint s, GLint t, GLint r); extern void glTexCoord3iv (const GLint *v); extern void glTexCoord3s (GLshort s, GLshort t, GLshort r); extern void glTexCoord3sv (const GLshort *v); extern void glTexCoord4d (GLdouble s, GLdouble t, GLdouble r, GLdouble q); extern void glTexCoord4dv (const GLdouble *v); extern void glTexCoord4f (GLfloat s, GLfloat t, GLfloat r, GLfloat q); extern void glTexCoord4fv (const GLfloat *v); extern void glTexCoord4i (GLint s, GLint t, GLint r, GLint q); extern void glTexCoord4iv (const GLint *v); extern void glTexCoord4s (GLshort s, GLshort t, GLshort r, GLshort q); extern void glTexCoord4sv (const GLshort *v); extern void glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); extern void glTexEnvf (GLenum target, GLenum pname, GLfloat param); extern void glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params); extern void glTexEnvi (GLenum target, GLenum pname, GLint param); extern void glTexEnviv (GLenum target, GLenum pname, const GLint *params); extern void glTexGend (GLenum coord, GLenum pname, GLdouble param); extern void glTexGendv (GLenum coord, GLenum pname, const GLdouble *params); extern void glTexGenf (GLenum coord, GLenum pname, GLfloat param); extern void glTexGenfv (GLenum coord, GLenum pname, const GLfloat *params); extern void glTexGeni (GLenum coord, GLenum pname, GLint param); extern void glTexGeniv (GLenum coord, GLenum pname, const GLint *params); extern void glTexImage1D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); extern void glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); extern void glTexParameterf (GLenum target, GLenum pname, GLfloat param); extern void glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); extern void glTexParameteri (GLenum target, GLenum pname, GLint param); extern void glTexParameteriv (GLenum target, GLenum pname, const GLint *params); extern void glTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); extern void glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); extern void glTranslated (GLdouble x, GLdouble y, GLdouble z); extern void glTranslatef (GLfloat x, GLfloat y, GLfloat z); extern void glVertex2d (GLdouble x, GLdouble y); extern void glVertex2dv (const GLdouble *v); extern void glVertex2f (GLfloat x, GLfloat y); extern void glVertex2fv (const GLfloat *v); extern void glVertex2i (GLint x, GLint y); extern void glVertex2iv (const GLint *v); extern void glVertex2s (GLshort x, GLshort y); extern void glVertex2sv (const GLshort *v); extern void glVertex3d (GLdouble x, GLdouble y, GLdouble z); extern void glVertex3dv (const GLdouble *v); extern void glVertex3f (GLfloat x, GLfloat y, GLfloat z); extern void glVertex3fv (const GLfloat *v); extern void glVertex3i (GLint x, GLint y, GLint z); extern void glVertex3iv (const GLint *v); extern void glVertex3s (GLshort x, GLshort y, GLshort z); extern void glVertex3sv (const GLshort *v); extern void glVertex4d (GLdouble x, GLdouble y, GLdouble z, GLdouble w); extern void glVertex4dv (const GLdouble *v); extern void glVertex4f (GLfloat x, GLfloat y, GLfloat z, GLfloat w); extern void glVertex4fv (const GLfloat *v); extern void glVertex4i (GLint x, GLint y, GLint z, GLint w); extern void glVertex4iv (const GLint *v); extern void glVertex4s (GLshort x, GLshort y, GLshort z, GLshort w); extern void glVertex4sv (const GLshort *v); extern void glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); extern void glViewport (GLint x, GLint y, GLsizei width, GLsizei height); # 1123 "/usr/include/GL/glew.h" 3 4 # 1 "/usr/include/GL/glu.h" 1 3 4 # 37 "/usr/include/GL/glu.h" 3 4 # 1 "/usr/include/GL/gl.h" 1 3 4 # 38 "/usr/include/GL/glu.h" 2 3 4 # 65 "/usr/include/GL/glu.h" 3 4 extern "C" { # 270 "/usr/include/GL/glu.h" 3 4 class GLUnurbs; class GLUquadric; class GLUtesselator; typedef GLUnurbs GLUnurbsObj; typedef GLUquadric GLUquadricObj; typedef GLUtesselator GLUtesselatorObj; typedef GLUtesselator GLUtriangulatorObj; typedef void ( * _GLUfuncptr)(); extern void gluBeginCurve (GLUnurbs* nurb); extern void gluBeginPolygon (GLUtesselator* tess); extern void gluBeginSurface (GLUnurbs* nurb); extern void gluBeginTrim (GLUnurbs* nurb); extern GLint gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data); extern GLint gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data); extern GLint gluBuild2DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data); extern GLint gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data); extern GLint gluBuild3DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data); extern GLint gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data); extern GLboolean gluCheckExtension (const GLubyte *extName, const GLubyte *extString); extern void gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks); extern void gluDeleteNurbsRenderer (GLUnurbs* nurb); extern void gluDeleteQuadric (GLUquadric* quad); extern void gluDeleteTess (GLUtesselator* tess); extern void gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops); extern void gluEndCurve (GLUnurbs* nurb); extern void gluEndPolygon (GLUtesselator* tess); extern void gluEndSurface (GLUnurbs* nurb); extern void gluEndTrim (GLUnurbs* nurb); extern const GLubyte * gluErrorString (GLenum error); extern void gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data); extern const GLubyte * gluGetString (GLenum name); extern void gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data); extern void gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view); extern void gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ); extern GLUnurbs* gluNewNurbsRenderer (void); extern GLUquadric* gluNewQuadric (void); extern GLUtesselator* gluNewTess (void); extern void gluNextContour (GLUtesselator* tess, GLenum type); extern void gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc); extern void gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData); extern void gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData); extern void gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type); extern void gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value); extern void gluNurbsSurface (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type); extern void gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top); extern void gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep); extern void gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar); extern void gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport); extern GLint gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ); extern void gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type); extern void gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc); extern void gluQuadricDrawStyle (GLUquadric* quad, GLenum draw); extern void gluQuadricNormals (GLUquadric* quad, GLenum normal); extern void gluQuadricOrientation (GLUquadric* quad, GLenum orientation); extern void gluQuadricTexture (GLUquadric* quad, GLboolean texture); extern GLint gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut); extern void gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks); extern void gluTessBeginContour (GLUtesselator* tess); extern void gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data); extern void gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc); extern void gluTessEndContour (GLUtesselator* tess); extern void gluTessEndPolygon (GLUtesselator* tess); extern void gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ); extern void gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data); extern void gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data); extern GLint gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ); extern GLint gluUnProject4 (GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble nearVal, GLdouble farVal, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW); } # 1124 "/usr/include/GL/glew.h" 2 3 4 # 1173 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); typedef void ( * PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); typedef void ( * PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); typedef void ( * PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); # 1289 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLACTIVETEXTUREPROC) (GLenum texture); typedef void ( * PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); typedef void ( * PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); typedef void ( * PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); typedef void ( * PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); typedef void ( * PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint lod, GLvoid *img); typedef void ( * PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble m[16]); typedef void ( * PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat m[16]); typedef void ( * PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble m[16]); typedef void ( * PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat m[16]); typedef void ( * PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s); typedef void ( * PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v); typedef void ( * PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s); typedef void ( * PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v); typedef void ( * PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s); typedef void ( * PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v); typedef void ( * PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s); typedef void ( * PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v); typedef void ( * PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t); typedef void ( * PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v); typedef void ( * PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); typedef void ( * PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v); typedef void ( * PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t); typedef void ( * PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v); typedef void ( * PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t); typedef void ( * PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v); typedef void ( * PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); typedef void ( * PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v); typedef void ( * PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); typedef void ( * PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v); typedef void ( * PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r); typedef void ( * PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v); typedef void ( * PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r); typedef void ( * PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v); typedef void ( * PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); typedef void ( * PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v); typedef void ( * PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); typedef void ( * PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v); typedef void ( * PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); typedef void ( * PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v); typedef void ( * PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); typedef void ( * PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v); typedef void ( * PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert); # 1432 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); typedef void ( * PFNGLBLENDEQUATIONPROC) (GLenum mode); typedef void ( * PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); typedef void ( * PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); typedef void ( * PFNGLFOGCOORDDPROC) (GLdouble coord); typedef void ( * PFNGLFOGCOORDDVPROC) (const GLdouble *coord); typedef void ( * PFNGLFOGCOORDFPROC) (GLfloat coord); typedef void ( * PFNGLFOGCOORDFVPROC) (const GLfloat *coord); typedef void ( * PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); typedef void ( * PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount); typedef void ( * PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param); typedef void ( * PFNGLPOINTPARAMETERFVPROC) (GLenum pname, GLfloat *params); typedef void ( * PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue); typedef void ( * PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v); typedef void ( * PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue); typedef void ( * PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v); typedef void ( * PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue); typedef void ( * PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v); typedef void ( * PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue); typedef void ( * PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v); typedef void ( * PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue); typedef void ( * PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v); typedef void ( * PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue); typedef void ( * PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v); typedef void ( * PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue); typedef void ( * PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v); typedef void ( * PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue); typedef void ( * PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v); typedef void ( * PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, GLvoid *pointer); typedef void ( * PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y); typedef void ( * PFNGLWINDOWPOS2DVPROC) (const GLdouble *p); typedef void ( * PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y); typedef void ( * PFNGLWINDOWPOS2FVPROC) (const GLfloat *p); typedef void ( * PFNGLWINDOWPOS2IPROC) (GLint x, GLint y); typedef void ( * PFNGLWINDOWPOS2IVPROC) (const GLint *p); typedef void ( * PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y); typedef void ( * PFNGLWINDOWPOS2SVPROC) (const GLshort *p); typedef void ( * PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z); typedef void ( * PFNGLWINDOWPOS3DVPROC) (const GLdouble *p); typedef void ( * PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z); typedef void ( * PFNGLWINDOWPOS3FVPROC) (const GLfloat *p); typedef void ( * PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z); typedef void ( * PFNGLWINDOWPOS3IVPROC) (const GLint *p); typedef void ( * PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z); typedef void ( * PFNGLWINDOWPOS3SVPROC) (const GLshort *p); # 1584 "/usr/include/GL/glew.h" 3 4 typedef ptrdiff_t GLsizeiptr; typedef ptrdiff_t GLintptr; typedef void ( * PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); typedef void ( * PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); typedef void ( * PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage); typedef void ( * PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data); typedef void ( * PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint* buffers); typedef void ( * PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint* ids); typedef void ( * PFNGLENDQUERYPROC) (GLenum target); typedef void ( * PFNGLGENBUFFERSPROC) (GLsizei n, GLuint* buffers); typedef void ( * PFNGLGENQUERIESPROC) (GLsizei n, GLuint* ids); typedef void ( * PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint* params); typedef void ( * PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid** params); typedef void ( * PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid* data); typedef void ( * PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint* params); typedef void ( * PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint* params); typedef void ( * PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint* params); typedef GLboolean ( * PFNGLISBUFFERPROC) (GLuint buffer); typedef GLboolean ( * PFNGLISQUERYPROC) (GLuint id); typedef GLvoid* ( * PFNGLMAPBUFFERPROC) (GLenum target, GLenum access); typedef GLboolean ( * PFNGLUNMAPBUFFERPROC) (GLenum target); # 1721 "/usr/include/GL/glew.h" 3 4 typedef char GLchar; typedef void ( * PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); typedef void ( * PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar* name); typedef void ( * PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum, GLenum); typedef void ( * PFNGLCOMPILESHADERPROC) (GLuint shader); typedef GLuint ( * PFNGLCREATEPROGRAMPROC) (void); typedef GLuint ( * PFNGLCREATESHADERPROC) (GLenum type); typedef void ( * PFNGLDELETEPROGRAMPROC) (GLuint program); typedef void ( * PFNGLDELETESHADERPROC) (GLuint shader); typedef void ( * PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); typedef void ( * PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint); typedef void ( * PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum* bufs); typedef void ( * PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint); typedef void ( * PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei maxLength, GLsizei* length, GLint* size, GLenum* type, GLchar* name); typedef void ( * PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei maxLength, GLsizei* length, GLint* size, GLenum* type, GLchar* name); typedef void ( * PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei* count, GLuint* shaders); typedef GLint ( * PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar* name); typedef void ( * PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei* length, GLchar* infoLog); typedef void ( * PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint* param); typedef void ( * PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei* length, GLchar* infoLog); typedef void ( * PFNGLGETSHADERSOURCEPROC) (GLint obj, GLsizei maxLength, GLsizei* length, GLchar* source); typedef void ( * PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint* param); typedef GLint ( * PFNGLGETUNIFORMLOCATIONPROC) (GLint programObj, const GLchar* name); typedef void ( * PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat* params); typedef void ( * PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint* params); typedef void ( * PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint, GLenum, GLvoid*); typedef void ( * PFNGLGETVERTEXATTRIBDVPROC) (GLuint, GLenum, GLdouble*); typedef void ( * PFNGLGETVERTEXATTRIBFVPROC) (GLuint, GLenum, GLfloat*); typedef void ( * PFNGLGETVERTEXATTRIBIVPROC) (GLuint, GLenum, GLint*); typedef GLboolean ( * PFNGLISPROGRAMPROC) (GLuint program); typedef GLboolean ( * PFNGLISSHADERPROC) (GLuint shader); typedef void ( * PFNGLLINKPROGRAMPROC) (GLuint program); typedef void ( * PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar** strings, const GLint* lengths); typedef void ( * PFNGLSTENCILFUNCSEPARATEPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); typedef void ( * PFNGLSTENCILMASKSEPARATEPROC) (GLenum, GLuint); typedef void ( * PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); typedef void ( * PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); typedef void ( * PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat* value); typedef void ( * PFNGLUNIFORM1IPROC) (GLint location, GLint v0); typedef void ( * PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint* value); typedef void ( * PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); typedef void ( * PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat* value); typedef void ( * PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); typedef void ( * PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint* value); typedef void ( * PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); typedef void ( * PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat* value); typedef void ( * PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); typedef void ( * PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint* value); typedef void ( * PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); typedef void ( * PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat* value); typedef void ( * PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); typedef void ( * PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint* value); typedef void ( * PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); typedef void ( * PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); typedef void ( * PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); typedef void ( * PFNGLUSEPROGRAMPROC) (GLuint program); typedef void ( * PFNGLVALIDATEPROGRAMPROC) (GLuint program); typedef void ( * PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x); typedef void ( * PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble* v); typedef void ( * PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); typedef void ( * PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat* v); typedef void ( * PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x); typedef void ( * PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort* v); typedef void ( * PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y); typedef void ( * PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble* v); typedef void ( * PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); typedef void ( * PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat* v); typedef void ( * PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y); typedef void ( * PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort* v); typedef void ( * PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); typedef void ( * PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble* v); typedef void ( * PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); typedef void ( * PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat* v); typedef void ( * PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z); typedef void ( * PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort* v); typedef void ( * PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte* v); typedef void ( * PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint* v); typedef void ( * PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort* v); typedef void ( * PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); typedef void ( * PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte* v); typedef void ( * PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint* v); typedef void ( * PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort* v); typedef void ( * PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte* v); typedef void ( * PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void ( * PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble* v); typedef void ( * PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void ( * PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat* v); typedef void ( * PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint* v); typedef void ( * PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); typedef void ( * PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort* v); typedef void ( * PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte* v); typedef void ( * PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint* v); typedef void ( * PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort* v); typedef void ( * PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* pointer); # 1938 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef void ( * PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef void ( * PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef void ( * PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef void ( * PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); typedef void ( * PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); # 1975 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLTBUFFERMASK3DFXPROC) (GLuint mask); # 2015 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count); typedef void ( * PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); typedef void ( * PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const void* pointer); typedef void ( * PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint* first, const GLsizei *count, GLsizei primcount); typedef void ( * PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint* first, const GLsizei *count, GLsizei primcount); # 2039 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint* fences); typedef void ( * PFNGLFINISHFENCEAPPLEPROC) (GLuint fence); typedef void ( * PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name); typedef void ( * PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint* fences); typedef GLboolean ( * PFNGLISFENCEAPPLEPROC) (GLuint fence); typedef void ( * PFNGLSETFENCEAPPLEPROC) (GLuint fence); typedef GLboolean ( * PFNGLTESTFENCEAPPLEPROC) (GLuint fence); typedef GLboolean ( * PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name); # 2119 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC) (GLenum target, GLenum pname, GLvoid **params); typedef void ( * PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, GLvoid *pointer); # 2147 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array); typedef void ( * PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint* arrays); typedef void ( * PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint* arrays); typedef GLboolean ( * PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array); # 2174 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void* pointer); typedef void ( * PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param); typedef void ( * PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void* pointer); # 2210 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp); # 2256 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum* bufs); # 2405 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); typedef void ( * PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); typedef void ( * PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); typedef void ( * PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); typedef void ( * PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); typedef void ( * PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); typedef void ( * PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params); typedef void ( * PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); typedef void ( * PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params); typedef void ( * PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); typedef void ( * PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); typedef void ( * PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); typedef void ( * PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); typedef void ( * PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); typedef void ( * PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); typedef void ( * PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void ( * PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); typedef void ( * PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); typedef void ( * PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void ( * PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); typedef void ( * PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); typedef void ( * PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void ( * PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); typedef void ( * PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum types, GLvoid *values); typedef void ( * PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void ( * PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); typedef void ( * PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); typedef void ( * PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); typedef void ( * PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink); typedef void ( * PFNGLRESETHISTOGRAMPROC) (GLenum target); typedef void ( * PFNGLRESETMINMAXPROC) (GLenum target); typedef void ( * PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); # 2491 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index); typedef void ( * PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, GLvoid *pointer); typedef void ( * PFNGLMATRIXINDEXUBVARBPROC) (GLint size, GLubyte *indices); typedef void ( * PFNGLMATRIXINDEXUIVARBPROC) (GLint size, GLuint *indices); typedef void ( * PFNGLMATRIXINDEXUSVARBPROC) (GLint size, GLushort *indices); # 2522 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert); # 2571 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLACTIVETEXTUREARBPROC) (GLenum texture); typedef void ( * PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); typedef void ( * PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); typedef void ( * PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); typedef void ( * PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); typedef void ( * PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); typedef void ( * PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); typedef void ( * PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); typedef void ( * PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); typedef void ( * PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); typedef void ( * PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); typedef void ( * PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); typedef void ( * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); typedef void ( * PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); typedef void ( * PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); typedef void ( * PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); typedef void ( * PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); typedef void ( * PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); typedef void ( * PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); typedef void ( * PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); typedef void ( * PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); typedef void ( * PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); typedef void ( * PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); typedef void ( * PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); typedef void ( * PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); typedef void ( * PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); typedef void ( * PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); typedef void ( * PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); typedef void ( * PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); typedef void ( * PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); typedef void ( * PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); typedef void ( * PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); typedef void ( * PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); typedef void ( * PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); # 2656 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id); typedef void ( * PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint* ids); typedef void ( * PFNGLENDQUERYARBPROC) (GLenum target); typedef void ( * PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint* ids); typedef void ( * PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint* params); typedef void ( * PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint* params); typedef void ( * PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint* params); typedef GLboolean ( * PFNGLISQUERYARBPROC) (GLuint id); # 2702 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param); typedef void ( * PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, GLfloat* params); # 2764 "/usr/include/GL/glew.h" 3 4 typedef char GLcharARB; typedef unsigned int GLhandleARB; typedef void ( * PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj); typedef void ( * PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj); typedef GLhandleARB ( * PFNGLCREATEPROGRAMOBJECTARBPROC) (void); typedef GLhandleARB ( * PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType); typedef void ( * PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj); typedef void ( * PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj); typedef void ( * PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei* length, GLint *size, GLenum *type, GLcharARB *name); typedef void ( * PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei* count, GLhandleARB *obj); typedef GLhandleARB ( * PFNGLGETHANDLEARBPROC) (GLenum pname); typedef void ( * PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei* length, GLcharARB *infoLog); typedef void ( * PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat* params); typedef void ( * PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint* params); typedef void ( * PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei* length, GLcharARB *source); typedef GLint ( * PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB* name); typedef void ( * PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat* params); typedef void ( * PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint* params); typedef void ( * PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj); typedef void ( * PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB ** string, const GLint *length); typedef void ( * PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0); typedef void ( * PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat* value); typedef void ( * PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0); typedef void ( * PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint* value); typedef void ( * PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1); typedef void ( * PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat* value); typedef void ( * PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1); typedef void ( * PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint* value); typedef void ( * PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); typedef void ( * PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat* value); typedef void ( * PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2); typedef void ( * PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint* value); typedef void ( * PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); typedef void ( * PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat* value); typedef void ( * PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); typedef void ( * PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint* value); typedef void ( * PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); typedef void ( * PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); typedef void ( * PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); typedef void ( * PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj); typedef void ( * PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj); # 2914 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void* data); typedef void ( * PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data); typedef void ( * PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data); typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void* data); typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data); typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data); typedef void ( * PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, void* img); # 3094 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLLOADTRANSPOSEMATRIXDARBPROC) (GLdouble m[16]); typedef void ( * PFNGLLOADTRANSPOSEMATRIXFARBPROC) (GLfloat m[16]); typedef void ( * PFNGLMULTTRANSPOSEMATRIXDARBPROC) (GLdouble m[16]); typedef void ( * PFNGLMULTTRANSPOSEMATRIXFARBPROC) (GLfloat m[16]); # 3156 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLVERTEXBLENDARBPROC) (GLint count); typedef void ( * PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, GLvoid *pointer); typedef void ( * PFNGLWEIGHTBVARBPROC) (GLint size, GLbyte *weights); typedef void ( * PFNGLWEIGHTDVARBPROC) (GLint size, GLdouble *weights); typedef void ( * PFNGLWEIGHTFVARBPROC) (GLint size, GLfloat *weights); typedef void ( * PFNGLWEIGHTIVARBPROC) (GLint size, GLint *weights); typedef void ( * PFNGLWEIGHTSVARBPROC) (GLint size, GLshort *weights); typedef void ( * PFNGLWEIGHTUBVARBPROC) (GLint size, GLubyte *weights); typedef void ( * PFNGLWEIGHTUIVARBPROC) (GLint size, GLuint *weights); typedef void ( * PFNGLWEIGHTUSVARBPROC) (GLint size, GLushort *weights); # 3219 "/usr/include/GL/glew.h" 3 4 typedef ptrdiff_t GLsizeiptrARB; typedef ptrdiff_t GLintptrARB; typedef void ( * PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer); typedef void ( * PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid* data, GLenum usage); typedef void ( * PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid* data); typedef void ( * PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint* buffers); typedef void ( * PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint* buffers); typedef void ( * PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint* params); typedef void ( * PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid** params); typedef void ( * PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid* data); typedef GLboolean ( * PFNGLISBUFFERARBPROC) (GLuint buffer); typedef GLvoid * ( * PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access); typedef GLboolean ( * PFNGLUNMAPBUFFERARBPROC) (GLenum target); # 3335 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); typedef void ( * PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint* programs); typedef void ( * PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); typedef void ( * PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); typedef void ( * PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint* programs); typedef void ( * PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble* params); typedef void ( * PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat* params); typedef void ( * PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble* params); typedef void ( * PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat* params); typedef void ( * PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, void* string); typedef void ( * PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint* params); typedef void ( * PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid** pointer); typedef void ( * PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble* params); typedef void ( * PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat* params); typedef void ( * PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint* params); typedef GLboolean ( * PFNGLISPROGRAMARBPROC) (GLuint program); typedef void ( * PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void ( * PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble* params); typedef void ( * PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void ( * PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat* params); typedef void ( * PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void ( * PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble* params); typedef void ( * PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void ( * PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat* params); typedef void ( * PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const void* string); typedef void ( * PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x); typedef void ( * PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble* v); typedef void ( * PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x); typedef void ( * PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat* v); typedef void ( * PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x); typedef void ( * PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort* v); typedef void ( * PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y); typedef void ( * PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble* v); typedef void ( * PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y); typedef void ( * PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat* v); typedef void ( * PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y); typedef void ( * PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort* v); typedef void ( * PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); typedef void ( * PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble* v); typedef void ( * PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); typedef void ( * PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat* v); typedef void ( * PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z); typedef void ( * PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort* v); typedef void ( * PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte* v); typedef void ( * PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint* v); typedef void ( * PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort* v); typedef void ( * PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); typedef void ( * PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte* v); typedef void ( * PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint* v); typedef void ( * PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort* v); typedef void ( * PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte* v); typedef void ( * PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void ( * PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble* v); typedef void ( * PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void ( * PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat* v); typedef void ( * PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint* v); typedef void ( * PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); typedef void ( * PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort* v); typedef void ( * PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte* v); typedef void ( * PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint* v); typedef void ( * PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort* v); typedef void ( * PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* pointer); # 3478 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB* name); typedef void ( * PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei* length, GLint *size, GLenum *type, GLcharARB *name); typedef GLint ( * PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB* name); # 3495 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y); typedef void ( * PFNGLWINDOWPOS2DVARBPROC) (const GLdouble* p); typedef void ( * PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y); typedef void ( * PFNGLWINDOWPOS2FVARBPROC) (const GLfloat* p); typedef void ( * PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y); typedef void ( * PFNGLWINDOWPOS2IVARBPROC) (const GLint* p); typedef void ( * PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y); typedef void ( * PFNGLWINDOWPOS2SVARBPROC) (const GLshort* p); typedef void ( * PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z); typedef void ( * PFNGLWINDOWPOS3DVARBPROC) (const GLdouble* p); typedef void ( * PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z); typedef void ( * PFNGLWINDOWPOS3FVARBPROC) (const GLfloat* p); typedef void ( * PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z); typedef void ( * PFNGLWINDOWPOS3IVARBPROC) (const GLint* p); typedef void ( * PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z); typedef void ( * PFNGLWINDOWPOS3SVARBPROC) (const GLshort* p); # 3602 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum* bufs); # 3619 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count); typedef void ( * PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count); typedef void ( * PFNGLELEMENTPOINTERATIPROC) (GLenum type, const void* pointer); # 3645 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param); typedef void ( * PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param); typedef void ( * PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param); typedef void ( * PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param); # 3719 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); typedef void ( * PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); typedef void ( * PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); typedef void ( * PFNGLBEGINFRAGMENTSHADERATIPROC) (void); typedef void ( * PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id); typedef void ( * PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); typedef void ( * PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); typedef void ( * PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); typedef void ( * PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id); typedef void ( * PFNGLENDFRAGMENTSHADERATIPROC) (void); typedef GLuint ( * PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range); typedef void ( * PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle); typedef void ( * PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle); typedef void ( * PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat* value); # 3758 "/usr/include/GL/glew.h" 3 4 typedef void* ( * PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer); typedef void ( * PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer); # 3783 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param); typedef void ( * PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param); # 3803 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); typedef void ( * PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); # 3896 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); typedef void ( * PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer); typedef void ( * PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat* params); typedef void ( * PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint* params); typedef void ( * PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat* params); typedef void ( * PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint* params); typedef void ( * PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat* params); typedef void ( * PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint* params); typedef GLboolean ( * PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer); typedef GLuint ( * PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const void* pointer, GLenum usage); typedef void ( * PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const void* pointer, GLenum preserve); typedef void ( * PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); # 3931 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat* params); typedef void ( * PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint* params); typedef void ( * PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); # 3959 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream); typedef void ( * PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte x, GLbyte y, GLbyte z); typedef void ( * PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *v); typedef void ( * PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); typedef void ( * PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *v); typedef void ( * PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); typedef void ( * PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *v); typedef void ( * PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z); typedef void ( * PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *v); typedef void ( * PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); typedef void ( * PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *v); typedef void ( * PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param); typedef void ( * PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param); typedef void ( * PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y); typedef void ( * PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *v); typedef void ( * PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y); typedef void ( * PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *v); typedef void ( * PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y); typedef void ( * PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *v); typedef void ( * PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y); typedef void ( * PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *v); typedef void ( * PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); typedef void ( * PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *v); typedef void ( * PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); typedef void ( * PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *v); typedef void ( * PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z); typedef void ( * PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *v); typedef void ( * PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); typedef void ( * PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *v); typedef void ( * PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void ( * PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *v); typedef void ( * PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void ( * PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *v); typedef void ( * PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w); typedef void ( * PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *v); typedef void ( * PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); typedef void ( * PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *v); # 4100 "/usr/include/GL/glew.h" 3 4 typedef GLint ( * PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location); typedef GLintptr ( * PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location); typedef void ( * PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer); # 4123 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); # 4139 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha); # 4157 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); # 4184 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLBLENDEQUATIONEXTPROC) (GLenum mode); # 4234 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void* data); typedef void ( * PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); # 4249 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count); typedef void ( * PFNGLUNLOCKARRAYSEXTPROC) (void); # 4285 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void* image); typedef void ( * PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* image); typedef void ( * PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param); typedef void ( * PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat* params); typedef void ( * PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param); typedef void ( * PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint* params); typedef void ( * PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); typedef void ( * PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); typedef void ( * PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void* image); typedef void ( * PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat* params); typedef void ( * PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint* params); typedef void ( * PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void* row, void* column, void* span); typedef void ( * PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* row, const void* column); # 4337 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, void* pointer); typedef void ( * PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, void* pointer); # 4352 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); typedef void ( * PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); typedef void ( * PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); typedef void ( * PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); typedef void ( * PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); # 4373 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble* params); typedef void ( * PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat* params); # 4391 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax); # 4404 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); typedef void ( * PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index); typedef void ( * PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index); typedef void ( * PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data); typedef void ( * PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data); typedef GLboolean ( * PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index); # 4427 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount); typedef void ( * PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); # 4445 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); # 4467 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); typedef void ( * PFNGLFOGCOORDDEXTPROC) (GLdouble coord); typedef void ( * PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord); typedef void ( * PFNGLFOGCOORDFEXTPROC) (GLfloat coord); typedef void ( * PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord); # 4503 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLFRAGMENTCOLORMATERIALEXTPROC) (GLenum face, GLenum mode); typedef void ( * PFNGLFRAGMENTLIGHTMODELFEXTPROC) (GLenum pname, GLfloat param); typedef void ( * PFNGLFRAGMENTLIGHTMODELFVEXTPROC) (GLenum pname, GLfloat* params); typedef void ( * PFNGLFRAGMENTLIGHTMODELIEXTPROC) (GLenum pname, GLint param); typedef void ( * PFNGLFRAGMENTLIGHTMODELIVEXTPROC) (GLenum pname, GLint* params); typedef void ( * PFNGLFRAGMENTLIGHTFEXTPROC) (GLenum light, GLenum pname, GLfloat param); typedef void ( * PFNGLFRAGMENTLIGHTFVEXTPROC) (GLenum light, GLenum pname, GLfloat* params); typedef void ( * PFNGLFRAGMENTLIGHTIEXTPROC) (GLenum light, GLenum pname, GLint param); typedef void ( * PFNGLFRAGMENTLIGHTIVEXTPROC) (GLenum light, GLenum pname, GLint* params); typedef void ( * PFNGLFRAGMENTMATERIALFEXTPROC) (GLenum face, GLenum pname, const GLfloat param); typedef void ( * PFNGLFRAGMENTMATERIALFVEXTPROC) (GLenum face, GLenum pname, const GLfloat* params); typedef void ( * PFNGLFRAGMENTMATERIALIEXTPROC) (GLenum face, GLenum pname, const GLint param); typedef void ( * PFNGLFRAGMENTMATERIALIVEXTPROC) (GLenum face, GLenum pname, const GLint* params); typedef void ( * PFNGLGETFRAGMENTLIGHTFVEXTPROC) (GLenum light, GLenum pname, GLfloat* params); typedef void ( * PFNGLGETFRAGMENTLIGHTIVEXTPROC) (GLenum light, GLenum pname, GLint* params); typedef void ( * PFNGLGETFRAGMENTMATERIALFVEXTPROC) (GLenum face, GLenum pname, const GLfloat* params); typedef void ( * PFNGLGETFRAGMENTMATERIALIVEXTPROC) (GLenum face, GLenum pname, const GLint* params); typedef void ( * PFNGLLIGHTENVIEXTPROC) (GLenum pname, GLint param); # 4555 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); # 4570 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); # 4635 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer); typedef void ( * PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer); typedef GLenum ( * PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target); typedef void ( * PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint* framebuffers); typedef void ( * PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint* renderbuffers); typedef void ( * PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); typedef void ( * PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); typedef void ( * PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); typedef void ( * PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); typedef void ( * PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint* framebuffers); typedef void ( * PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint* renderbuffers); typedef void ( * PFNGLGENERATEMIPMAPEXTPROC) (GLenum target); typedef void ( * PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint* params); typedef void ( * PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint* params); typedef GLboolean ( * PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer); typedef GLboolean ( * PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer); typedef void ( * PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); # 4713 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); typedef void ( * PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); typedef void ( * PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); typedef void ( * PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value); # 4759 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name); typedef GLint ( * PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name); typedef void ( * PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params); typedef void ( * PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params); typedef void ( * PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params); typedef void ( * PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0); typedef void ( * PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); typedef void ( * PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1); typedef void ( * PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); typedef void ( * PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); typedef void ( * PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); typedef void ( * PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); typedef void ( * PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); typedef void ( * PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x); typedef void ( * PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v); typedef void ( * PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x); typedef void ( * PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v); typedef void ( * PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y); typedef void ( * PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v); typedef void ( * PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y); typedef void ( * PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v); typedef void ( * PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z); typedef void ( * PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v); typedef void ( * PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z); typedef void ( * PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v); typedef void ( * PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v); typedef void ( * PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); typedef void ( * PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v); typedef void ( * PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v); typedef void ( * PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v); typedef void ( * PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); typedef void ( * PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v); typedef void ( * PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v); typedef void ( * PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); # 4852 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void* values); typedef void ( * PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat* params); typedef void ( * PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint* params); typedef void ( * PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void* values); typedef void ( * PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat* params); typedef void ( * PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint* params); typedef void ( * PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); typedef void ( * PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink); typedef void ( * PFNGLRESETHISTOGRAMEXTPROC) (GLenum target); typedef void ( * PFNGLRESETMINMAXEXTPROC) (GLenum target); # 4892 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLINDEXFUNCEXTPROC) (GLenum func, GLfloat ref); # 4905 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode); # 4938 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode); typedef void ( * PFNGLTEXTURELIGHTEXTPROC) (GLenum pname); typedef void ( * PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode); # 4964 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint* first, GLsizei *count, GLsizei primcount); typedef void ( * PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, GLsizei* count, GLenum type, const GLvoid **indices, GLsizei primcount); # 4997 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert); typedef void ( * PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern); # 5078 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void* data); typedef void ( * PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, void* data); typedef void ( * PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat* params); typedef void ( * PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint* params); # 5121 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat* params); typedef void ( * PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint* params); typedef void ( * PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, const GLfloat param); typedef void ( * PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat* params); typedef void ( * PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, const GLint param); typedef void ( * PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint* params); # 5158 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param); typedef void ( * PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, GLfloat* params); # 5177 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias); # 5199 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLBEGINSCENEEXTPROC) (void); typedef void ( * PFNGLENDSCENEEXTPROC) (void); # 5222 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); typedef void ( * PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v); typedef void ( * PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue); typedef void ( * PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v); typedef void ( * PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); typedef void ( * PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v); typedef void ( * PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue); typedef void ( * PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v); typedef void ( * PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue); typedef void ( * PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v); typedef void ( * PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); typedef void ( * PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v); typedef void ( * PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue); typedef void ( * PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v); typedef void ( * PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue); typedef void ( * PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v); typedef void ( * PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLvoid *pointer); # 5315 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face); # 5340 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void* pixels); typedef void ( * PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels); typedef void ( * PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels); # 5419 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels); # 5456 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer); # 5689 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha); typedef void ( * PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha); typedef void ( * PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params); typedef void ( * PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params); typedef void ( * PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); typedef void ( * PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params); # 5744 "/usr/include/GL/glew.h" 3 4 typedef GLboolean ( * PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint* textures, GLboolean* residences); typedef void ( * PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture); typedef void ( * PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint* textures); typedef void ( * PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint* textures); typedef GLboolean ( * PFNGLISTEXTUREEXTPROC) (GLuint texture); typedef void ( * PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint* textures, const GLclampf* priorities); # 5770 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLTEXTURENORMALEXTPROC) (GLenum mode); # 5838 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params); typedef void ( * PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params); # 5887 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLARRAYELEMENTEXTPROC) (GLint i); typedef void ( * PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void* pointer); typedef void ( * PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count); typedef void ( * PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean* pointer); typedef void ( * PFNGLGETPOINTERVEXTPROC) (GLenum pname, void** params); typedef void ( * PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void* pointer); typedef void ( * PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void* pointer); typedef void ( * PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void* pointer); typedef void ( * PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void* pointer); # 6027 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLBEGINVERTEXSHADEREXTPROC) (void); typedef GLuint ( * PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value); typedef GLuint ( * PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value); typedef GLuint ( * PFNGLBINDPARAMETEREXTPROC) (GLenum value); typedef GLuint ( * PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value); typedef GLuint ( * PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value); typedef void ( * PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id); typedef void ( * PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id); typedef void ( * PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); typedef void ( * PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); typedef void ( * PFNGLENDVERTEXSHADEREXTPROC) (void); typedef void ( * PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); typedef GLuint ( * PFNGLGENSYMBOLSEXTPROC) (GLenum dataType, GLenum storageType, GLenum range, GLuint components); typedef GLuint ( * PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range); typedef void ( * PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); typedef void ( * PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); typedef void ( * PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); typedef void ( * PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); typedef void ( * PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); typedef void ( * PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); typedef void ( * PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); typedef void ( * PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); typedef void ( * PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); typedef void ( * PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid **data); typedef void ( * PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); typedef GLboolean ( * PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap); typedef void ( * PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, GLvoid *addr); typedef void ( * PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, GLvoid *addr); typedef void ( * PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1); typedef void ( * PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2); typedef void ( * PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); typedef void ( * PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); typedef void ( * PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, GLvoid *addr); typedef void ( * PFNGLVARIANTBVEXTPROC) (GLuint id, GLbyte *addr); typedef void ( * PFNGLVARIANTDVEXTPROC) (GLuint id, GLdouble *addr); typedef void ( * PFNGLVARIANTFVEXTPROC) (GLuint id, GLfloat *addr); typedef void ( * PFNGLVARIANTIVEXTPROC) (GLuint id, GLint *addr); typedef void ( * PFNGLVARIANTSVEXTPROC) (GLuint id, GLshort *addr); typedef void ( * PFNGLVARIANTUBVEXTPROC) (GLuint id, GLubyte *addr); typedef void ( * PFNGLVARIANTUIVEXTPROC) (GLuint id, GLuint *addr); typedef void ( * PFNGLVARIANTUSVEXTPROC) (GLuint id, GLushort *addr); typedef void ( * PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); # 6136 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, void* pointer); typedef void ( * PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight); typedef void ( * PFNGLVERTEXWEIGHTFVEXTPROC) (GLfloat* weight); # 6153 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const void* string); # 6175 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat* params); typedef void ( * PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint* params); typedef void ( * PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, const GLfloat param); typedef void ( * PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat* params); typedef void ( * PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, const GLint param); typedef void ( * PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint* params); # 6230 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum* mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); typedef void ( * PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum* mode, const GLsizei *count, GLenum type, const GLvoid * const *indices, GLsizei primcount, GLint modestride); # 6296 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid ** pointer, GLint ptrstride); typedef void ( * PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean ** pointer, GLint ptrstride); typedef void ( * PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid ** pointer, GLint ptrstride); typedef void ( * PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid ** pointer, GLint ptrstride); typedef void ( * PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid ** pointer, GLint ptrstride); typedef void ( * PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid ** pointer, GLint ptrstride); typedef void ( * PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid ** pointer, GLint ptrstride); typedef void ( * PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid ** pointer, GLint ptrstride); # 6358 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const void** pointer); typedef void ( * PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const void** pointer); typedef void ( * PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const void** pointer); typedef void ( * PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const void** pointer); # 6377 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLTEXSCISSORFUNCINTELPROC) (GLenum target, GLenum lfunc, GLenum hfunc); typedef void ( * PFNGLTEXSCISSORINTELPROC) (GLenum target, GLclampf tlow, GLclampf thigh); # 6397 "/usr/include/GL/glew.h" 3 4 typedef GLuint ( * PFNGLBUFFERREGIONENABLEDEXTPROC) (void); typedef void ( * PFNGLDELETEBUFFERREGIONEXTPROC) (GLenum region); typedef void ( * PFNGLDRAWBUFFERREGIONEXTPROC) (GLuint region, GLint x, GLint y, GLsizei width, GLsizei height, GLint xDest, GLint yDest); typedef GLuint ( * PFNGLNEWBUFFERREGIONEXTPROC) (GLenum region); typedef void ( * PFNGLREADBUFFERREGIONEXTPROC) (GLuint region, GLint x, GLint y, GLsizei width, GLsizei height); # 6445 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLRESIZEBUFFERSMESAPROC) (void); # 6458 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y); typedef void ( * PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble* p); typedef void ( * PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y); typedef void ( * PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat* p); typedef void ( * PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y); typedef void ( * PFNGLWINDOWPOS2IVMESAPROC) (const GLint* p); typedef void ( * PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y); typedef void ( * PFNGLWINDOWPOS2SVMESAPROC) (const GLshort* p); typedef void ( * PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z); typedef void ( * PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble* p); typedef void ( * PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z); typedef void ( * PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat* p); typedef void ( * PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z); typedef void ( * PFNGLWINDOWPOS3IVMESAPROC) (const GLint* p); typedef void ( * PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z); typedef void ( * PFNGLWINDOWPOS3SVMESAPROC) (const GLshort* p); typedef void ( * PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble); typedef void ( * PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble* p); typedef void ( * PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void ( * PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat* p); typedef void ( * PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w); typedef void ( * PFNGLWINDOWPOS4IVMESAPROC) (const GLint* p); typedef void ( * PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w); typedef void ( * PFNGLWINDOWPOS4SVMESAPROC) (const GLshort* p); # 6556 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLCLEARDEPTHDNVPROC) (GLdouble depth); typedef void ( * PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax); typedef void ( * PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar); # 6609 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode); typedef void ( * PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat* params); typedef void ( * PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint* params); typedef void ( * PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void* points); typedef void ( * PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat* params); typedef void ( * PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint* params); typedef void ( * PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void* points); typedef void ( * PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat* params); typedef void ( * PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint* params); # 6642 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint* fences); typedef void ( * PFNGLFINISHFENCENVPROC) (GLuint fence); typedef void ( * PFNGLGENFENCESNVPROC) (GLsizei n, GLuint* fences); typedef void ( * PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint* params); typedef GLboolean ( * PFNGLISFENCENVPROC) (GLuint fence); typedef void ( * PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); typedef GLboolean ( * PFNGLTESTFENCENVPROC) (GLuint fence); # 6712 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte* name, GLdouble *params); typedef void ( * PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte* name, GLfloat *params); typedef void ( * PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte* name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void ( * PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte* name, const GLdouble v[]); typedef void ( * PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte* name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void ( * PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte* name, const GLfloat v[]); # 6775 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); # 6792 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit); # 6814 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); typedef void ( * PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); typedef void ( * PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); typedef void ( * PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); typedef void ( * PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); typedef void ( * PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); typedef void ( * PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); typedef void ( * PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); typedef void ( * PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); typedef void ( * PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); typedef void ( * PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); typedef void ( * PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); # 6851 "/usr/include/GL/glew.h" 3 4 typedef unsigned short GLhalf; typedef void ( * PFNGLCOLOR3HNVPROC) (GLhalf red, GLhalf green, GLhalf blue); typedef void ( * PFNGLCOLOR3HVNVPROC) (const GLhalf* v); typedef void ( * PFNGLCOLOR4HNVPROC) (GLhalf red, GLhalf green, GLhalf blue, GLhalf alpha); typedef void ( * PFNGLCOLOR4HVNVPROC) (const GLhalf* v); typedef void ( * PFNGLFOGCOORDHNVPROC) (GLhalf fog); typedef void ( * PFNGLFOGCOORDHVNVPROC) (const GLhalf* fog); typedef void ( * PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalf s); typedef void ( * PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalf* v); typedef void ( * PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalf s, GLhalf t); typedef void ( * PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalf* v); typedef void ( * PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalf s, GLhalf t, GLhalf r); typedef void ( * PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalf* v); typedef void ( * PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalf s, GLhalf t, GLhalf r, GLhalf q); typedef void ( * PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalf* v); typedef void ( * PFNGLNORMAL3HNVPROC) (GLhalf nx, GLhalf ny, GLhalf nz); typedef void ( * PFNGLNORMAL3HVNVPROC) (const GLhalf* v); typedef void ( * PFNGLSECONDARYCOLOR3HNVPROC) (GLhalf red, GLhalf green, GLhalf blue); typedef void ( * PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalf* v); typedef void ( * PFNGLTEXCOORD1HNVPROC) (GLhalf s); typedef void ( * PFNGLTEXCOORD1HVNVPROC) (const GLhalf* v); typedef void ( * PFNGLTEXCOORD2HNVPROC) (GLhalf s, GLhalf t); typedef void ( * PFNGLTEXCOORD2HVNVPROC) (const GLhalf* v); typedef void ( * PFNGLTEXCOORD3HNVPROC) (GLhalf s, GLhalf t, GLhalf r); typedef void ( * PFNGLTEXCOORD3HVNVPROC) (const GLhalf* v); typedef void ( * PFNGLTEXCOORD4HNVPROC) (GLhalf s, GLhalf t, GLhalf r, GLhalf q); typedef void ( * PFNGLTEXCOORD4HVNVPROC) (const GLhalf* v); typedef void ( * PFNGLVERTEX2HNVPROC) (GLhalf x, GLhalf y); typedef void ( * PFNGLVERTEX2HVNVPROC) (const GLhalf* v); typedef void ( * PFNGLVERTEX3HNVPROC) (GLhalf x, GLhalf y, GLhalf z); typedef void ( * PFNGLVERTEX3HVNVPROC) (const GLhalf* v); typedef void ( * PFNGLVERTEX4HNVPROC) (GLhalf x, GLhalf y, GLhalf z, GLhalf w); typedef void ( * PFNGLVERTEX4HVNVPROC) (const GLhalf* v); typedef void ( * PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalf x); typedef void ( * PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalf* v); typedef void ( * PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalf x, GLhalf y); typedef void ( * PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalf* v); typedef void ( * PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalf x, GLhalf y, GLhalf z); typedef void ( * PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalf* v); typedef void ( * PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalf x, GLhalf y, GLhalf z, GLhalf w); typedef void ( * PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalf* v); typedef void ( * PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalf* v); typedef void ( * PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalf* v); typedef void ( * PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalf* v); typedef void ( * PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalf* v); typedef void ( * PFNGLVERTEXWEIGHTHNVPROC) (GLhalf weight); typedef void ( * PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalf* weight); # 6984 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id); typedef void ( * PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint* ids); typedef void ( * PFNGLENDOCCLUSIONQUERYNVPROC) (void); typedef void ( * PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint* ids); typedef void ( * PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint* params); typedef void ( * PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint* params); typedef GLboolean ( * PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id); # 7027 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params); typedef void ( * PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params); typedef void ( * PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params); # 7051 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target); typedef void ( * PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, void* pointer); # 7070 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param); typedef void ( * PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint* params); # 7088 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index); typedef void ( * PFNGLPRIMITIVERESTARTNVPROC) (void); # 7155 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); typedef void ( * PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); typedef void ( * PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param); typedef void ( * PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat* params); typedef void ( * PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); typedef void ( * PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint* params); typedef void ( * PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); typedef void ( * PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat* params); typedef void ( * PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint* params); typedef void ( * PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat* params); typedef void ( * PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint* params); typedef void ( * PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat* params); typedef void ( * PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint* params); # 7194 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat* params); typedef void ( * PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat* params); # 7454 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name); typedef void ( * PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode); typedef void ( * PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer); typedef void ( * PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); typedef void ( * PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); typedef void ( * PFNGLENDTRANSFORMFEEDBACKNVPROC) (void); typedef void ( * PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); typedef void ( * PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location); typedef GLint ( * PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name); typedef void ( * PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode); typedef void ( * PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); # 7493 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void); typedef void ( * PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, void* pointer); # 7603 "/usr/include/GL/glew.h" 3 4 typedef GLboolean ( * PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint* ids, GLboolean *residences); typedef void ( * PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); typedef void ( * PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint* ids); typedef void ( * PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat* params); typedef void ( * PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint* ids); typedef void ( * PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble* params); typedef void ( * PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat* params); typedef void ( * PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte* program); typedef void ( * PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint* params); typedef void ( * PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint* params); typedef void ( * PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid** pointer); typedef void ( * PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble* params); typedef void ( * PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat* params); typedef void ( * PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint* params); typedef GLboolean ( * PFNGLISPROGRAMNVPROC) (GLuint id); typedef void ( * PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte* program); typedef void ( * PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void ( * PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble* params); typedef void ( * PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void ( * PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat* params); typedef void ( * PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint num, const GLdouble* params); typedef void ( * PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint num, const GLfloat* params); typedef void ( * PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, GLuint* ids); typedef void ( * PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); typedef void ( * PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x); typedef void ( * PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble* v); typedef void ( * PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x); typedef void ( * PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat* v); typedef void ( * PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x); typedef void ( * PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort* v); typedef void ( * PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y); typedef void ( * PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble* v); typedef void ( * PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y); typedef void ( * PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat* v); typedef void ( * PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y); typedef void ( * PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort* v); typedef void ( * PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); typedef void ( * PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble* v); typedef void ( * PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); typedef void ( * PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat* v); typedef void ( * PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); typedef void ( * PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort* v); typedef void ( * PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); typedef void ( * PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble* v); typedef void ( * PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void ( * PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat* v); typedef void ( * PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); typedef void ( * PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort* v); typedef void ( * PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); typedef void ( * PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte* v); typedef void ( * PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void* pointer); typedef void ( * PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei n, const GLdouble* v); typedef void ( * PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei n, const GLfloat* v); typedef void ( * PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei n, const GLshort* v); typedef void ( * PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei n, const GLdouble* v); typedef void ( * PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei n, const GLfloat* v); typedef void ( * PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei n, const GLshort* v); typedef void ( * PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei n, const GLdouble* v); typedef void ( * PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei n, const GLfloat* v); typedef void ( * PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei n, const GLshort* v); typedef void ( * PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei n, const GLdouble* v); typedef void ( * PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei n, const GLfloat* v); typedef void ( * PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei n, const GLshort* v); typedef void ( * PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei n, const GLubyte* v); # 7835 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLCLEARDEPTHFOESPROC) (GLclampd depth); typedef void ( * PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat* equation); typedef void ( * PFNGLDEPTHRANGEFOESPROC) (GLclampf n, GLclampf f); typedef void ( * PFNGLFRUSTUMFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); typedef void ( * PFNGLGETCLIPPLANEFOESPROC) (GLenum plane, GLfloat* equation); typedef void ( * PFNGLORTHOFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); # 8007 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat* points); typedef void ( * PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat* points); # 8022 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat* points); typedef void ( * PFNGLGETFOGFUNCSGISPROC) (GLfloat* points); # 8067 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert); typedef void ( * PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern); # 8091 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat* points); typedef void ( * PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat* points); # 8106 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLint border, GLenum format, GLenum type, const void* pixels); typedef void ( * PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLenum format, GLenum type, const void* pixels); # 8143 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat* weights); typedef void ( * PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat* weights); # 8183 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLASYNCMARKERSGIXPROC) (GLuint marker); typedef void ( * PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range); typedef GLint ( * PFNGLFINISHASYNCSGIXPROC) (GLuint* markerp); typedef GLuint ( * PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range); typedef GLboolean ( * PFNGLISASYNCMARKERSGIXPROC) (GLuint marker); typedef GLint ( * PFNGLPOLLASYNCSGIXPROC) (GLuint* markerp); # 8268 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLFLUSHRASTERSGIXPROC) (void); # 8297 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLTEXTUREFOGSGIXPROC) (GLenum pname); # 8310 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode); typedef void ( * PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param); typedef void ( * PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, GLfloat* params); typedef void ( * PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param); typedef void ( * PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, GLint* params); typedef void ( * PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param); typedef void ( * PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat* params); typedef void ( * PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param); typedef void ( * PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint* params); typedef void ( * PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, const GLfloat param); typedef void ( * PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat* params); typedef void ( * PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, const GLint param); typedef void ( * PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint* params); typedef void ( * PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum value, GLfloat* data); typedef void ( * PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum value, GLint* data); typedef void ( * PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat* data); typedef void ( * PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint* data); # 8355 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLFRAMEZOOMSGIXPROC) (GLint factor); # 8397 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLPIXELTEXGENSGIXPROC) (GLenum mode); # 8419 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLREFERENCEPLANESGIXPROC) (const GLdouble* equation); # 8472 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param); typedef void ( * PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, GLfloat* params); typedef void ( * PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param); typedef void ( * PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, GLint* params); # 8491 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLTAGSAMPLEBUFFERSGIXPROC) (void); # 8669 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat* params); typedef void ( * PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint* params); typedef void ( * PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void* table); typedef void ( * PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); typedef void ( * PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat* params); typedef void ( * PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint* params); typedef void ( * PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, void* table); # 8709 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLFINISHTEXTURESUNXPROC) (void); # 8736 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor); typedef void ( * PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor); typedef void ( * PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor); typedef void ( * PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor); typedef void ( * PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor); typedef void ( * PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor); typedef void ( * PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor); typedef void ( * PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor); # 8775 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLREADVIDEOPIXELSSUNPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels); # 8817 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const void* pointer); typedef void ( * PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code); typedef void ( * PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte* code); typedef void ( * PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code); typedef void ( * PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint* code); typedef void ( * PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code); typedef void ( * PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort* code); # 8842 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); typedef void ( * PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat* c, const GLfloat *v); typedef void ( * PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); typedef void ( * PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat* c, const GLfloat *n, const GLfloat *v); typedef void ( * PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); typedef void ( * PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte* c, const GLfloat *v); typedef void ( * PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); typedef void ( * PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte* c, const GLfloat *v); typedef void ( * PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); typedef void ( * PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat* n, const GLfloat *v); typedef void ( * PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); typedef void ( * PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *c, const GLfloat *v); typedef void ( * PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); typedef void ( * PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); typedef void ( * PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); typedef void ( * PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint* rc, const GLubyte *c, const GLfloat *v); typedef void ( * PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); typedef void ( * PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *n, const GLfloat *v); typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *tc, const GLfloat *v); typedef void ( * PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z); typedef void ( * PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint* rc, const GLfloat *v); typedef void ( * PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); typedef void ( * PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat* tc, const GLfloat *c, const GLfloat *v); typedef void ( * PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); typedef void ( * PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat* tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); typedef void ( * PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); typedef void ( * PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat* tc, const GLubyte *c, const GLfloat *v); typedef void ( * PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); typedef void ( * PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat* tc, const GLfloat *n, const GLfloat *v); typedef void ( * PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); typedef void ( * PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat* tc, const GLfloat *v); typedef void ( * PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void ( * PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat* tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); typedef void ( * PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void ( * PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat* tc, const GLfloat *v); # 8956 "/usr/include/GL/glew.h" 3 4 typedef void ( * PFNGLADDSWAPHINTRECTWINPROC) (GLint x, GLint y, GLsizei width, GLsizei height); # 8983 "/usr/include/GL/glew.h" 3 4 extern PFNGLCOPYTEXSUBIMAGE3DPROC __glewCopyTexSubImage3D; extern PFNGLDRAWRANGEELEMENTSPROC __glewDrawRangeElements; extern PFNGLTEXIMAGE3DPROC __glewTexImage3D; extern PFNGLTEXSUBIMAGE3DPROC __glewTexSubImage3D; extern PFNGLACTIVETEXTUREPROC __glewActiveTexture; extern PFNGLCLIENTACTIVETEXTUREPROC __glewClientActiveTexture; extern PFNGLCOMPRESSEDTEXIMAGE1DPROC __glewCompressedTexImage1D; extern PFNGLCOMPRESSEDTEXIMAGE2DPROC __glewCompressedTexImage2D; extern PFNGLCOMPRESSEDTEXIMAGE3DPROC __glewCompressedTexImage3D; extern PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC __glewCompressedTexSubImage1D; extern PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC __glewCompressedTexSubImage2D; extern PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC __glewCompressedTexSubImage3D; extern PFNGLGETCOMPRESSEDTEXIMAGEPROC __glewGetCompressedTexImage; extern PFNGLLOADTRANSPOSEMATRIXDPROC __glewLoadTransposeMatrixd; extern PFNGLLOADTRANSPOSEMATRIXFPROC __glewLoadTransposeMatrixf; extern PFNGLMULTTRANSPOSEMATRIXDPROC __glewMultTransposeMatrixd; extern PFNGLMULTTRANSPOSEMATRIXFPROC __glewMultTransposeMatrixf; extern PFNGLMULTITEXCOORD1DPROC __glewMultiTexCoord1d; extern PFNGLMULTITEXCOORD1DVPROC __glewMultiTexCoord1dv; extern PFNGLMULTITEXCOORD1FPROC __glewMultiTexCoord1f; extern PFNGLMULTITEXCOORD1FVPROC __glewMultiTexCoord1fv; extern PFNGLMULTITEXCOORD1IPROC __glewMultiTexCoord1i; extern PFNGLMULTITEXCOORD1IVPROC __glewMultiTexCoord1iv; extern PFNGLMULTITEXCOORD1SPROC __glewMultiTexCoord1s; extern PFNGLMULTITEXCOORD1SVPROC __glewMultiTexCoord1sv; extern PFNGLMULTITEXCOORD2DPROC __glewMultiTexCoord2d; extern PFNGLMULTITEXCOORD2DVPROC __glewMultiTexCoord2dv; extern PFNGLMULTITEXCOORD2FPROC __glewMultiTexCoord2f; extern PFNGLMULTITEXCOORD2FVPROC __glewMultiTexCoord2fv; extern PFNGLMULTITEXCOORD2IPROC __glewMultiTexCoord2i; extern PFNGLMULTITEXCOORD2IVPROC __glewMultiTexCoord2iv; extern PFNGLMULTITEXCOORD2SPROC __glewMultiTexCoord2s; extern PFNGLMULTITEXCOORD2SVPROC __glewMultiTexCoord2sv; extern PFNGLMULTITEXCOORD3DPROC __glewMultiTexCoord3d; extern PFNGLMULTITEXCOORD3DVPROC __glewMultiTexCoord3dv; extern PFNGLMULTITEXCOORD3FPROC __glewMultiTexCoord3f; extern PFNGLMULTITEXCOORD3FVPROC __glewMultiTexCoord3fv; extern PFNGLMULTITEXCOORD3IPROC __glewMultiTexCoord3i; extern PFNGLMULTITEXCOORD3IVPROC __glewMultiTexCoord3iv; extern PFNGLMULTITEXCOORD3SPROC __glewMultiTexCoord3s; extern PFNGLMULTITEXCOORD3SVPROC __glewMultiTexCoord3sv; extern PFNGLMULTITEXCOORD4DPROC __glewMultiTexCoord4d; extern PFNGLMULTITEXCOORD4DVPROC __glewMultiTexCoord4dv; extern PFNGLMULTITEXCOORD4FPROC __glewMultiTexCoord4f; extern PFNGLMULTITEXCOORD4FVPROC __glewMultiTexCoord4fv; extern PFNGLMULTITEXCOORD4IPROC __glewMultiTexCoord4i; extern PFNGLMULTITEXCOORD4IVPROC __glewMultiTexCoord4iv; extern PFNGLMULTITEXCOORD4SPROC __glewMultiTexCoord4s; extern PFNGLMULTITEXCOORD4SVPROC __glewMultiTexCoord4sv; extern PFNGLSAMPLECOVERAGEPROC __glewSampleCoverage; extern PFNGLBLENDCOLORPROC __glewBlendColor; extern PFNGLBLENDEQUATIONPROC __glewBlendEquation; extern PFNGLBLENDFUNCSEPARATEPROC __glewBlendFuncSeparate; extern PFNGLFOGCOORDPOINTERPROC __glewFogCoordPointer; extern PFNGLFOGCOORDDPROC __glewFogCoordd; extern PFNGLFOGCOORDDVPROC __glewFogCoorddv; extern PFNGLFOGCOORDFPROC __glewFogCoordf; extern PFNGLFOGCOORDFVPROC __glewFogCoordfv; extern PFNGLMULTIDRAWARRAYSPROC __glewMultiDrawArrays; extern PFNGLMULTIDRAWELEMENTSPROC __glewMultiDrawElements; extern PFNGLPOINTPARAMETERFPROC __glewPointParameterf; extern PFNGLPOINTPARAMETERFVPROC __glewPointParameterfv; extern PFNGLSECONDARYCOLOR3BPROC __glewSecondaryColor3b; extern PFNGLSECONDARYCOLOR3BVPROC __glewSecondaryColor3bv; extern PFNGLSECONDARYCOLOR3DPROC __glewSecondaryColor3d; extern PFNGLSECONDARYCOLOR3DVPROC __glewSecondaryColor3dv; extern PFNGLSECONDARYCOLOR3FPROC __glewSecondaryColor3f; extern PFNGLSECONDARYCOLOR3FVPROC __glewSecondaryColor3fv; extern PFNGLSECONDARYCOLOR3IPROC __glewSecondaryColor3i; extern PFNGLSECONDARYCOLOR3IVPROC __glewSecondaryColor3iv; extern PFNGLSECONDARYCOLOR3SPROC __glewSecondaryColor3s; extern PFNGLSECONDARYCOLOR3SVPROC __glewSecondaryColor3sv; extern PFNGLSECONDARYCOLOR3UBPROC __glewSecondaryColor3ub; extern PFNGLSECONDARYCOLOR3UBVPROC __glewSecondaryColor3ubv; extern PFNGLSECONDARYCOLOR3UIPROC __glewSecondaryColor3ui; extern PFNGLSECONDARYCOLOR3UIVPROC __glewSecondaryColor3uiv; extern PFNGLSECONDARYCOLOR3USPROC __glewSecondaryColor3us; extern PFNGLSECONDARYCOLOR3USVPROC __glewSecondaryColor3usv; extern PFNGLSECONDARYCOLORPOINTERPROC __glewSecondaryColorPointer; extern PFNGLWINDOWPOS2DPROC __glewWindowPos2d; extern PFNGLWINDOWPOS2DVPROC __glewWindowPos2dv; extern PFNGLWINDOWPOS2FPROC __glewWindowPos2f; extern PFNGLWINDOWPOS2FVPROC __glewWindowPos2fv; extern PFNGLWINDOWPOS2IPROC __glewWindowPos2i; extern PFNGLWINDOWPOS2IVPROC __glewWindowPos2iv; extern PFNGLWINDOWPOS2SPROC __glewWindowPos2s; extern PFNGLWINDOWPOS2SVPROC __glewWindowPos2sv; extern PFNGLWINDOWPOS3DPROC __glewWindowPos3d; extern PFNGLWINDOWPOS3DVPROC __glewWindowPos3dv; extern PFNGLWINDOWPOS3FPROC __glewWindowPos3f; extern PFNGLWINDOWPOS3FVPROC __glewWindowPos3fv; extern PFNGLWINDOWPOS3IPROC __glewWindowPos3i; extern PFNGLWINDOWPOS3IVPROC __glewWindowPos3iv; extern PFNGLWINDOWPOS3SPROC __glewWindowPos3s; extern PFNGLWINDOWPOS3SVPROC __glewWindowPos3sv; extern PFNGLBEGINQUERYPROC __glewBeginQuery; extern PFNGLBINDBUFFERPROC __glewBindBuffer; extern PFNGLBUFFERDATAPROC __glewBufferData; extern PFNGLBUFFERSUBDATAPROC __glewBufferSubData; extern PFNGLDELETEBUFFERSPROC __glewDeleteBuffers; extern PFNGLDELETEQUERIESPROC __glewDeleteQueries; extern PFNGLENDQUERYPROC __glewEndQuery; extern PFNGLGENBUFFERSPROC __glewGenBuffers; extern PFNGLGENQUERIESPROC __glewGenQueries; extern PFNGLGETBUFFERPARAMETERIVPROC __glewGetBufferParameteriv; extern PFNGLGETBUFFERPOINTERVPROC __glewGetBufferPointerv; extern PFNGLGETBUFFERSUBDATAPROC __glewGetBufferSubData; extern PFNGLGETQUERYOBJECTIVPROC __glewGetQueryObjectiv; extern PFNGLGETQUERYOBJECTUIVPROC __glewGetQueryObjectuiv; extern PFNGLGETQUERYIVPROC __glewGetQueryiv; extern PFNGLISBUFFERPROC __glewIsBuffer; extern PFNGLISQUERYPROC __glewIsQuery; extern PFNGLMAPBUFFERPROC __glewMapBuffer; extern PFNGLUNMAPBUFFERPROC __glewUnmapBuffer; extern PFNGLATTACHSHADERPROC __glewAttachShader; extern PFNGLBINDATTRIBLOCATIONPROC __glewBindAttribLocation; extern PFNGLBLENDEQUATIONSEPARATEPROC __glewBlendEquationSeparate; extern PFNGLCOMPILESHADERPROC __glewCompileShader; extern PFNGLCREATEPROGRAMPROC __glewCreateProgram; extern PFNGLCREATESHADERPROC __glewCreateShader; extern PFNGLDELETEPROGRAMPROC __glewDeleteProgram; extern PFNGLDELETESHADERPROC __glewDeleteShader; extern PFNGLDETACHSHADERPROC __glewDetachShader; extern PFNGLDISABLEVERTEXATTRIBARRAYPROC __glewDisableVertexAttribArray; extern PFNGLDRAWBUFFERSPROC __glewDrawBuffers; extern PFNGLENABLEVERTEXATTRIBARRAYPROC __glewEnableVertexAttribArray; extern PFNGLGETACTIVEATTRIBPROC __glewGetActiveAttrib; extern PFNGLGETACTIVEUNIFORMPROC __glewGetActiveUniform; extern PFNGLGETATTACHEDSHADERSPROC __glewGetAttachedShaders; extern PFNGLGETATTRIBLOCATIONPROC __glewGetAttribLocation; extern PFNGLGETPROGRAMINFOLOGPROC __glewGetProgramInfoLog; extern PFNGLGETPROGRAMIVPROC __glewGetProgramiv; extern PFNGLGETSHADERINFOLOGPROC __glewGetShaderInfoLog; extern PFNGLGETSHADERSOURCEPROC __glewGetShaderSource; extern PFNGLGETSHADERIVPROC __glewGetShaderiv; extern PFNGLGETUNIFORMLOCATIONPROC __glewGetUniformLocation; extern PFNGLGETUNIFORMFVPROC __glewGetUniformfv; extern PFNGLGETUNIFORMIVPROC __glewGetUniformiv; extern PFNGLGETVERTEXATTRIBPOINTERVPROC __glewGetVertexAttribPointerv; extern PFNGLGETVERTEXATTRIBDVPROC __glewGetVertexAttribdv; extern PFNGLGETVERTEXATTRIBFVPROC __glewGetVertexAttribfv; extern PFNGLGETVERTEXATTRIBIVPROC __glewGetVertexAttribiv; extern PFNGLISPROGRAMPROC __glewIsProgram; extern PFNGLISSHADERPROC __glewIsShader; extern PFNGLLINKPROGRAMPROC __glewLinkProgram; extern PFNGLSHADERSOURCEPROC __glewShaderSource; extern PFNGLSTENCILFUNCSEPARATEPROC __glewStencilFuncSeparate; extern PFNGLSTENCILMASKSEPARATEPROC __glewStencilMaskSeparate; extern PFNGLSTENCILOPSEPARATEPROC __glewStencilOpSeparate; extern PFNGLUNIFORM1FPROC __glewUniform1f; extern PFNGLUNIFORM1FVPROC __glewUniform1fv; extern PFNGLUNIFORM1IPROC __glewUniform1i; extern PFNGLUNIFORM1IVPROC __glewUniform1iv; extern PFNGLUNIFORM2FPROC __glewUniform2f; extern PFNGLUNIFORM2FVPROC __glewUniform2fv; extern PFNGLUNIFORM2IPROC __glewUniform2i; extern PFNGLUNIFORM2IVPROC __glewUniform2iv; extern PFNGLUNIFORM3FPROC __glewUniform3f; extern PFNGLUNIFORM3FVPROC __glewUniform3fv; extern PFNGLUNIFORM3IPROC __glewUniform3i; extern PFNGLUNIFORM3IVPROC __glewUniform3iv; extern PFNGLUNIFORM4FPROC __glewUniform4f; extern PFNGLUNIFORM4FVPROC __glewUniform4fv; extern PFNGLUNIFORM4IPROC __glewUniform4i; extern PFNGLUNIFORM4IVPROC __glewUniform4iv; extern PFNGLUNIFORMMATRIX2FVPROC __glewUniformMatrix2fv; extern PFNGLUNIFORMMATRIX3FVPROC __glewUniformMatrix3fv; extern PFNGLUNIFORMMATRIX4FVPROC __glewUniformMatrix4fv; extern PFNGLUSEPROGRAMPROC __glewUseProgram; extern PFNGLVALIDATEPROGRAMPROC __glewValidateProgram; extern PFNGLVERTEXATTRIB1DPROC __glewVertexAttrib1d; extern PFNGLVERTEXATTRIB1DVPROC __glewVertexAttrib1dv; extern PFNGLVERTEXATTRIB1FPROC __glewVertexAttrib1f; extern PFNGLVERTEXATTRIB1FVPROC __glewVertexAttrib1fv; extern PFNGLVERTEXATTRIB1SPROC __glewVertexAttrib1s; extern PFNGLVERTEXATTRIB1SVPROC __glewVertexAttrib1sv; extern PFNGLVERTEXATTRIB2DPROC __glewVertexAttrib2d; extern PFNGLVERTEXATTRIB2DVPROC __glewVertexAttrib2dv; extern PFNGLVERTEXATTRIB2FPROC __glewVertexAttrib2f; extern PFNGLVERTEXATTRIB2FVPROC __glewVertexAttrib2fv; extern PFNGLVERTEXATTRIB2SPROC __glewVertexAttrib2s; extern PFNGLVERTEXATTRIB2SVPROC __glewVertexAttrib2sv; extern PFNGLVERTEXATTRIB3DPROC __glewVertexAttrib3d; extern PFNGLVERTEXATTRIB3DVPROC __glewVertexAttrib3dv; extern PFNGLVERTEXATTRIB3FPROC __glewVertexAttrib3f; extern PFNGLVERTEXATTRIB3FVPROC __glewVertexAttrib3fv; extern PFNGLVERTEXATTRIB3SPROC __glewVertexAttrib3s; extern PFNGLVERTEXATTRIB3SVPROC __glewVertexAttrib3sv; extern PFNGLVERTEXATTRIB4NBVPROC __glewVertexAttrib4Nbv; extern PFNGLVERTEXATTRIB4NIVPROC __glewVertexAttrib4Niv; extern PFNGLVERTEXATTRIB4NSVPROC __glewVertexAttrib4Nsv; extern PFNGLVERTEXATTRIB4NUBPROC __glewVertexAttrib4Nub; extern PFNGLVERTEXATTRIB4NUBVPROC __glewVertexAttrib4Nubv; extern PFNGLVERTEXATTRIB4NUIVPROC __glewVertexAttrib4Nuiv; extern PFNGLVERTEXATTRIB4NUSVPROC __glewVertexAttrib4Nusv; extern PFNGLVERTEXATTRIB4BVPROC __glewVertexAttrib4bv; extern PFNGLVERTEXATTRIB4DPROC __glewVertexAttrib4d; extern PFNGLVERTEXATTRIB4DVPROC __glewVertexAttrib4dv; extern PFNGLVERTEXATTRIB4FPROC __glewVertexAttrib4f; extern PFNGLVERTEXATTRIB4FVPROC __glewVertexAttrib4fv; extern PFNGLVERTEXATTRIB4IVPROC __glewVertexAttrib4iv; extern PFNGLVERTEXATTRIB4SPROC __glewVertexAttrib4s; extern PFNGLVERTEXATTRIB4SVPROC __glewVertexAttrib4sv; extern PFNGLVERTEXATTRIB4UBVPROC __glewVertexAttrib4ubv; extern PFNGLVERTEXATTRIB4UIVPROC __glewVertexAttrib4uiv; extern PFNGLVERTEXATTRIB4USVPROC __glewVertexAttrib4usv; extern PFNGLVERTEXATTRIBPOINTERPROC __glewVertexAttribPointer; extern PFNGLUNIFORMMATRIX2X3FVPROC __glewUniformMatrix2x3fv; extern PFNGLUNIFORMMATRIX2X4FVPROC __glewUniformMatrix2x4fv; extern PFNGLUNIFORMMATRIX3X2FVPROC __glewUniformMatrix3x2fv; extern PFNGLUNIFORMMATRIX3X4FVPROC __glewUniformMatrix3x4fv; extern PFNGLUNIFORMMATRIX4X2FVPROC __glewUniformMatrix4x2fv; extern PFNGLUNIFORMMATRIX4X3FVPROC __glewUniformMatrix4x3fv; extern PFNGLTBUFFERMASK3DFXPROC __glewTbufferMask3DFX; extern PFNGLDRAWELEMENTARRAYAPPLEPROC __glewDrawElementArrayAPPLE; extern PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC __glewDrawRangeElementArrayAPPLE; extern PFNGLELEMENTPOINTERAPPLEPROC __glewElementPointerAPPLE; extern PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC __glewMultiDrawElementArrayAPPLE; extern PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC __glewMultiDrawRangeElementArrayAPPLE; extern PFNGLDELETEFENCESAPPLEPROC __glewDeleteFencesAPPLE; extern PFNGLFINISHFENCEAPPLEPROC __glewFinishFenceAPPLE; extern PFNGLFINISHOBJECTAPPLEPROC __glewFinishObjectAPPLE; extern PFNGLGENFENCESAPPLEPROC __glewGenFencesAPPLE; extern PFNGLISFENCEAPPLEPROC __glewIsFenceAPPLE; extern PFNGLSETFENCEAPPLEPROC __glewSetFenceAPPLE; extern PFNGLTESTFENCEAPPLEPROC __glewTestFenceAPPLE; extern PFNGLTESTOBJECTAPPLEPROC __glewTestObjectAPPLE; extern PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC __glewGetTexParameterPointervAPPLE; extern PFNGLTEXTURERANGEAPPLEPROC __glewTextureRangeAPPLE; extern PFNGLBINDVERTEXARRAYAPPLEPROC __glewBindVertexArrayAPPLE; extern PFNGLDELETEVERTEXARRAYSAPPLEPROC __glewDeleteVertexArraysAPPLE; extern PFNGLGENVERTEXARRAYSAPPLEPROC __glewGenVertexArraysAPPLE; extern PFNGLISVERTEXARRAYAPPLEPROC __glewIsVertexArrayAPPLE; extern PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC __glewFlushVertexArrayRangeAPPLE; extern PFNGLVERTEXARRAYPARAMETERIAPPLEPROC __glewVertexArrayParameteriAPPLE; extern PFNGLVERTEXARRAYRANGEAPPLEPROC __glewVertexArrayRangeAPPLE; extern PFNGLCLAMPCOLORARBPROC __glewClampColorARB; extern PFNGLDRAWBUFFERSARBPROC __glewDrawBuffersARB; extern PFNGLCOLORSUBTABLEPROC __glewColorSubTable; extern PFNGLCOLORTABLEPROC __glewColorTable; extern PFNGLCOLORTABLEPARAMETERFVPROC __glewColorTableParameterfv; extern PFNGLCOLORTABLEPARAMETERIVPROC __glewColorTableParameteriv; extern PFNGLCONVOLUTIONFILTER1DPROC __glewConvolutionFilter1D; extern PFNGLCONVOLUTIONFILTER2DPROC __glewConvolutionFilter2D; extern PFNGLCONVOLUTIONPARAMETERFPROC __glewConvolutionParameterf; extern PFNGLCONVOLUTIONPARAMETERFVPROC __glewConvolutionParameterfv; extern PFNGLCONVOLUTIONPARAMETERIPROC __glewConvolutionParameteri; extern PFNGLCONVOLUTIONPARAMETERIVPROC __glewConvolutionParameteriv; extern PFNGLCOPYCOLORSUBTABLEPROC __glewCopyColorSubTable; extern PFNGLCOPYCOLORTABLEPROC __glewCopyColorTable; extern PFNGLCOPYCONVOLUTIONFILTER1DPROC __glewCopyConvolutionFilter1D; extern PFNGLCOPYCONVOLUTIONFILTER2DPROC __glewCopyConvolutionFilter2D; extern PFNGLGETCOLORTABLEPROC __glewGetColorTable; extern PFNGLGETCOLORTABLEPARAMETERFVPROC __glewGetColorTableParameterfv; extern PFNGLGETCOLORTABLEPARAMETERIVPROC __glewGetColorTableParameteriv; extern PFNGLGETCONVOLUTIONFILTERPROC __glewGetConvolutionFilter; extern PFNGLGETCONVOLUTIONPARAMETERFVPROC __glewGetConvolutionParameterfv; extern PFNGLGETCONVOLUTIONPARAMETERIVPROC __glewGetConvolutionParameteriv; extern PFNGLGETHISTOGRAMPROC __glewGetHistogram; extern PFNGLGETHISTOGRAMPARAMETERFVPROC __glewGetHistogramParameterfv; extern PFNGLGETHISTOGRAMPARAMETERIVPROC __glewGetHistogramParameteriv; extern PFNGLGETMINMAXPROC __glewGetMinmax; extern PFNGLGETMINMAXPARAMETERFVPROC __glewGetMinmaxParameterfv; extern PFNGLGETMINMAXPARAMETERIVPROC __glewGetMinmaxParameteriv; extern PFNGLGETSEPARABLEFILTERPROC __glewGetSeparableFilter; extern PFNGLHISTOGRAMPROC __glewHistogram; extern PFNGLMINMAXPROC __glewMinmax; extern PFNGLRESETHISTOGRAMPROC __glewResetHistogram; extern PFNGLRESETMINMAXPROC __glewResetMinmax; extern PFNGLSEPARABLEFILTER2DPROC __glewSeparableFilter2D; extern PFNGLCURRENTPALETTEMATRIXARBPROC __glewCurrentPaletteMatrixARB; extern PFNGLMATRIXINDEXPOINTERARBPROC __glewMatrixIndexPointerARB; extern PFNGLMATRIXINDEXUBVARBPROC __glewMatrixIndexubvARB; extern PFNGLMATRIXINDEXUIVARBPROC __glewMatrixIndexuivARB; extern PFNGLMATRIXINDEXUSVARBPROC __glewMatrixIndexusvARB; extern PFNGLSAMPLECOVERAGEARBPROC __glewSampleCoverageARB; extern PFNGLACTIVETEXTUREARBPROC __glewActiveTextureARB; extern PFNGLCLIENTACTIVETEXTUREARBPROC __glewClientActiveTextureARB; extern PFNGLMULTITEXCOORD1DARBPROC __glewMultiTexCoord1dARB; extern PFNGLMULTITEXCOORD1DVARBPROC __glewMultiTexCoord1dvARB; extern PFNGLMULTITEXCOORD1FARBPROC __glewMultiTexCoord1fARB; extern PFNGLMULTITEXCOORD1FVARBPROC __glewMultiTexCoord1fvARB; extern PFNGLMULTITEXCOORD1IARBPROC __glewMultiTexCoord1iARB; extern PFNGLMULTITEXCOORD1IVARBPROC __glewMultiTexCoord1ivARB; extern PFNGLMULTITEXCOORD1SARBPROC __glewMultiTexCoord1sARB; extern PFNGLMULTITEXCOORD1SVARBPROC __glewMultiTexCoord1svARB; extern PFNGLMULTITEXCOORD2DARBPROC __glewMultiTexCoord2dARB; extern PFNGLMULTITEXCOORD2DVARBPROC __glewMultiTexCoord2dvARB; extern PFNGLMULTITEXCOORD2FARBPROC __glewMultiTexCoord2fARB; extern PFNGLMULTITEXCOORD2FVARBPROC __glewMultiTexCoord2fvARB; extern PFNGLMULTITEXCOORD2IARBPROC __glewMultiTexCoord2iARB; extern PFNGLMULTITEXCOORD2IVARBPROC __glewMultiTexCoord2ivARB; extern PFNGLMULTITEXCOORD2SARBPROC __glewMultiTexCoord2sARB; extern PFNGLMULTITEXCOORD2SVARBPROC __glewMultiTexCoord2svARB; extern PFNGLMULTITEXCOORD3DARBPROC __glewMultiTexCoord3dARB; extern PFNGLMULTITEXCOORD3DVARBPROC __glewMultiTexCoord3dvARB; extern PFNGLMULTITEXCOORD3FARBPROC __glewMultiTexCoord3fARB; extern PFNGLMULTITEXCOORD3FVARBPROC __glewMultiTexCoord3fvARB; extern PFNGLMULTITEXCOORD3IARBPROC __glewMultiTexCoord3iARB; extern PFNGLMULTITEXCOORD3IVARBPROC __glewMultiTexCoord3ivARB; extern PFNGLMULTITEXCOORD3SARBPROC __glewMultiTexCoord3sARB; extern PFNGLMULTITEXCOORD3SVARBPROC __glewMultiTexCoord3svARB; extern PFNGLMULTITEXCOORD4DARBPROC __glewMultiTexCoord4dARB; extern PFNGLMULTITEXCOORD4DVARBPROC __glewMultiTexCoord4dvARB; extern PFNGLMULTITEXCOORD4FARBPROC __glewMultiTexCoord4fARB; extern PFNGLMULTITEXCOORD4FVARBPROC __glewMultiTexCoord4fvARB; extern PFNGLMULTITEXCOORD4IARBPROC __glewMultiTexCoord4iARB; extern PFNGLMULTITEXCOORD4IVARBPROC __glewMultiTexCoord4ivARB; extern PFNGLMULTITEXCOORD4SARBPROC __glewMultiTexCoord4sARB; extern PFNGLMULTITEXCOORD4SVARBPROC __glewMultiTexCoord4svARB; extern PFNGLBEGINQUERYARBPROC __glewBeginQueryARB; extern PFNGLDELETEQUERIESARBPROC __glewDeleteQueriesARB; extern PFNGLENDQUERYARBPROC __glewEndQueryARB; extern PFNGLGENQUERIESARBPROC __glewGenQueriesARB; extern PFNGLGETQUERYOBJECTIVARBPROC __glewGetQueryObjectivARB; extern PFNGLGETQUERYOBJECTUIVARBPROC __glewGetQueryObjectuivARB; extern PFNGLGETQUERYIVARBPROC __glewGetQueryivARB; extern PFNGLISQUERYARBPROC __glewIsQueryARB; extern PFNGLPOINTPARAMETERFARBPROC __glewPointParameterfARB; extern PFNGLPOINTPARAMETERFVARBPROC __glewPointParameterfvARB; extern PFNGLATTACHOBJECTARBPROC __glewAttachObjectARB; extern PFNGLCOMPILESHADERARBPROC __glewCompileShaderARB; extern PFNGLCREATEPROGRAMOBJECTARBPROC __glewCreateProgramObjectARB; extern PFNGLCREATESHADEROBJECTARBPROC __glewCreateShaderObjectARB; extern PFNGLDELETEOBJECTARBPROC __glewDeleteObjectARB; extern PFNGLDETACHOBJECTARBPROC __glewDetachObjectARB; extern PFNGLGETACTIVEUNIFORMARBPROC __glewGetActiveUniformARB; extern PFNGLGETATTACHEDOBJECTSARBPROC __glewGetAttachedObjectsARB; extern PFNGLGETHANDLEARBPROC __glewGetHandleARB; extern PFNGLGETINFOLOGARBPROC __glewGetInfoLogARB; extern PFNGLGETOBJECTPARAMETERFVARBPROC __glewGetObjectParameterfvARB; extern PFNGLGETOBJECTPARAMETERIVARBPROC __glewGetObjectParameterivARB; extern PFNGLGETSHADERSOURCEARBPROC __glewGetShaderSourceARB; extern PFNGLGETUNIFORMLOCATIONARBPROC __glewGetUniformLocationARB; extern PFNGLGETUNIFORMFVARBPROC __glewGetUniformfvARB; extern PFNGLGETUNIFORMIVARBPROC __glewGetUniformivARB; extern PFNGLLINKPROGRAMARBPROC __glewLinkProgramARB; extern PFNGLSHADERSOURCEARBPROC __glewShaderSourceARB; extern PFNGLUNIFORM1FARBPROC __glewUniform1fARB; extern PFNGLUNIFORM1FVARBPROC __glewUniform1fvARB; extern PFNGLUNIFORM1IARBPROC __glewUniform1iARB; extern PFNGLUNIFORM1IVARBPROC __glewUniform1ivARB; extern PFNGLUNIFORM2FARBPROC __glewUniform2fARB; extern PFNGLUNIFORM2FVARBPROC __glewUniform2fvARB; extern PFNGLUNIFORM2IARBPROC __glewUniform2iARB; extern PFNGLUNIFORM2IVARBPROC __glewUniform2ivARB; extern PFNGLUNIFORM3FARBPROC __glewUniform3fARB; extern PFNGLUNIFORM3FVARBPROC __glewUniform3fvARB; extern PFNGLUNIFORM3IARBPROC __glewUniform3iARB; extern PFNGLUNIFORM3IVARBPROC __glewUniform3ivARB; extern PFNGLUNIFORM4FARBPROC __glewUniform4fARB; extern PFNGLUNIFORM4FVARBPROC __glewUniform4fvARB; extern PFNGLUNIFORM4IARBPROC __glewUniform4iARB; extern PFNGLUNIFORM4IVARBPROC __glewUniform4ivARB; extern PFNGLUNIFORMMATRIX2FVARBPROC __glewUniformMatrix2fvARB; extern PFNGLUNIFORMMATRIX3FVARBPROC __glewUniformMatrix3fvARB; extern PFNGLUNIFORMMATRIX4FVARBPROC __glewUniformMatrix4fvARB; extern PFNGLUSEPROGRAMOBJECTARBPROC __glewUseProgramObjectARB; extern PFNGLVALIDATEPROGRAMARBPROC __glewValidateProgramARB; extern PFNGLCOMPRESSEDTEXIMAGE1DARBPROC __glewCompressedTexImage1DARB; extern PFNGLCOMPRESSEDTEXIMAGE2DARBPROC __glewCompressedTexImage2DARB; extern PFNGLCOMPRESSEDTEXIMAGE3DARBPROC __glewCompressedTexImage3DARB; extern PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC __glewCompressedTexSubImage1DARB; extern PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC __glewCompressedTexSubImage2DARB; extern PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC __glewCompressedTexSubImage3DARB; extern PFNGLGETCOMPRESSEDTEXIMAGEARBPROC __glewGetCompressedTexImageARB; extern PFNGLLOADTRANSPOSEMATRIXDARBPROC __glewLoadTransposeMatrixdARB; extern PFNGLLOADTRANSPOSEMATRIXFARBPROC __glewLoadTransposeMatrixfARB; extern PFNGLMULTTRANSPOSEMATRIXDARBPROC __glewMultTransposeMatrixdARB; extern PFNGLMULTTRANSPOSEMATRIXFARBPROC __glewMultTransposeMatrixfARB; extern PFNGLVERTEXBLENDARBPROC __glewVertexBlendARB; extern PFNGLWEIGHTPOINTERARBPROC __glewWeightPointerARB; extern PFNGLWEIGHTBVARBPROC __glewWeightbvARB; extern PFNGLWEIGHTDVARBPROC __glewWeightdvARB; extern PFNGLWEIGHTFVARBPROC __glewWeightfvARB; extern PFNGLWEIGHTIVARBPROC __glewWeightivARB; extern PFNGLWEIGHTSVARBPROC __glewWeightsvARB; extern PFNGLWEIGHTUBVARBPROC __glewWeightubvARB; extern PFNGLWEIGHTUIVARBPROC __glewWeightuivARB; extern PFNGLWEIGHTUSVARBPROC __glewWeightusvARB; extern PFNGLBINDBUFFERARBPROC __glewBindBufferARB; extern PFNGLBUFFERDATAARBPROC __glewBufferDataARB; extern PFNGLBUFFERSUBDATAARBPROC __glewBufferSubDataARB; extern PFNGLDELETEBUFFERSARBPROC __glewDeleteBuffersARB; extern PFNGLGENBUFFERSARBPROC __glewGenBuffersARB; extern PFNGLGETBUFFERPARAMETERIVARBPROC __glewGetBufferParameterivARB; extern PFNGLGETBUFFERPOINTERVARBPROC __glewGetBufferPointervARB; extern PFNGLGETBUFFERSUBDATAARBPROC __glewGetBufferSubDataARB; extern PFNGLISBUFFERARBPROC __glewIsBufferARB; extern PFNGLMAPBUFFERARBPROC __glewMapBufferARB; extern PFNGLUNMAPBUFFERARBPROC __glewUnmapBufferARB; extern PFNGLBINDPROGRAMARBPROC __glewBindProgramARB; extern PFNGLDELETEPROGRAMSARBPROC __glewDeleteProgramsARB; extern PFNGLDISABLEVERTEXATTRIBARRAYARBPROC __glewDisableVertexAttribArrayARB; extern PFNGLENABLEVERTEXATTRIBARRAYARBPROC __glewEnableVertexAttribArrayARB; extern PFNGLGENPROGRAMSARBPROC __glewGenProgramsARB; extern PFNGLGETPROGRAMENVPARAMETERDVARBPROC __glewGetProgramEnvParameterdvARB; extern PFNGLGETPROGRAMENVPARAMETERFVARBPROC __glewGetProgramEnvParameterfvARB; extern PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC __glewGetProgramLocalParameterdvARB; extern PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC __glewGetProgramLocalParameterfvARB; extern PFNGLGETPROGRAMSTRINGARBPROC __glewGetProgramStringARB; extern PFNGLGETPROGRAMIVARBPROC __glewGetProgramivARB; extern PFNGLGETVERTEXATTRIBPOINTERVARBPROC __glewGetVertexAttribPointervARB; extern PFNGLGETVERTEXATTRIBDVARBPROC __glewGetVertexAttribdvARB; extern PFNGLGETVERTEXATTRIBFVARBPROC __glewGetVertexAttribfvARB; extern PFNGLGETVERTEXATTRIBIVARBPROC __glewGetVertexAttribivARB; extern PFNGLISPROGRAMARBPROC __glewIsProgramARB; extern PFNGLPROGRAMENVPARAMETER4DARBPROC __glewProgramEnvParameter4dARB; extern PFNGLPROGRAMENVPARAMETER4DVARBPROC __glewProgramEnvParameter4dvARB; extern PFNGLPROGRAMENVPARAMETER4FARBPROC __glewProgramEnvParameter4fARB; extern PFNGLPROGRAMENVPARAMETER4FVARBPROC __glewProgramEnvParameter4fvARB; extern PFNGLPROGRAMLOCALPARAMETER4DARBPROC __glewProgramLocalParameter4dARB; extern PFNGLPROGRAMLOCALPARAMETER4DVARBPROC __glewProgramLocalParameter4dvARB; extern PFNGLPROGRAMLOCALPARAMETER4FARBPROC __glewProgramLocalParameter4fARB; extern PFNGLPROGRAMLOCALPARAMETER4FVARBPROC __glewProgramLocalParameter4fvARB; extern PFNGLPROGRAMSTRINGARBPROC __glewProgramStringARB; extern PFNGLVERTEXATTRIB1DARBPROC __glewVertexAttrib1dARB; extern PFNGLVERTEXATTRIB1DVARBPROC __glewVertexAttrib1dvARB; extern PFNGLVERTEXATTRIB1FARBPROC __glewVertexAttrib1fARB; extern PFNGLVERTEXATTRIB1FVARBPROC __glewVertexAttrib1fvARB; extern PFNGLVERTEXATTRIB1SARBPROC __glewVertexAttrib1sARB; extern PFNGLVERTEXATTRIB1SVARBPROC __glewVertexAttrib1svARB; extern PFNGLVERTEXATTRIB2DARBPROC __glewVertexAttrib2dARB; extern PFNGLVERTEXATTRIB2DVARBPROC __glewVertexAttrib2dvARB; extern PFNGLVERTEXATTRIB2FARBPROC __glewVertexAttrib2fARB; extern PFNGLVERTEXATTRIB2FVARBPROC __glewVertexAttrib2fvARB; extern PFNGLVERTEXATTRIB2SARBPROC __glewVertexAttrib2sARB; extern PFNGLVERTEXATTRIB2SVARBPROC __glewVertexAttrib2svARB; extern PFNGLVERTEXATTRIB3DARBPROC __glewVertexAttrib3dARB; extern PFNGLVERTEXATTRIB3DVARBPROC __glewVertexAttrib3dvARB; extern PFNGLVERTEXATTRIB3FARBPROC __glewVertexAttrib3fARB; extern PFNGLVERTEXATTRIB3FVARBPROC __glewVertexAttrib3fvARB; extern PFNGLVERTEXATTRIB3SARBPROC __glewVertexAttrib3sARB; extern PFNGLVERTEXATTRIB3SVARBPROC __glewVertexAttrib3svARB; extern PFNGLVERTEXATTRIB4NBVARBPROC __glewVertexAttrib4NbvARB; extern PFNGLVERTEXATTRIB4NIVARBPROC __glewVertexAttrib4NivARB; extern PFNGLVERTEXATTRIB4NSVARBPROC __glewVertexAttrib4NsvARB; extern PFNGLVERTEXATTRIB4NUBARBPROC __glewVertexAttrib4NubARB; extern PFNGLVERTEXATTRIB4NUBVARBPROC __glewVertexAttrib4NubvARB; extern PFNGLVERTEXATTRIB4NUIVARBPROC __glewVertexAttrib4NuivARB; extern PFNGLVERTEXATTRIB4NUSVARBPROC __glewVertexAttrib4NusvARB; extern PFNGLVERTEXATTRIB4BVARBPROC __glewVertexAttrib4bvARB; extern PFNGLVERTEXATTRIB4DARBPROC __glewVertexAttrib4dARB; extern PFNGLVERTEXATTRIB4DVARBPROC __glewVertexAttrib4dvARB; extern PFNGLVERTEXATTRIB4FARBPROC __glewVertexAttrib4fARB; extern PFNGLVERTEXATTRIB4FVARBPROC __glewVertexAttrib4fvARB; extern PFNGLVERTEXATTRIB4IVARBPROC __glewVertexAttrib4ivARB; extern PFNGLVERTEXATTRIB4SARBPROC __glewVertexAttrib4sARB; extern PFNGLVERTEXATTRIB4SVARBPROC __glewVertexAttrib4svARB; extern PFNGLVERTEXATTRIB4UBVARBPROC __glewVertexAttrib4ubvARB; extern PFNGLVERTEXATTRIB4UIVARBPROC __glewVertexAttrib4uivARB; extern PFNGLVERTEXATTRIB4USVARBPROC __glewVertexAttrib4usvARB; extern PFNGLVERTEXATTRIBPOINTERARBPROC __glewVertexAttribPointerARB; extern PFNGLBINDATTRIBLOCATIONARBPROC __glewBindAttribLocationARB; extern PFNGLGETACTIVEATTRIBARBPROC __glewGetActiveAttribARB; extern PFNGLGETATTRIBLOCATIONARBPROC __glewGetAttribLocationARB; extern PFNGLWINDOWPOS2DARBPROC __glewWindowPos2dARB; extern PFNGLWINDOWPOS2DVARBPROC __glewWindowPos2dvARB; extern PFNGLWINDOWPOS2FARBPROC __glewWindowPos2fARB; extern PFNGLWINDOWPOS2FVARBPROC __glewWindowPos2fvARB; extern PFNGLWINDOWPOS2IARBPROC __glewWindowPos2iARB; extern PFNGLWINDOWPOS2IVARBPROC __glewWindowPos2ivARB; extern PFNGLWINDOWPOS2SARBPROC __glewWindowPos2sARB; extern PFNGLWINDOWPOS2SVARBPROC __glewWindowPos2svARB; extern PFNGLWINDOWPOS3DARBPROC __glewWindowPos3dARB; extern PFNGLWINDOWPOS3DVARBPROC __glewWindowPos3dvARB; extern PFNGLWINDOWPOS3FARBPROC __glewWindowPos3fARB; extern PFNGLWINDOWPOS3FVARBPROC __glewWindowPos3fvARB; extern PFNGLWINDOWPOS3IARBPROC __glewWindowPos3iARB; extern PFNGLWINDOWPOS3IVARBPROC __glewWindowPos3ivARB; extern PFNGLWINDOWPOS3SARBPROC __glewWindowPos3sARB; extern PFNGLWINDOWPOS3SVARBPROC __glewWindowPos3svARB; extern PFNGLDRAWBUFFERSATIPROC __glewDrawBuffersATI; extern PFNGLDRAWELEMENTARRAYATIPROC __glewDrawElementArrayATI; extern PFNGLDRAWRANGEELEMENTARRAYATIPROC __glewDrawRangeElementArrayATI; extern PFNGLELEMENTPOINTERATIPROC __glewElementPointerATI; extern PFNGLGETTEXBUMPPARAMETERFVATIPROC __glewGetTexBumpParameterfvATI; extern PFNGLGETTEXBUMPPARAMETERIVATIPROC __glewGetTexBumpParameterivATI; extern PFNGLTEXBUMPPARAMETERFVATIPROC __glewTexBumpParameterfvATI; extern PFNGLTEXBUMPPARAMETERIVATIPROC __glewTexBumpParameterivATI; extern PFNGLALPHAFRAGMENTOP1ATIPROC __glewAlphaFragmentOp1ATI; extern PFNGLALPHAFRAGMENTOP2ATIPROC __glewAlphaFragmentOp2ATI; extern PFNGLALPHAFRAGMENTOP3ATIPROC __glewAlphaFragmentOp3ATI; extern PFNGLBEGINFRAGMENTSHADERATIPROC __glewBeginFragmentShaderATI; extern PFNGLBINDFRAGMENTSHADERATIPROC __glewBindFragmentShaderATI; extern PFNGLCOLORFRAGMENTOP1ATIPROC __glewColorFragmentOp1ATI; extern PFNGLCOLORFRAGMENTOP2ATIPROC __glewColorFragmentOp2ATI; extern PFNGLCOLORFRAGMENTOP3ATIPROC __glewColorFragmentOp3ATI; extern PFNGLDELETEFRAGMENTSHADERATIPROC __glewDeleteFragmentShaderATI; extern PFNGLENDFRAGMENTSHADERATIPROC __glewEndFragmentShaderATI; extern PFNGLGENFRAGMENTSHADERSATIPROC __glewGenFragmentShadersATI; extern PFNGLPASSTEXCOORDATIPROC __glewPassTexCoordATI; extern PFNGLSAMPLEMAPATIPROC __glewSampleMapATI; extern PFNGLSETFRAGMENTSHADERCONSTANTATIPROC __glewSetFragmentShaderConstantATI; extern PFNGLMAPOBJECTBUFFERATIPROC __glewMapObjectBufferATI; extern PFNGLUNMAPOBJECTBUFFERATIPROC __glewUnmapObjectBufferATI; extern PFNGLPNTRIANGLESFATIPROC __glPNTrianglewesfATI; extern PFNGLPNTRIANGLESIATIPROC __glPNTrianglewesiATI; extern PFNGLSTENCILFUNCSEPARATEATIPROC __glewStencilFuncSeparateATI; extern PFNGLSTENCILOPSEPARATEATIPROC __glewStencilOpSeparateATI; extern PFNGLARRAYOBJECTATIPROC __glewArrayObjectATI; extern PFNGLFREEOBJECTBUFFERATIPROC __glewFreeObjectBufferATI; extern PFNGLGETARRAYOBJECTFVATIPROC __glewGetArrayObjectfvATI; extern PFNGLGETARRAYOBJECTIVATIPROC __glewGetArrayObjectivATI; extern PFNGLGETOBJECTBUFFERFVATIPROC __glewGetObjectBufferfvATI; extern PFNGLGETOBJECTBUFFERIVATIPROC __glewGetObjectBufferivATI; extern PFNGLGETVARIANTARRAYOBJECTFVATIPROC __glewGetVariantArrayObjectfvATI; extern PFNGLGETVARIANTARRAYOBJECTIVATIPROC __glewGetVariantArrayObjectivATI; extern PFNGLISOBJECTBUFFERATIPROC __glewIsObjectBufferATI; extern PFNGLNEWOBJECTBUFFERATIPROC __glewNewObjectBufferATI; extern PFNGLUPDATEOBJECTBUFFERATIPROC __glewUpdateObjectBufferATI; extern PFNGLVARIANTARRAYOBJECTATIPROC __glewVariantArrayObjectATI; extern PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC __glewGetVertexAttribArrayObjectfvATI; extern PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC __glewGetVertexAttribArrayObjectivATI; extern PFNGLVERTEXATTRIBARRAYOBJECTATIPROC __glewVertexAttribArrayObjectATI; extern PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC __glewClientActiveVertexStreamATI; extern PFNGLNORMALSTREAM3BATIPROC __glewNormalStream3bATI; extern PFNGLNORMALSTREAM3BVATIPROC __glewNormalStream3bvATI; extern PFNGLNORMALSTREAM3DATIPROC __glewNormalStream3dATI; extern PFNGLNORMALSTREAM3DVATIPROC __glewNormalStream3dvATI; extern PFNGLNORMALSTREAM3FATIPROC __glewNormalStream3fATI; extern PFNGLNORMALSTREAM3FVATIPROC __glewNormalStream3fvATI; extern PFNGLNORMALSTREAM3IATIPROC __glewNormalStream3iATI; extern PFNGLNORMALSTREAM3IVATIPROC __glewNormalStream3ivATI; extern PFNGLNORMALSTREAM3SATIPROC __glewNormalStream3sATI; extern PFNGLNORMALSTREAM3SVATIPROC __glewNormalStream3svATI; extern PFNGLVERTEXBLENDENVFATIPROC __glewVertexBlendEnvfATI; extern PFNGLVERTEXBLENDENVIATIPROC __glewVertexBlendEnviATI; extern PFNGLVERTEXSTREAM2DATIPROC __glewVertexStream2dATI; extern PFNGLVERTEXSTREAM2DVATIPROC __glewVertexStream2dvATI; extern PFNGLVERTEXSTREAM2FATIPROC __glewVertexStream2fATI; extern PFNGLVERTEXSTREAM2FVATIPROC __glewVertexStream2fvATI; extern PFNGLVERTEXSTREAM2IATIPROC __glewVertexStream2iATI; extern PFNGLVERTEXSTREAM2IVATIPROC __glewVertexStream2ivATI; extern PFNGLVERTEXSTREAM2SATIPROC __glewVertexStream2sATI; extern PFNGLVERTEXSTREAM2SVATIPROC __glewVertexStream2svATI; extern PFNGLVERTEXSTREAM3DATIPROC __glewVertexStream3dATI; extern PFNGLVERTEXSTREAM3DVATIPROC __glewVertexStream3dvATI; extern PFNGLVERTEXSTREAM3FATIPROC __glewVertexStream3fATI; extern PFNGLVERTEXSTREAM3FVATIPROC __glewVertexStream3fvATI; extern PFNGLVERTEXSTREAM3IATIPROC __glewVertexStream3iATI; extern PFNGLVERTEXSTREAM3IVATIPROC __glewVertexStream3ivATI; extern PFNGLVERTEXSTREAM3SATIPROC __glewVertexStream3sATI; extern PFNGLVERTEXSTREAM3SVATIPROC __glewVertexStream3svATI; extern PFNGLVERTEXSTREAM4DATIPROC __glewVertexStream4dATI; extern PFNGLVERTEXSTREAM4DVATIPROC __glewVertexStream4dvATI; extern PFNGLVERTEXSTREAM4FATIPROC __glewVertexStream4fATI; extern PFNGLVERTEXSTREAM4FVATIPROC __glewVertexStream4fvATI; extern PFNGLVERTEXSTREAM4IATIPROC __glewVertexStream4iATI; extern PFNGLVERTEXSTREAM4IVATIPROC __glewVertexStream4ivATI; extern PFNGLVERTEXSTREAM4SATIPROC __glewVertexStream4sATI; extern PFNGLVERTEXSTREAM4SVATIPROC __glewVertexStream4svATI; extern PFNGLGETUNIFORMBUFFERSIZEEXTPROC __glewGetUniformBufferSizeEXT; extern PFNGLGETUNIFORMOFFSETEXTPROC __glewGetUniformOffsetEXT; extern PFNGLUNIFORMBUFFEREXTPROC __glewUniformBufferEXT; extern PFNGLBLENDCOLOREXTPROC __glewBlendColorEXT; extern PFNGLBLENDEQUATIONSEPARATEEXTPROC __glewBlendEquationSeparateEXT; extern PFNGLBLENDFUNCSEPARATEEXTPROC __glewBlendFuncSeparateEXT; extern PFNGLBLENDEQUATIONEXTPROC __glewBlendEquationEXT; extern PFNGLCOLORSUBTABLEEXTPROC __glewColorSubTableEXT; extern PFNGLCOPYCOLORSUBTABLEEXTPROC __glewCopyColorSubTableEXT; extern PFNGLLOCKARRAYSEXTPROC __glewLockArraysEXT; extern PFNGLUNLOCKARRAYSEXTPROC __glewUnlockArraysEXT; extern PFNGLCONVOLUTIONFILTER1DEXTPROC __glewConvolutionFilter1DEXT; extern PFNGLCONVOLUTIONFILTER2DEXTPROC __glewConvolutionFilter2DEXT; extern PFNGLCONVOLUTIONPARAMETERFEXTPROC __glewConvolutionParameterfEXT; extern PFNGLCONVOLUTIONPARAMETERFVEXTPROC __glewConvolutionParameterfvEXT; extern PFNGLCONVOLUTIONPARAMETERIEXTPROC __glewConvolutionParameteriEXT; extern PFNGLCONVOLUTIONPARAMETERIVEXTPROC __glewConvolutionParameterivEXT; extern PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC __glewCopyConvolutionFilter1DEXT; extern PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC __glewCopyConvolutionFilter2DEXT; extern PFNGLGETCONVOLUTIONFILTEREXTPROC __glewGetConvolutionFilterEXT; extern PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC __glewGetConvolutionParameterfvEXT; extern PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC __glewGetConvolutionParameterivEXT; extern PFNGLGETSEPARABLEFILTEREXTPROC __glewGetSeparableFilterEXT; extern PFNGLSEPARABLEFILTER2DEXTPROC __glewSeparableFilter2DEXT; extern PFNGLBINORMALPOINTEREXTPROC __glewBinormalPointerEXT; extern PFNGLTANGENTPOINTEREXTPROC __glewTangentPointerEXT; extern PFNGLCOPYTEXIMAGE1DEXTPROC __glewCopyTexImage1DEXT; extern PFNGLCOPYTEXIMAGE2DEXTPROC __glewCopyTexImage2DEXT; extern PFNGLCOPYTEXSUBIMAGE1DEXTPROC __glewCopyTexSubImage1DEXT; extern PFNGLCOPYTEXSUBIMAGE2DEXTPROC __glewCopyTexSubImage2DEXT; extern PFNGLCOPYTEXSUBIMAGE3DEXTPROC __glewCopyTexSubImage3DEXT; extern PFNGLCULLPARAMETERDVEXTPROC __glewCullParameterdvEXT; extern PFNGLCULLPARAMETERFVEXTPROC __glewCullParameterfvEXT; extern PFNGLDEPTHBOUNDSEXTPROC __glewDepthBoundsEXT; extern PFNGLCOLORMASKINDEXEDEXTPROC __glewColorMaskIndexedEXT; extern PFNGLDISABLEINDEXEDEXTPROC __glewDisableIndexedEXT; extern PFNGLENABLEINDEXEDEXTPROC __glewEnableIndexedEXT; extern PFNGLGETBOOLEANINDEXEDVEXTPROC __glewGetBooleanIndexedvEXT; extern PFNGLGETINTEGERINDEXEDVEXTPROC __glewGetIntegerIndexedvEXT; extern PFNGLISENABLEDINDEXEDEXTPROC __glewIsEnabledIndexedEXT; extern PFNGLDRAWARRAYSINSTANCEDEXTPROC __glewDrawArraysInstancedEXT; extern PFNGLDRAWELEMENTSINSTANCEDEXTPROC __glewDrawElementsInstancedEXT; extern PFNGLDRAWRANGEELEMENTSEXTPROC __glewDrawRangeElementsEXT; extern PFNGLFOGCOORDPOINTEREXTPROC __glewFogCoordPointerEXT; extern PFNGLFOGCOORDDEXTPROC __glewFogCoorddEXT; extern PFNGLFOGCOORDDVEXTPROC __glewFogCoorddvEXT; extern PFNGLFOGCOORDFEXTPROC __glewFogCoordfEXT; extern PFNGLFOGCOORDFVEXTPROC __glewFogCoordfvEXT; extern PFNGLFRAGMENTCOLORMATERIALEXTPROC __glewFragmentColorMaterialEXT; extern PFNGLFRAGMENTLIGHTMODELFEXTPROC __glewFragmentLightModelfEXT; extern PFNGLFRAGMENTLIGHTMODELFVEXTPROC __glewFragmentLightModelfvEXT; extern PFNGLFRAGMENTLIGHTMODELIEXTPROC __glewFragmentLightModeliEXT; extern PFNGLFRAGMENTLIGHTMODELIVEXTPROC __glewFragmentLightModelivEXT; extern PFNGLFRAGMENTLIGHTFEXTPROC __glewFragmentLightfEXT; extern PFNGLFRAGMENTLIGHTFVEXTPROC __glewFragmentLightfvEXT; extern PFNGLFRAGMENTLIGHTIEXTPROC __glewFragmentLightiEXT; extern PFNGLFRAGMENTLIGHTIVEXTPROC __glewFragmentLightivEXT; extern PFNGLFRAGMENTMATERIALFEXTPROC __glewFragmentMaterialfEXT; extern PFNGLFRAGMENTMATERIALFVEXTPROC __glewFragmentMaterialfvEXT; extern PFNGLFRAGMENTMATERIALIEXTPROC __glewFragmentMaterialiEXT; extern PFNGLFRAGMENTMATERIALIVEXTPROC __glewFragmentMaterialivEXT; extern PFNGLGETFRAGMENTLIGHTFVEXTPROC __glewGetFragmentLightfvEXT; extern PFNGLGETFRAGMENTLIGHTIVEXTPROC __glewGetFragmentLightivEXT; extern PFNGLGETFRAGMENTMATERIALFVEXTPROC __glewGetFragmentMaterialfvEXT; extern PFNGLGETFRAGMENTMATERIALIVEXTPROC __glewGetFragmentMaterialivEXT; extern PFNGLLIGHTENVIEXTPROC __glewLightEnviEXT; extern PFNGLBLITFRAMEBUFFEREXTPROC __glewBlitFramebufferEXT; extern PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC __glewRenderbufferStorageMultisampleEXT; extern PFNGLBINDFRAMEBUFFEREXTPROC __glewBindFramebufferEXT; extern PFNGLBINDRENDERBUFFEREXTPROC __glewBindRenderbufferEXT; extern PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC __glewCheckFramebufferStatusEXT; extern PFNGLDELETEFRAMEBUFFERSEXTPROC __glewDeleteFramebuffersEXT; extern PFNGLDELETERENDERBUFFERSEXTPROC __glewDeleteRenderbuffersEXT; extern PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC __glewFramebufferRenderbufferEXT; extern PFNGLFRAMEBUFFERTEXTURE1DEXTPROC __glewFramebufferTexture1DEXT; extern PFNGLFRAMEBUFFERTEXTURE2DEXTPROC __glewFramebufferTexture2DEXT; extern PFNGLFRAMEBUFFERTEXTURE3DEXTPROC __glewFramebufferTexture3DEXT; extern PFNGLGENFRAMEBUFFERSEXTPROC __glewGenFramebuffersEXT; extern PFNGLGENRENDERBUFFERSEXTPROC __glewGenRenderbuffersEXT; extern PFNGLGENERATEMIPMAPEXTPROC __glewGenerateMipmapEXT; extern PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC __glewGetFramebufferAttachmentParameterivEXT; extern PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC __glewGetRenderbufferParameterivEXT; extern PFNGLISFRAMEBUFFEREXTPROC __glewIsFramebufferEXT; extern PFNGLISRENDERBUFFEREXTPROC __glewIsRenderbufferEXT; extern PFNGLRENDERBUFFERSTORAGEEXTPROC __glewRenderbufferStorageEXT; extern PFNGLFRAMEBUFFERTEXTUREEXTPROC __glewFramebufferTextureEXT; extern PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC __glewFramebufferTextureFaceEXT; extern PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC __glewFramebufferTextureLayerEXT; extern PFNGLPROGRAMPARAMETERIEXTPROC __glewProgramParameteriEXT; extern PFNGLBINDFRAGDATALOCATIONEXTPROC __glewBindFragDataLocationEXT; extern PFNGLGETFRAGDATALOCATIONEXTPROC __glewGetFragDataLocationEXT; extern PFNGLGETUNIFORMUIVEXTPROC __glewGetUniformuivEXT; extern PFNGLGETVERTEXATTRIBIIVEXTPROC __glewGetVertexAttribIivEXT; extern PFNGLGETVERTEXATTRIBIUIVEXTPROC __glewGetVertexAttribIuivEXT; extern PFNGLUNIFORM1UIEXTPROC __glewUniform1uiEXT; extern PFNGLUNIFORM1UIVEXTPROC __glewUniform1uivEXT; extern PFNGLUNIFORM2UIEXTPROC __glewUniform2uiEXT; extern PFNGLUNIFORM2UIVEXTPROC __glewUniform2uivEXT; extern PFNGLUNIFORM3UIEXTPROC __glewUniform3uiEXT; extern PFNGLUNIFORM3UIVEXTPROC __glewUniform3uivEXT; extern PFNGLUNIFORM4UIEXTPROC __glewUniform4uiEXT; extern PFNGLUNIFORM4UIVEXTPROC __glewUniform4uivEXT; extern PFNGLVERTEXATTRIBI1IEXTPROC __glewVertexAttribI1iEXT; extern PFNGLVERTEXATTRIBI1IVEXTPROC __glewVertexAttribI1ivEXT; extern PFNGLVERTEXATTRIBI1UIEXTPROC __glewVertexAttribI1uiEXT; extern PFNGLVERTEXATTRIBI1UIVEXTPROC __glewVertexAttribI1uivEXT; extern PFNGLVERTEXATTRIBI2IEXTPROC __glewVertexAttribI2iEXT; extern PFNGLVERTEXATTRIBI2IVEXTPROC __glewVertexAttribI2ivEXT; extern PFNGLVERTEXATTRIBI2UIEXTPROC __glewVertexAttribI2uiEXT; extern PFNGLVERTEXATTRIBI2UIVEXTPROC __glewVertexAttribI2uivEXT; extern PFNGLVERTEXATTRIBI3IEXTPROC __glewVertexAttribI3iEXT; extern PFNGLVERTEXATTRIBI3IVEXTPROC __glewVertexAttribI3ivEXT; extern PFNGLVERTEXATTRIBI3UIEXTPROC __glewVertexAttribI3uiEXT; extern PFNGLVERTEXATTRIBI3UIVEXTPROC __glewVertexAttribI3uivEXT; extern PFNGLVERTEXATTRIBI4BVEXTPROC __glewVertexAttribI4bvEXT; extern PFNGLVERTEXATTRIBI4IEXTPROC __glewVertexAttribI4iEXT; extern PFNGLVERTEXATTRIBI4IVEXTPROC __glewVertexAttribI4ivEXT; extern PFNGLVERTEXATTRIBI4SVEXTPROC __glewVertexAttribI4svEXT; extern PFNGLVERTEXATTRIBI4UBVEXTPROC __glewVertexAttribI4ubvEXT; extern PFNGLVERTEXATTRIBI4UIEXTPROC __glewVertexAttribI4uiEXT; extern PFNGLVERTEXATTRIBI4UIVEXTPROC __glewVertexAttribI4uivEXT; extern PFNGLVERTEXATTRIBI4USVEXTPROC __glewVertexAttribI4usvEXT; extern PFNGLVERTEXATTRIBIPOINTEREXTPROC __glewVertexAttribIPointerEXT; extern PFNGLGETHISTOGRAMEXTPROC __glewGetHistogramEXT; extern PFNGLGETHISTOGRAMPARAMETERFVEXTPROC __glewGetHistogramParameterfvEXT; extern PFNGLGETHISTOGRAMPARAMETERIVEXTPROC __glewGetHistogramParameterivEXT; extern PFNGLGETMINMAXEXTPROC __glewGetMinmaxEXT; extern PFNGLGETMINMAXPARAMETERFVEXTPROC __glewGetMinmaxParameterfvEXT; extern PFNGLGETMINMAXPARAMETERIVEXTPROC __glewGetMinmaxParameterivEXT; extern PFNGLHISTOGRAMEXTPROC __glewHistogramEXT; extern PFNGLMINMAXEXTPROC __glewMinmaxEXT; extern PFNGLRESETHISTOGRAMEXTPROC __glewResetHistogramEXT; extern PFNGLRESETMINMAXEXTPROC __glewResetMinmaxEXT; extern PFNGLINDEXFUNCEXTPROC __glewIndexFuncEXT; extern PFNGLINDEXMATERIALEXTPROC __glewIndexMaterialEXT; extern PFNGLAPPLYTEXTUREEXTPROC __glewApplyTextureEXT; extern PFNGLTEXTURELIGHTEXTPROC __glewTextureLightEXT; extern PFNGLTEXTUREMATERIALEXTPROC __glewTextureMaterialEXT; extern PFNGLMULTIDRAWARRAYSEXTPROC __glewMultiDrawArraysEXT; extern PFNGLMULTIDRAWELEMENTSEXTPROC __glewMultiDrawElementsEXT; extern PFNGLSAMPLEMASKEXTPROC __glewSampleMaskEXT; extern PFNGLSAMPLEPATTERNEXTPROC __glewSamplePatternEXT; extern PFNGLCOLORTABLEEXTPROC __glewColorTableEXT; extern PFNGLGETCOLORTABLEEXTPROC __glewGetColorTableEXT; extern PFNGLGETCOLORTABLEPARAMETERFVEXTPROC __glewGetColorTableParameterfvEXT; extern PFNGLGETCOLORTABLEPARAMETERIVEXTPROC __glewGetColorTableParameterivEXT; extern PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC __glewGetPixelTransformParameterfvEXT; extern PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC __glewGetPixelTransformParameterivEXT; extern PFNGLPIXELTRANSFORMPARAMETERFEXTPROC __glewPixelTransformParameterfEXT; extern PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC __glewPixelTransformParameterfvEXT; extern PFNGLPIXELTRANSFORMPARAMETERIEXTPROC __glewPixelTransformParameteriEXT; extern PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC __glewPixelTransformParameterivEXT; extern PFNGLPOINTPARAMETERFEXTPROC __glewPointParameterfEXT; extern PFNGLPOINTPARAMETERFVEXTPROC __glewPointParameterfvEXT; extern PFNGLPOLYGONOFFSETEXTPROC __glewPolygonOffsetEXT; extern PFNGLBEGINSCENEEXTPROC __glewBeginSceneEXT; extern PFNGLENDSCENEEXTPROC __glewEndSceneEXT; extern PFNGLSECONDARYCOLOR3BEXTPROC __glewSecondaryColor3bEXT; extern PFNGLSECONDARYCOLOR3BVEXTPROC __glewSecondaryColor3bvEXT; extern PFNGLSECONDARYCOLOR3DEXTPROC __glewSecondaryColor3dEXT; extern PFNGLSECONDARYCOLOR3DVEXTPROC __glewSecondaryColor3dvEXT; extern PFNGLSECONDARYCOLOR3FEXTPROC __glewSecondaryColor3fEXT; extern PFNGLSECONDARYCOLOR3FVEXTPROC __glewSecondaryColor3fvEXT; extern PFNGLSECONDARYCOLOR3IEXTPROC __glewSecondaryColor3iEXT; extern PFNGLSECONDARYCOLOR3IVEXTPROC __glewSecondaryColor3ivEXT; extern PFNGLSECONDARYCOLOR3SEXTPROC __glewSecondaryColor3sEXT; extern PFNGLSECONDARYCOLOR3SVEXTPROC __glewSecondaryColor3svEXT; extern PFNGLSECONDARYCOLOR3UBEXTPROC __glewSecondaryColor3ubEXT; extern PFNGLSECONDARYCOLOR3UBVEXTPROC __glewSecondaryColor3ubvEXT; extern PFNGLSECONDARYCOLOR3UIEXTPROC __glewSecondaryColor3uiEXT; extern PFNGLSECONDARYCOLOR3UIVEXTPROC __glewSecondaryColor3uivEXT; extern PFNGLSECONDARYCOLOR3USEXTPROC __glewSecondaryColor3usEXT; extern PFNGLSECONDARYCOLOR3USVEXTPROC __glewSecondaryColor3usvEXT; extern PFNGLSECONDARYCOLORPOINTEREXTPROC __glewSecondaryColorPointerEXT; extern PFNGLACTIVESTENCILFACEEXTPROC __glewActiveStencilFaceEXT; extern PFNGLTEXSUBIMAGE1DEXTPROC __glewTexSubImage1DEXT; extern PFNGLTEXSUBIMAGE2DEXTPROC __glewTexSubImage2DEXT; extern PFNGLTEXSUBIMAGE3DEXTPROC __glewTexSubImage3DEXT; extern PFNGLTEXIMAGE3DEXTPROC __glewTexImage3DEXT; extern PFNGLTEXBUFFEREXTPROC __glewTexBufferEXT; extern PFNGLCLEARCOLORIIEXTPROC __glewClearColorIiEXT; extern PFNGLCLEARCOLORIUIEXTPROC __glewClearColorIuiEXT; extern PFNGLGETTEXPARAMETERIIVEXTPROC __glewGetTexParameterIivEXT; extern PFNGLGETTEXPARAMETERIUIVEXTPROC __glewGetTexParameterIuivEXT; extern PFNGLTEXPARAMETERIIVEXTPROC __glewTexParameterIivEXT; extern PFNGLTEXPARAMETERIUIVEXTPROC __glewTexParameterIuivEXT; extern PFNGLARETEXTURESRESIDENTEXTPROC __glewAreTexturesResidentEXT; extern PFNGLBINDTEXTUREEXTPROC __glewBindTextureEXT; extern PFNGLDELETETEXTURESEXTPROC __glewDeleteTexturesEXT; extern PFNGLGENTEXTURESEXTPROC __glewGenTexturesEXT; extern PFNGLISTEXTUREEXTPROC __glewIsTextureEXT; extern PFNGLPRIORITIZETEXTURESEXTPROC __glewPrioritizeTexturesEXT; extern PFNGLTEXTURENORMALEXTPROC __glewTextureNormalEXT; extern PFNGLGETQUERYOBJECTI64VEXTPROC __glewGetQueryObjecti64vEXT; extern PFNGLGETQUERYOBJECTUI64VEXTPROC __glewGetQueryObjectui64vEXT; extern PFNGLARRAYELEMENTEXTPROC __glewArrayElementEXT; extern PFNGLCOLORPOINTEREXTPROC __glewColorPointerEXT; extern PFNGLDRAWARRAYSEXTPROC __glewDrawArraysEXT; extern PFNGLEDGEFLAGPOINTEREXTPROC __glewEdgeFlagPointerEXT; extern PFNGLGETPOINTERVEXTPROC __glewGetPointervEXT; extern PFNGLINDEXPOINTEREXTPROC __glewIndexPointerEXT; extern PFNGLNORMALPOINTEREXTPROC __glewNormalPointerEXT; extern PFNGLTEXCOORDPOINTEREXTPROC __glewTexCoordPointerEXT; extern PFNGLVERTEXPOINTEREXTPROC __glewVertexPointerEXT; extern PFNGLBEGINVERTEXSHADEREXTPROC __glewBeginVertexShaderEXT; extern PFNGLBINDLIGHTPARAMETEREXTPROC __glewBindLightParameterEXT; extern PFNGLBINDMATERIALPARAMETEREXTPROC __glewBindMaterialParameterEXT; extern PFNGLBINDPARAMETEREXTPROC __glewBindParameterEXT; extern PFNGLBINDTEXGENPARAMETEREXTPROC __glewBindTexGenParameterEXT; extern PFNGLBINDTEXTUREUNITPARAMETEREXTPROC __glewBindTextureUnitParameterEXT; extern PFNGLBINDVERTEXSHADEREXTPROC __glewBindVertexShaderEXT; extern PFNGLDELETEVERTEXSHADEREXTPROC __glewDeleteVertexShaderEXT; extern PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC __glewDisableVariantClientStateEXT; extern PFNGLENABLEVARIANTCLIENTSTATEEXTPROC __glewEnableVariantClientStateEXT; extern PFNGLENDVERTEXSHADEREXTPROC __glewEndVertexShaderEXT; extern PFNGLEXTRACTCOMPONENTEXTPROC __glewExtractComponentEXT; extern PFNGLGENSYMBOLSEXTPROC __glewGenSymbolsEXT; extern PFNGLGENVERTEXSHADERSEXTPROC __glewGenVertexShadersEXT; extern PFNGLGETINVARIANTBOOLEANVEXTPROC __glewGetInvariantBooleanvEXT; extern PFNGLGETINVARIANTFLOATVEXTPROC __glewGetInvariantFloatvEXT; extern PFNGLGETINVARIANTINTEGERVEXTPROC __glewGetInvariantIntegervEXT; extern PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC __glewGetLocalConstantBooleanvEXT; extern PFNGLGETLOCALCONSTANTFLOATVEXTPROC __glewGetLocalConstantFloatvEXT; extern PFNGLGETLOCALCONSTANTINTEGERVEXTPROC __glewGetLocalConstantIntegervEXT; extern PFNGLGETVARIANTBOOLEANVEXTPROC __glewGetVariantBooleanvEXT; extern PFNGLGETVARIANTFLOATVEXTPROC __glewGetVariantFloatvEXT; extern PFNGLGETVARIANTINTEGERVEXTPROC __glewGetVariantIntegervEXT; extern PFNGLGETVARIANTPOINTERVEXTPROC __glewGetVariantPointervEXT; extern PFNGLINSERTCOMPONENTEXTPROC __glewInsertComponentEXT; extern PFNGLISVARIANTENABLEDEXTPROC __glewIsVariantEnabledEXT; extern PFNGLSETINVARIANTEXTPROC __glewSetInvariantEXT; extern PFNGLSETLOCALCONSTANTEXTPROC __glewSetLocalConstantEXT; extern PFNGLSHADEROP1EXTPROC __glewShaderOp1EXT; extern PFNGLSHADEROP2EXTPROC __glewShaderOp2EXT; extern PFNGLSHADEROP3EXTPROC __glewShaderOp3EXT; extern PFNGLSWIZZLEEXTPROC __glewSwizzleEXT; extern PFNGLVARIANTPOINTEREXTPROC __glewVariantPointerEXT; extern PFNGLVARIANTBVEXTPROC __glewVariantbvEXT; extern PFNGLVARIANTDVEXTPROC __glewVariantdvEXT; extern PFNGLVARIANTFVEXTPROC __glewVariantfvEXT; extern PFNGLVARIANTIVEXTPROC __glewVariantivEXT; extern PFNGLVARIANTSVEXTPROC __glewVariantsvEXT; extern PFNGLVARIANTUBVEXTPROC __glewVariantubvEXT; extern PFNGLVARIANTUIVEXTPROC __glewVariantuivEXT; extern PFNGLVARIANTUSVEXTPROC __glewVariantusvEXT; extern PFNGLWRITEMASKEXTPROC __glewWriteMaskEXT; extern PFNGLVERTEXWEIGHTPOINTEREXTPROC __glewVertexWeightPointerEXT; extern PFNGLVERTEXWEIGHTFEXTPROC __glewVertexWeightfEXT; extern PFNGLVERTEXWEIGHTFVEXTPROC __glewVertexWeightfvEXT; extern PFNGLSTRINGMARKERGREMEDYPROC __glewStringMarkerGREMEDY; extern PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC __glewGetImageTransformParameterfvHP; extern PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC __glewGetImageTransformParameterivHP; extern PFNGLIMAGETRANSFORMPARAMETERFHPPROC __glewImageTransformParameterfHP; extern PFNGLIMAGETRANSFORMPARAMETERFVHPPROC __glewImageTransformParameterfvHP; extern PFNGLIMAGETRANSFORMPARAMETERIHPPROC __glewImageTransformParameteriHP; extern PFNGLIMAGETRANSFORMPARAMETERIVHPPROC __glewImageTransformParameterivHP; extern PFNGLMULTIMODEDRAWARRAYSIBMPROC __glewMultiModeDrawArraysIBM; extern PFNGLMULTIMODEDRAWELEMENTSIBMPROC __glewMultiModeDrawElementsIBM; extern PFNGLCOLORPOINTERLISTIBMPROC __glewColorPointerListIBM; extern PFNGLEDGEFLAGPOINTERLISTIBMPROC __glewEdgeFlagPointerListIBM; extern PFNGLFOGCOORDPOINTERLISTIBMPROC __glewFogCoordPointerListIBM; extern PFNGLINDEXPOINTERLISTIBMPROC __glewIndexPointerListIBM; extern PFNGLNORMALPOINTERLISTIBMPROC __glewNormalPointerListIBM; extern PFNGLSECONDARYCOLORPOINTERLISTIBMPROC __glewSecondaryColorPointerListIBM; extern PFNGLTEXCOORDPOINTERLISTIBMPROC __glewTexCoordPointerListIBM; extern PFNGLVERTEXPOINTERLISTIBMPROC __glewVertexPointerListIBM; extern PFNGLCOLORPOINTERVINTELPROC __glewColorPointervINTEL; extern PFNGLNORMALPOINTERVINTELPROC __glewNormalPointervINTEL; extern PFNGLTEXCOORDPOINTERVINTELPROC __glewTexCoordPointervINTEL; extern PFNGLVERTEXPOINTERVINTELPROC __glewVertexPointervINTEL; extern PFNGLTEXSCISSORFUNCINTELPROC __glewTexScissorFuncINTEL; extern PFNGLTEXSCISSORINTELPROC __glewTexScissorINTEL; extern PFNGLBUFFERREGIONENABLEDEXTPROC __glewBufferRegionEnabledEXT; extern PFNGLDELETEBUFFERREGIONEXTPROC __glewDeleteBufferRegionEXT; extern PFNGLDRAWBUFFERREGIONEXTPROC __glewDrawBufferRegionEXT; extern PFNGLNEWBUFFERREGIONEXTPROC __glewNewBufferRegionEXT; extern PFNGLREADBUFFERREGIONEXTPROC __glewReadBufferRegionEXT; extern PFNGLRESIZEBUFFERSMESAPROC __glewResizeBuffersMESA; extern PFNGLWINDOWPOS2DMESAPROC __glewWindowPos2dMESA; extern PFNGLWINDOWPOS2DVMESAPROC __glewWindowPos2dvMESA; extern PFNGLWINDOWPOS2FMESAPROC __glewWindowPos2fMESA; extern PFNGLWINDOWPOS2FVMESAPROC __glewWindowPos2fvMESA; extern PFNGLWINDOWPOS2IMESAPROC __glewWindowPos2iMESA; extern PFNGLWINDOWPOS2IVMESAPROC __glewWindowPos2ivMESA; extern PFNGLWINDOWPOS2SMESAPROC __glewWindowPos2sMESA; extern PFNGLWINDOWPOS2SVMESAPROC __glewWindowPos2svMESA; extern PFNGLWINDOWPOS3DMESAPROC __glewWindowPos3dMESA; extern PFNGLWINDOWPOS3DVMESAPROC __glewWindowPos3dvMESA; extern PFNGLWINDOWPOS3FMESAPROC __glewWindowPos3fMESA; extern PFNGLWINDOWPOS3FVMESAPROC __glewWindowPos3fvMESA; extern PFNGLWINDOWPOS3IMESAPROC __glewWindowPos3iMESA; extern PFNGLWINDOWPOS3IVMESAPROC __glewWindowPos3ivMESA; extern PFNGLWINDOWPOS3SMESAPROC __glewWindowPos3sMESA; extern PFNGLWINDOWPOS3SVMESAPROC __glewWindowPos3svMESA; extern PFNGLWINDOWPOS4DMESAPROC __glewWindowPos4dMESA; extern PFNGLWINDOWPOS4DVMESAPROC __glewWindowPos4dvMESA; extern PFNGLWINDOWPOS4FMESAPROC __glewWindowPos4fMESA; extern PFNGLWINDOWPOS4FVMESAPROC __glewWindowPos4fvMESA; extern PFNGLWINDOWPOS4IMESAPROC __glewWindowPos4iMESA; extern PFNGLWINDOWPOS4IVMESAPROC __glewWindowPos4ivMESA; extern PFNGLWINDOWPOS4SMESAPROC __glewWindowPos4sMESA; extern PFNGLWINDOWPOS4SVMESAPROC __glewWindowPos4svMESA; extern PFNGLCLEARDEPTHDNVPROC __glewClearDepthdNV; extern PFNGLDEPTHBOUNDSDNVPROC __glewDepthBoundsdNV; extern PFNGLDEPTHRANGEDNVPROC __glewDepthRangedNV; extern PFNGLEVALMAPSNVPROC __glewEvalMapsNV; extern PFNGLGETMAPATTRIBPARAMETERFVNVPROC __glewGetMapAttribParameterfvNV; extern PFNGLGETMAPATTRIBPARAMETERIVNVPROC __glewGetMapAttribParameterivNV; extern PFNGLGETMAPCONTROLPOINTSNVPROC __glewGetMapControlPointsNV; extern PFNGLGETMAPPARAMETERFVNVPROC __glewGetMapParameterfvNV; extern PFNGLGETMAPPARAMETERIVNVPROC __glewGetMapParameterivNV; extern PFNGLMAPCONTROLPOINTSNVPROC __glewMapControlPointsNV; extern PFNGLMAPPARAMETERFVNVPROC __glewMapParameterfvNV; extern PFNGLMAPPARAMETERIVNVPROC __glewMapParameterivNV; extern PFNGLDELETEFENCESNVPROC __glewDeleteFencesNV; extern PFNGLFINISHFENCENVPROC __glewFinishFenceNV; extern PFNGLGENFENCESNVPROC __glewGenFencesNV; extern PFNGLGETFENCEIVNVPROC __glewGetFenceivNV; extern PFNGLISFENCENVPROC __glewIsFenceNV; extern PFNGLSETFENCENVPROC __glewSetFenceNV; extern PFNGLTESTFENCENVPROC __glewTestFenceNV; extern PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC __glewGetProgramNamedParameterdvNV; extern PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC __glewGetProgramNamedParameterfvNV; extern PFNGLPROGRAMNAMEDPARAMETER4DNVPROC __glewProgramNamedParameter4dNV; extern PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC __glewProgramNamedParameter4dvNV; extern PFNGLPROGRAMNAMEDPARAMETER4FNVPROC __glewProgramNamedParameter4fNV; extern PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC __glewProgramNamedParameter4fvNV; extern PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC __glewRenderbufferStorageMultisampleCoverageNV; extern PFNGLPROGRAMVERTEXLIMITNVPROC __glewProgramVertexLimitNV; extern PFNGLPROGRAMENVPARAMETERI4INVPROC __glewProgramEnvParameterI4iNV; extern PFNGLPROGRAMENVPARAMETERI4IVNVPROC __glewProgramEnvParameterI4ivNV; extern PFNGLPROGRAMENVPARAMETERI4UINVPROC __glewProgramEnvParameterI4uiNV; extern PFNGLPROGRAMENVPARAMETERI4UIVNVPROC __glewProgramEnvParameterI4uivNV; extern PFNGLPROGRAMENVPARAMETERSI4IVNVPROC __glewProgramEnvParametersI4ivNV; extern PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC __glewProgramEnvParametersI4uivNV; extern PFNGLPROGRAMLOCALPARAMETERI4INVPROC __glewProgramLocalParameterI4iNV; extern PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC __glewProgramLocalParameterI4ivNV; extern PFNGLPROGRAMLOCALPARAMETERI4UINVPROC __glewProgramLocalParameterI4uiNV; extern PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC __glewProgramLocalParameterI4uivNV; extern PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC __glewProgramLocalParametersI4ivNV; extern PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC __glewProgramLocalParametersI4uivNV; extern PFNGLCOLOR3HNVPROC __glewColor3hNV; extern PFNGLCOLOR3HVNVPROC __glewColor3hvNV; extern PFNGLCOLOR4HNVPROC __glewColor4hNV; extern PFNGLCOLOR4HVNVPROC __glewColor4hvNV; extern PFNGLFOGCOORDHNVPROC __glewFogCoordhNV; extern PFNGLFOGCOORDHVNVPROC __glewFogCoordhvNV; extern PFNGLMULTITEXCOORD1HNVPROC __glewMultiTexCoord1hNV; extern PFNGLMULTITEXCOORD1HVNVPROC __glewMultiTexCoord1hvNV; extern PFNGLMULTITEXCOORD2HNVPROC __glewMultiTexCoord2hNV; extern PFNGLMULTITEXCOORD2HVNVPROC __glewMultiTexCoord2hvNV; extern PFNGLMULTITEXCOORD3HNVPROC __glewMultiTexCoord3hNV; extern PFNGLMULTITEXCOORD3HVNVPROC __glewMultiTexCoord3hvNV; extern PFNGLMULTITEXCOORD4HNVPROC __glewMultiTexCoord4hNV; extern PFNGLMULTITEXCOORD4HVNVPROC __glewMultiTexCoord4hvNV; extern PFNGLNORMAL3HNVPROC __glewNormal3hNV; extern PFNGLNORMAL3HVNVPROC __glewNormal3hvNV; extern PFNGLSECONDARYCOLOR3HNVPROC __glewSecondaryColor3hNV; extern PFNGLSECONDARYCOLOR3HVNVPROC __glewSecondaryColor3hvNV; extern PFNGLTEXCOORD1HNVPROC __glewTexCoord1hNV; extern PFNGLTEXCOORD1HVNVPROC __glewTexCoord1hvNV; extern PFNGLTEXCOORD2HNVPROC __glewTexCoord2hNV; extern PFNGLTEXCOORD2HVNVPROC __glewTexCoord2hvNV; extern PFNGLTEXCOORD3HNVPROC __glewTexCoord3hNV; extern PFNGLTEXCOORD3HVNVPROC __glewTexCoord3hvNV; extern PFNGLTEXCOORD4HNVPROC __glewTexCoord4hNV; extern PFNGLTEXCOORD4HVNVPROC __glewTexCoord4hvNV; extern PFNGLVERTEX2HNVPROC __glewVertex2hNV; extern PFNGLVERTEX2HVNVPROC __glewVertex2hvNV; extern PFNGLVERTEX3HNVPROC __glewVertex3hNV; extern PFNGLVERTEX3HVNVPROC __glewVertex3hvNV; extern PFNGLVERTEX4HNVPROC __glewVertex4hNV; extern PFNGLVERTEX4HVNVPROC __glewVertex4hvNV; extern PFNGLVERTEXATTRIB1HNVPROC __glewVertexAttrib1hNV; extern PFNGLVERTEXATTRIB1HVNVPROC __glewVertexAttrib1hvNV; extern PFNGLVERTEXATTRIB2HNVPROC __glewVertexAttrib2hNV; extern PFNGLVERTEXATTRIB2HVNVPROC __glewVertexAttrib2hvNV; extern PFNGLVERTEXATTRIB3HNVPROC __glewVertexAttrib3hNV; extern PFNGLVERTEXATTRIB3HVNVPROC __glewVertexAttrib3hvNV; extern PFNGLVERTEXATTRIB4HNVPROC __glewVertexAttrib4hNV; extern PFNGLVERTEXATTRIB4HVNVPROC __glewVertexAttrib4hvNV; extern PFNGLVERTEXATTRIBS1HVNVPROC __glewVertexAttribs1hvNV; extern PFNGLVERTEXATTRIBS2HVNVPROC __glewVertexAttribs2hvNV; extern PFNGLVERTEXATTRIBS3HVNVPROC __glewVertexAttribs3hvNV; extern PFNGLVERTEXATTRIBS4HVNVPROC __glewVertexAttribs4hvNV; extern PFNGLVERTEXWEIGHTHNVPROC __glewVertexWeighthNV; extern PFNGLVERTEXWEIGHTHVNVPROC __glewVertexWeighthvNV; extern PFNGLBEGINOCCLUSIONQUERYNVPROC __glewBeginOcclusionQueryNV; extern PFNGLDELETEOCCLUSIONQUERIESNVPROC __glewDeleteOcclusionQueriesNV; extern PFNGLENDOCCLUSIONQUERYNVPROC __glewEndOcclusionQueryNV; extern PFNGLGENOCCLUSIONQUERIESNVPROC __glewGenOcclusionQueriesNV; extern PFNGLGETOCCLUSIONQUERYIVNVPROC __glewGetOcclusionQueryivNV; extern PFNGLGETOCCLUSIONQUERYUIVNVPROC __glewGetOcclusionQueryuivNV; extern PFNGLISOCCLUSIONQUERYNVPROC __glewIsOcclusionQueryNV; extern PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC __glewProgramBufferParametersIivNV; extern PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC __glewProgramBufferParametersIuivNV; extern PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC __glewProgramBufferParametersfvNV; extern PFNGLFLUSHPIXELDATARANGENVPROC __glewFlushPixelDataRangeNV; extern PFNGLPIXELDATARANGENVPROC __glewPixelDataRangeNV; extern PFNGLPOINTPARAMETERINVPROC __glewPointParameteriNV; extern PFNGLPOINTPARAMETERIVNVPROC __glewPointParameterivNV; extern PFNGLPRIMITIVERESTARTINDEXNVPROC __glewPrimitiveRestartIndexNV; extern PFNGLPRIMITIVERESTARTNVPROC __glewPrimitiveRestartNV; extern PFNGLCOMBINERINPUTNVPROC __glewCombinerInputNV; extern PFNGLCOMBINEROUTPUTNVPROC __glewCombinerOutputNV; extern PFNGLCOMBINERPARAMETERFNVPROC __glewCombinerParameterfNV; extern PFNGLCOMBINERPARAMETERFVNVPROC __glewCombinerParameterfvNV; extern PFNGLCOMBINERPARAMETERINVPROC __glewCombinerParameteriNV; extern PFNGLCOMBINERPARAMETERIVNVPROC __glewCombinerParameterivNV; extern PFNGLFINALCOMBINERINPUTNVPROC __glewFinalCombinerInputNV; extern PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC __glewGetCombinerInputParameterfvNV; extern PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC __glewGetCombinerInputParameterivNV; extern PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC __glewGetCombinerOutputParameterfvNV; extern PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC __glewGetCombinerOutputParameterivNV; extern PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC __glewGetFinalCombinerInputParameterfvNV; extern PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC __glewGetFinalCombinerInputParameterivNV; extern PFNGLCOMBINERSTAGEPARAMETERFVNVPROC __glewCombinerStageParameterfvNV; extern PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC __glewGetCombinerStageParameterfvNV; extern PFNGLACTIVEVARYINGNVPROC __glewActiveVaryingNV; extern PFNGLBEGINTRANSFORMFEEDBACKNVPROC __glewBeginTransformFeedbackNV; extern PFNGLBINDBUFFERBASENVPROC __glewBindBufferBaseNV; extern PFNGLBINDBUFFEROFFSETNVPROC __glewBindBufferOffsetNV; extern PFNGLBINDBUFFERRANGENVPROC __glewBindBufferRangeNV; extern PFNGLENDTRANSFORMFEEDBACKNVPROC __glewEndTransformFeedbackNV; extern PFNGLGETACTIVEVARYINGNVPROC __glewGetActiveVaryingNV; extern PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC __glewGetTransformFeedbackVaryingNV; extern PFNGLGETVARYINGLOCATIONNVPROC __glewGetVaryingLocationNV; extern PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC __glewTransformFeedbackAttribsNV; extern PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC __glewTransformFeedbackVaryingsNV; extern PFNGLFLUSHVERTEXARRAYRANGENVPROC __glewFlushVertexArrayRangeNV; extern PFNGLVERTEXARRAYRANGENVPROC __glewVertexArrayRangeNV; extern PFNGLAREPROGRAMSRESIDENTNVPROC __glewAreProgramsResidentNV; extern PFNGLBINDPROGRAMNVPROC __glewBindProgramNV; extern PFNGLDELETEPROGRAMSNVPROC __glewDeleteProgramsNV; extern PFNGLEXECUTEPROGRAMNVPROC __glewExecuteProgramNV; extern PFNGLGENPROGRAMSNVPROC __glewGenProgramsNV; extern PFNGLGETPROGRAMPARAMETERDVNVPROC __glewGetProgramParameterdvNV; extern PFNGLGETPROGRAMPARAMETERFVNVPROC __glewGetProgramParameterfvNV; extern PFNGLGETPROGRAMSTRINGNVPROC __glewGetProgramStringNV; extern PFNGLGETPROGRAMIVNVPROC __glewGetProgramivNV; extern PFNGLGETTRACKMATRIXIVNVPROC __glewGetTrackMatrixivNV; extern PFNGLGETVERTEXATTRIBPOINTERVNVPROC __glewGetVertexAttribPointervNV; extern PFNGLGETVERTEXATTRIBDVNVPROC __glewGetVertexAttribdvNV; extern PFNGLGETVERTEXATTRIBFVNVPROC __glewGetVertexAttribfvNV; extern PFNGLGETVERTEXATTRIBIVNVPROC __glewGetVertexAttribivNV; extern PFNGLISPROGRAMNVPROC __glewIsProgramNV; extern PFNGLLOADPROGRAMNVPROC __glewLoadProgramNV; extern PFNGLPROGRAMPARAMETER4DNVPROC __glewProgramParameter4dNV; extern PFNGLPROGRAMPARAMETER4DVNVPROC __glewProgramParameter4dvNV; extern PFNGLPROGRAMPARAMETER4FNVPROC __glewProgramParameter4fNV; extern PFNGLPROGRAMPARAMETER4FVNVPROC __glewProgramParameter4fvNV; extern PFNGLPROGRAMPARAMETERS4DVNVPROC __glewProgramParameters4dvNV; extern PFNGLPROGRAMPARAMETERS4FVNVPROC __glewProgramParameters4fvNV; extern PFNGLREQUESTRESIDENTPROGRAMSNVPROC __glewRequestResidentProgramsNV; extern PFNGLTRACKMATRIXNVPROC __glewTrackMatrixNV; extern PFNGLVERTEXATTRIB1DNVPROC __glewVertexAttrib1dNV; extern PFNGLVERTEXATTRIB1DVNVPROC __glewVertexAttrib1dvNV; extern PFNGLVERTEXATTRIB1FNVPROC __glewVertexAttrib1fNV; extern PFNGLVERTEXATTRIB1FVNVPROC __glewVertexAttrib1fvNV; extern PFNGLVERTEXATTRIB1SNVPROC __glewVertexAttrib1sNV; extern PFNGLVERTEXATTRIB1SVNVPROC __glewVertexAttrib1svNV; extern PFNGLVERTEXATTRIB2DNVPROC __glewVertexAttrib2dNV; extern PFNGLVERTEXATTRIB2DVNVPROC __glewVertexAttrib2dvNV; extern PFNGLVERTEXATTRIB2FNVPROC __glewVertexAttrib2fNV; extern PFNGLVERTEXATTRIB2FVNVPROC __glewVertexAttrib2fvNV; extern PFNGLVERTEXATTRIB2SNVPROC __glewVertexAttrib2sNV; extern PFNGLVERTEXATTRIB2SVNVPROC __glewVertexAttrib2svNV; extern PFNGLVERTEXATTRIB3DNVPROC __glewVertexAttrib3dNV; extern PFNGLVERTEXATTRIB3DVNVPROC __glewVertexAttrib3dvNV; extern PFNGLVERTEXATTRIB3FNVPROC __glewVertexAttrib3fNV; extern PFNGLVERTEXATTRIB3FVNVPROC __glewVertexAttrib3fvNV; extern PFNGLVERTEXATTRIB3SNVPROC __glewVertexAttrib3sNV; extern PFNGLVERTEXATTRIB3SVNVPROC __glewVertexAttrib3svNV; extern PFNGLVERTEXATTRIB4DNVPROC __glewVertexAttrib4dNV; extern PFNGLVERTEXATTRIB4DVNVPROC __glewVertexAttrib4dvNV; extern PFNGLVERTEXATTRIB4FNVPROC __glewVertexAttrib4fNV; extern PFNGLVERTEXATTRIB4FVNVPROC __glewVertexAttrib4fvNV; extern PFNGLVERTEXATTRIB4SNVPROC __glewVertexAttrib4sNV; extern PFNGLVERTEXATTRIB4SVNVPROC __glewVertexAttrib4svNV; extern PFNGLVERTEXATTRIB4UBNVPROC __glewVertexAttrib4ubNV; extern PFNGLVERTEXATTRIB4UBVNVPROC __glewVertexAttrib4ubvNV; extern PFNGLVERTEXATTRIBPOINTERNVPROC __glewVertexAttribPointerNV; extern PFNGLVERTEXATTRIBS1DVNVPROC __glewVertexAttribs1dvNV; extern PFNGLVERTEXATTRIBS1FVNVPROC __glewVertexAttribs1fvNV; extern PFNGLVERTEXATTRIBS1SVNVPROC __glewVertexAttribs1svNV; extern PFNGLVERTEXATTRIBS2DVNVPROC __glewVertexAttribs2dvNV; extern PFNGLVERTEXATTRIBS2FVNVPROC __glewVertexAttribs2fvNV; extern PFNGLVERTEXATTRIBS2SVNVPROC __glewVertexAttribs2svNV; extern PFNGLVERTEXATTRIBS3DVNVPROC __glewVertexAttribs3dvNV; extern PFNGLVERTEXATTRIBS3FVNVPROC __glewVertexAttribs3fvNV; extern PFNGLVERTEXATTRIBS3SVNVPROC __glewVertexAttribs3svNV; extern PFNGLVERTEXATTRIBS4DVNVPROC __glewVertexAttribs4dvNV; extern PFNGLVERTEXATTRIBS4FVNVPROC __glewVertexAttribs4fvNV; extern PFNGLVERTEXATTRIBS4SVNVPROC __glewVertexAttribs4svNV; extern PFNGLVERTEXATTRIBS4UBVNVPROC __glewVertexAttribs4ubvNV; extern PFNGLCLEARDEPTHFOESPROC __glewClearDepthfOES; extern PFNGLCLIPPLANEFOESPROC __glewClipPlanefOES; extern PFNGLDEPTHRANGEFOESPROC __glewDepthRangefOES; extern PFNGLFRUSTUMFOESPROC __glewFrustumfOES; extern PFNGLGETCLIPPLANEFOESPROC __glewGetClipPlanefOES; extern PFNGLORTHOFOESPROC __glewOrthofOES; extern PFNGLDETAILTEXFUNCSGISPROC __glewDetailTexFuncSGIS; extern PFNGLGETDETAILTEXFUNCSGISPROC __glewGetDetailTexFuncSGIS; extern PFNGLFOGFUNCSGISPROC __glewFogFuncSGIS; extern PFNGLGETFOGFUNCSGISPROC __glewGetFogFuncSGIS; extern PFNGLSAMPLEMASKSGISPROC __glewSampleMaskSGIS; extern PFNGLSAMPLEPATTERNSGISPROC __glewSamplePatternSGIS; extern PFNGLGETSHARPENTEXFUNCSGISPROC __glewGetSharpenTexFuncSGIS; extern PFNGLSHARPENTEXFUNCSGISPROC __glewSharpenTexFuncSGIS; extern PFNGLTEXIMAGE4DSGISPROC __glewTexImage4DSGIS; extern PFNGLTEXSUBIMAGE4DSGISPROC __glewTexSubImage4DSGIS; extern PFNGLGETTEXFILTERFUNCSGISPROC __glewGetTexFilterFuncSGIS; extern PFNGLTEXFILTERFUNCSGISPROC __glewTexFilterFuncSGIS; extern PFNGLASYNCMARKERSGIXPROC __glewAsyncMarkerSGIX; extern PFNGLDELETEASYNCMARKERSSGIXPROC __glewDeleteAsyncMarkersSGIX; extern PFNGLFINISHASYNCSGIXPROC __glewFinishAsyncSGIX; extern PFNGLGENASYNCMARKERSSGIXPROC __glewGenAsyncMarkersSGIX; extern PFNGLISASYNCMARKERSGIXPROC __glewIsAsyncMarkerSGIX; extern PFNGLPOLLASYNCSGIXPROC __glewPollAsyncSGIX; extern PFNGLFLUSHRASTERSGIXPROC __glewFlushRasterSGIX; extern PFNGLTEXTUREFOGSGIXPROC __glewTextureFogSGIX; extern PFNGLFRAGMENTCOLORMATERIALSGIXPROC __glewFragmentColorMaterialSGIX; extern PFNGLFRAGMENTLIGHTMODELFSGIXPROC __glewFragmentLightModelfSGIX; extern PFNGLFRAGMENTLIGHTMODELFVSGIXPROC __glewFragmentLightModelfvSGIX; extern PFNGLFRAGMENTLIGHTMODELISGIXPROC __glewFragmentLightModeliSGIX; extern PFNGLFRAGMENTLIGHTMODELIVSGIXPROC __glewFragmentLightModelivSGIX; extern PFNGLFRAGMENTLIGHTFSGIXPROC __glewFragmentLightfSGIX; extern PFNGLFRAGMENTLIGHTFVSGIXPROC __glewFragmentLightfvSGIX; extern PFNGLFRAGMENTLIGHTISGIXPROC __glewFragmentLightiSGIX; extern PFNGLFRAGMENTLIGHTIVSGIXPROC __glewFragmentLightivSGIX; extern PFNGLFRAGMENTMATERIALFSGIXPROC __glewFragmentMaterialfSGIX; extern PFNGLFRAGMENTMATERIALFVSGIXPROC __glewFragmentMaterialfvSGIX; extern PFNGLFRAGMENTMATERIALISGIXPROC __glewFragmentMaterialiSGIX; extern PFNGLFRAGMENTMATERIALIVSGIXPROC __glewFragmentMaterialivSGIX; extern PFNGLGETFRAGMENTLIGHTFVSGIXPROC __glewGetFragmentLightfvSGIX; extern PFNGLGETFRAGMENTLIGHTIVSGIXPROC __glewGetFragmentLightivSGIX; extern PFNGLGETFRAGMENTMATERIALFVSGIXPROC __glewGetFragmentMaterialfvSGIX; extern PFNGLGETFRAGMENTMATERIALIVSGIXPROC __glewGetFragmentMaterialivSGIX; extern PFNGLFRAMEZOOMSGIXPROC __glewFrameZoomSGIX; extern PFNGLPIXELTEXGENSGIXPROC __glewPixelTexGenSGIX; extern PFNGLREFERENCEPLANESGIXPROC __glewReferencePlaneSGIX; extern PFNGLSPRITEPARAMETERFSGIXPROC __glewSpriteParameterfSGIX; extern PFNGLSPRITEPARAMETERFVSGIXPROC __glewSpriteParameterfvSGIX; extern PFNGLSPRITEPARAMETERISGIXPROC __glewSpriteParameteriSGIX; extern PFNGLSPRITEPARAMETERIVSGIXPROC __glewSpriteParameterivSGIX; extern PFNGLTAGSAMPLEBUFFERSGIXPROC __glewTagSampleBufferSGIX; extern PFNGLCOLORTABLEPARAMETERFVSGIPROC __glewColorTableParameterfvSGI; extern PFNGLCOLORTABLEPARAMETERIVSGIPROC __glewColorTableParameterivSGI; extern PFNGLCOLORTABLESGIPROC __glewColorTableSGI; extern PFNGLCOPYCOLORTABLESGIPROC __glewCopyColorTableSGI; extern PFNGLGETCOLORTABLEPARAMETERFVSGIPROC __glewGetColorTableParameterfvSGI; extern PFNGLGETCOLORTABLEPARAMETERIVSGIPROC __glewGetColorTableParameterivSGI; extern PFNGLGETCOLORTABLESGIPROC __glewGetColorTableSGI; extern PFNGLFINISHTEXTURESUNXPROC __glewFinishTextureSUNX; extern PFNGLGLOBALALPHAFACTORBSUNPROC __glewGlobalAlphaFactorbSUN; extern PFNGLGLOBALALPHAFACTORDSUNPROC __glewGlobalAlphaFactordSUN; extern PFNGLGLOBALALPHAFACTORFSUNPROC __glewGlobalAlphaFactorfSUN; extern PFNGLGLOBALALPHAFACTORISUNPROC __glewGlobalAlphaFactoriSUN; extern PFNGLGLOBALALPHAFACTORSSUNPROC __glewGlobalAlphaFactorsSUN; extern PFNGLGLOBALALPHAFACTORUBSUNPROC __glewGlobalAlphaFactorubSUN; extern PFNGLGLOBALALPHAFACTORUISUNPROC __glewGlobalAlphaFactoruiSUN; extern PFNGLGLOBALALPHAFACTORUSSUNPROC __glewGlobalAlphaFactorusSUN; extern PFNGLREADVIDEOPIXELSSUNPROC __glewReadVideoPixelsSUN; extern PFNGLREPLACEMENTCODEPOINTERSUNPROC __glewReplacementCodePointerSUN; extern PFNGLREPLACEMENTCODEUBSUNPROC __glewReplacementCodeubSUN; extern PFNGLREPLACEMENTCODEUBVSUNPROC __glewReplacementCodeubvSUN; extern PFNGLREPLACEMENTCODEUISUNPROC __glewReplacementCodeuiSUN; extern PFNGLREPLACEMENTCODEUIVSUNPROC __glewReplacementCodeuivSUN; extern PFNGLREPLACEMENTCODEUSSUNPROC __glewReplacementCodeusSUN; extern PFNGLREPLACEMENTCODEUSVSUNPROC __glewReplacementCodeusvSUN; extern PFNGLCOLOR3FVERTEX3FSUNPROC __glewColor3fVertex3fSUN; extern PFNGLCOLOR3FVERTEX3FVSUNPROC __glewColor3fVertex3fvSUN; extern PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC __glewColor4fNormal3fVertex3fSUN; extern PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC __glewColor4fNormal3fVertex3fvSUN; extern PFNGLCOLOR4UBVERTEX2FSUNPROC __glewColor4ubVertex2fSUN; extern PFNGLCOLOR4UBVERTEX2FVSUNPROC __glewColor4ubVertex2fvSUN; extern PFNGLCOLOR4UBVERTEX3FSUNPROC __glewColor4ubVertex3fSUN; extern PFNGLCOLOR4UBVERTEX3FVSUNPROC __glewColor4ubVertex3fvSUN; extern PFNGLNORMAL3FVERTEX3FSUNPROC __glewNormal3fVertex3fSUN; extern PFNGLNORMAL3FVERTEX3FVSUNPROC __glewNormal3fVertex3fvSUN; extern PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC __glewReplacementCodeuiColor3fVertex3fSUN; extern PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC __glewReplacementCodeuiColor3fVertex3fvSUN; extern PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC __glewReplacementCodeuiColor4fNormal3fVertex3fSUN; extern PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC __glewReplacementCodeuiColor4fNormal3fVertex3fvSUN; extern PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC __glewReplacementCodeuiColor4ubVertex3fSUN; extern PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC __glewReplacementCodeuiColor4ubVertex3fvSUN; extern PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC __glewReplacementCodeuiNormal3fVertex3fSUN; extern PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC __glewReplacementCodeuiNormal3fVertex3fvSUN; extern PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC __glewReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN; extern PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC __glewReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN; extern PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC __glewReplacementCodeuiTexCoord2fNormal3fVertex3fSUN; extern PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC __glewReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN; extern PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC __glewReplacementCodeuiTexCoord2fVertex3fSUN; extern PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC __glewReplacementCodeuiTexCoord2fVertex3fvSUN; extern PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC __glewReplacementCodeuiVertex3fSUN; extern PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC __glewReplacementCodeuiVertex3fvSUN; extern PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC __glewTexCoord2fColor3fVertex3fSUN; extern PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC __glewTexCoord2fColor3fVertex3fvSUN; extern PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC __glewTexCoord2fColor4fNormal3fVertex3fSUN; extern PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC __glewTexCoord2fColor4fNormal3fVertex3fvSUN; extern PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC __glewTexCoord2fColor4ubVertex3fSUN; extern PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC __glewTexCoord2fColor4ubVertex3fvSUN; extern PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC __glewTexCoord2fNormal3fVertex3fSUN; extern PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC __glewTexCoord2fNormal3fVertex3fvSUN; extern PFNGLTEXCOORD2FVERTEX3FSUNPROC __glewTexCoord2fVertex3fSUN; extern PFNGLTEXCOORD2FVERTEX3FVSUNPROC __glewTexCoord2fVertex3fvSUN; extern PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC __glewTexCoord4fColor4fNormal3fVertex4fSUN; extern PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC __glewTexCoord4fColor4fNormal3fVertex4fvSUN; extern PFNGLTEXCOORD4FVERTEX4FSUNPROC __glewTexCoord4fVertex4fSUN; extern PFNGLTEXCOORD4FVERTEX4FVSUNPROC __glewTexCoord4fVertex4fvSUN; extern PFNGLADDSWAPHINTRECTWINPROC __glewAddSwapHintRectWIN; extern GLboolean __GLEW_VERSION_1_1; extern GLboolean __GLEW_VERSION_1_2; extern GLboolean __GLEW_VERSION_1_3; extern GLboolean __GLEW_VERSION_1_4; extern GLboolean __GLEW_VERSION_1_5; extern GLboolean __GLEW_VERSION_2_0; extern GLboolean __GLEW_VERSION_2_1; extern GLboolean __GLEW_3DFX_multisample; extern GLboolean __GLEW_3DFX_tbuffer; extern GLboolean __GLEW_3DFX_texture_compression_FXT1; extern GLboolean __GLEW_APPLE_client_storage; extern GLboolean __GLEW_APPLE_element_array; extern GLboolean __GLEW_APPLE_fence; extern GLboolean __GLEW_APPLE_float_pixels; extern GLboolean __GLEW_APPLE_pixel_buffer; extern GLboolean __GLEW_APPLE_specular_vector; extern GLboolean __GLEW_APPLE_texture_range; extern GLboolean __GLEW_APPLE_transform_hint; extern GLboolean __GLEW_APPLE_vertex_array_object; extern GLboolean __GLEW_APPLE_vertex_array_range; extern GLboolean __GLEW_APPLE_ycbcr_422; extern GLboolean __GLEW_ARB_color_buffer_float; extern GLboolean __GLEW_ARB_depth_texture; extern GLboolean __GLEW_ARB_draw_buffers; extern GLboolean __GLEW_ARB_fragment_program; extern GLboolean __GLEW_ARB_fragment_program_shadow; extern GLboolean __GLEW_ARB_fragment_shader; extern GLboolean __GLEW_ARB_half_float_pixel; extern GLboolean __GLEW_ARB_imaging; extern GLboolean __GLEW_ARB_matrix_palette; extern GLboolean __GLEW_ARB_multisample; extern GLboolean __GLEW_ARB_multitexture; extern GLboolean __GLEW_ARB_occlusion_query; extern GLboolean __GLEW_ARB_pixel_buffer_object; extern GLboolean __GLEW_ARB_point_parameters; extern GLboolean __GLEW_ARB_point_sprite; extern GLboolean __GLEW_ARB_shader_objects; extern GLboolean __GLEW_ARB_shading_language_100; extern GLboolean __GLEW_ARB_shadow; extern GLboolean __GLEW_ARB_shadow_ambient; extern GLboolean __GLEW_ARB_texture_border_clamp; extern GLboolean __GLEW_ARB_texture_compression; extern GLboolean __GLEW_ARB_texture_cube_map; extern GLboolean __GLEW_ARB_texture_env_add; extern GLboolean __GLEW_ARB_texture_env_combine; extern GLboolean __GLEW_ARB_texture_env_crossbar; extern GLboolean __GLEW_ARB_texture_env_dot3; extern GLboolean __GLEW_ARB_texture_float; extern GLboolean __GLEW_ARB_texture_mirrored_repeat; extern GLboolean __GLEW_ARB_texture_non_power_of_two; extern GLboolean __GLEW_ARB_texture_rectangle; extern GLboolean __GLEW_ARB_transpose_matrix; extern GLboolean __GLEW_ARB_vertex_blend; extern GLboolean __GLEW_ARB_vertex_buffer_object; extern GLboolean __GLEW_ARB_vertex_program; extern GLboolean __GLEW_ARB_vertex_shader; extern GLboolean __GLEW_ARB_window_pos; extern GLboolean __GLEW_ATIX_point_sprites; extern GLboolean __GLEW_ATIX_texture_env_combine3; extern GLboolean __GLEW_ATIX_texture_env_route; extern GLboolean __GLEW_ATIX_vertex_shader_output_point_size; extern GLboolean __GLEW_ATI_draw_buffers; extern GLboolean __GLEW_ATI_element_array; extern GLboolean __GLEW_ATI_envmap_bumpmap; extern GLboolean __GLEW_ATI_fragment_shader; extern GLboolean __GLEW_ATI_map_object_buffer; extern GLboolean __GLEW_ATI_pn_triangles; extern GLboolean __GLEW_ATI_separate_stencil; extern GLboolean __GLEW_ATI_text_fragment_shader; extern GLboolean __GLEW_ATI_texture_compression_3dc; extern GLboolean __GLEW_ATI_texture_env_combine3; extern GLboolean __GLEW_ATI_texture_float; extern GLboolean __GLEW_ATI_texture_mirror_once; extern GLboolean __GLEW_ATI_vertex_array_object; extern GLboolean __GLEW_ATI_vertex_attrib_array_object; extern GLboolean __GLEW_ATI_vertex_streams; extern GLboolean __GLEW_EXT_422_pixels; extern GLboolean __GLEW_EXT_Cg_shader; extern GLboolean __GLEW_EXT_abgr; extern GLboolean __GLEW_EXT_bgra; extern GLboolean __GLEW_EXT_bindable_uniform; extern GLboolean __GLEW_EXT_blend_color; extern GLboolean __GLEW_EXT_blend_equation_separate; extern GLboolean __GLEW_EXT_blend_func_separate; extern GLboolean __GLEW_EXT_blend_logic_op; extern GLboolean __GLEW_EXT_blend_minmax; extern GLboolean __GLEW_EXT_blend_subtract; extern GLboolean __GLEW_EXT_clip_volume_hint; extern GLboolean __GLEW_EXT_cmyka; extern GLboolean __GLEW_EXT_color_subtable; extern GLboolean __GLEW_EXT_compiled_vertex_array; extern GLboolean __GLEW_EXT_convolution; extern GLboolean __GLEW_EXT_coordinate_frame; extern GLboolean __GLEW_EXT_copy_texture; extern GLboolean __GLEW_EXT_cull_vertex; extern GLboolean __GLEW_EXT_depth_bounds_test; extern GLboolean __GLEW_EXT_draw_buffers2; extern GLboolean __GLEW_EXT_draw_instanced; extern GLboolean __GLEW_EXT_draw_range_elements; extern GLboolean __GLEW_EXT_fog_coord; extern GLboolean __GLEW_EXT_fragment_lighting; extern GLboolean __GLEW_EXT_framebuffer_blit; extern GLboolean __GLEW_EXT_framebuffer_multisample; extern GLboolean __GLEW_EXT_framebuffer_object; extern GLboolean __GLEW_EXT_framebuffer_sRGB; extern GLboolean __GLEW_EXT_geometry_shader4; extern GLboolean __GLEW_EXT_gpu_shader4; extern GLboolean __GLEW_EXT_histogram; extern GLboolean __GLEW_EXT_index_array_formats; extern GLboolean __GLEW_EXT_index_func; extern GLboolean __GLEW_EXT_index_material; extern GLboolean __GLEW_EXT_index_texture; extern GLboolean __GLEW_EXT_light_texture; extern GLboolean __GLEW_EXT_misc_attribute; extern GLboolean __GLEW_EXT_multi_draw_arrays; extern GLboolean __GLEW_EXT_multisample; extern GLboolean __GLEW_EXT_packed_depth_stencil; extern GLboolean __GLEW_EXT_packed_float; extern GLboolean __GLEW_EXT_packed_pixels; extern GLboolean __GLEW_EXT_paletted_texture; extern GLboolean __GLEW_EXT_pixel_buffer_object; extern GLboolean __GLEW_EXT_pixel_transform; extern GLboolean __GLEW_EXT_pixel_transform_color_table; extern GLboolean __GLEW_EXT_point_parameters; extern GLboolean __GLEW_EXT_polygon_offset; extern GLboolean __GLEW_EXT_rescale_normal; extern GLboolean __GLEW_EXT_scene_marker; extern GLboolean __GLEW_EXT_secondary_color; extern GLboolean __GLEW_EXT_separate_specular_color; extern GLboolean __GLEW_EXT_shadow_funcs; extern GLboolean __GLEW_EXT_shared_texture_palette; extern GLboolean __GLEW_EXT_stencil_clear_tag; extern GLboolean __GLEW_EXT_stencil_two_side; extern GLboolean __GLEW_EXT_stencil_wrap; extern GLboolean __GLEW_EXT_subtexture; extern GLboolean __GLEW_EXT_texture; extern GLboolean __GLEW_EXT_texture3D; extern GLboolean __GLEW_EXT_texture_array; extern GLboolean __GLEW_EXT_texture_buffer_object; extern GLboolean __GLEW_EXT_texture_compression_dxt1; extern GLboolean __GLEW_EXT_texture_compression_latc; extern GLboolean __GLEW_EXT_texture_compression_rgtc; extern GLboolean __GLEW_EXT_texture_compression_s3tc; extern GLboolean __GLEW_EXT_texture_cube_map; extern GLboolean __GLEW_EXT_texture_edge_clamp; extern GLboolean __GLEW_EXT_texture_env; extern GLboolean __GLEW_EXT_texture_env_add; extern GLboolean __GLEW_EXT_texture_env_combine; extern GLboolean __GLEW_EXT_texture_env_dot3; extern GLboolean __GLEW_EXT_texture_filter_anisotropic; extern GLboolean __GLEW_EXT_texture_integer; extern GLboolean __GLEW_EXT_texture_lod_bias; extern GLboolean __GLEW_EXT_texture_mirror_clamp; extern GLboolean __GLEW_EXT_texture_object; extern GLboolean __GLEW_EXT_texture_perturb_normal; extern GLboolean __GLEW_EXT_texture_rectangle; extern GLboolean __GLEW_EXT_texture_sRGB; extern GLboolean __GLEW_EXT_texture_shared_exponent; extern GLboolean __GLEW_EXT_timer_query; extern GLboolean __GLEW_EXT_vertex_array; extern GLboolean __GLEW_EXT_vertex_shader; extern GLboolean __GLEW_EXT_vertex_weighting; extern GLboolean __GLEW_GREMEDY_string_marker; extern GLboolean __GLEW_HP_convolution_border_modes; extern GLboolean __GLEW_HP_image_transform; extern GLboolean __GLEW_HP_occlusion_test; extern GLboolean __GLEW_HP_texture_lighting; extern GLboolean __GLEW_IBM_cull_vertex; extern GLboolean __GLEW_IBM_multimode_draw_arrays; extern GLboolean __GLEW_IBM_rasterpos_clip; extern GLboolean __GLEW_IBM_static_data; extern GLboolean __GLEW_IBM_texture_mirrored_repeat; extern GLboolean __GLEW_IBM_vertex_array_lists; extern GLboolean __GLEW_INGR_color_clamp; extern GLboolean __GLEW_INGR_interlace_read; extern GLboolean __GLEW_INTEL_parallel_arrays; extern GLboolean __GLEW_INTEL_texture_scissor; extern GLboolean __GLEW_KTX_buffer_region; extern GLboolean __GLEW_MESAX_texture_stack; extern GLboolean __GLEW_MESA_pack_invert; extern GLboolean __GLEW_MESA_resize_buffers; extern GLboolean __GLEW_MESA_window_pos; extern GLboolean __GLEW_MESA_ycbcr_texture; extern GLboolean __GLEW_NV_blend_square; extern GLboolean __GLEW_NV_copy_depth_to_color; extern GLboolean __GLEW_NV_depth_buffer_float; extern GLboolean __GLEW_NV_depth_clamp; extern GLboolean __GLEW_NV_evaluators; extern GLboolean __GLEW_NV_fence; extern GLboolean __GLEW_NV_float_buffer; extern GLboolean __GLEW_NV_fog_distance; extern GLboolean __GLEW_NV_fragment_program; extern GLboolean __GLEW_NV_fragment_program2; extern GLboolean __GLEW_NV_fragment_program4; extern GLboolean __GLEW_NV_fragment_program_option; extern GLboolean __GLEW_NV_framebuffer_multisample_coverage; extern GLboolean __GLEW_NV_geometry_program4; extern GLboolean __GLEW_NV_gpu_program4; extern GLboolean __GLEW_NV_half_float; extern GLboolean __GLEW_NV_light_max_exponent; extern GLboolean __GLEW_NV_multisample_filter_hint; extern GLboolean __GLEW_NV_occlusion_query; extern GLboolean __GLEW_NV_packed_depth_stencil; extern GLboolean __GLEW_NV_parameter_buffer_object; extern GLboolean __GLEW_NV_pixel_data_range; extern GLboolean __GLEW_NV_point_sprite; extern GLboolean __GLEW_NV_primitive_restart; extern GLboolean __GLEW_NV_register_combiners; extern GLboolean __GLEW_NV_register_combiners2; extern GLboolean __GLEW_NV_texgen_emboss; extern GLboolean __GLEW_NV_texgen_reflection; extern GLboolean __GLEW_NV_texture_compression_vtc; extern GLboolean __GLEW_NV_texture_env_combine4; extern GLboolean __GLEW_NV_texture_expand_normal; extern GLboolean __GLEW_NV_texture_rectangle; extern GLboolean __GLEW_NV_texture_shader; extern GLboolean __GLEW_NV_texture_shader2; extern GLboolean __GLEW_NV_texture_shader3; extern GLboolean __GLEW_NV_transform_feedback; extern GLboolean __GLEW_NV_vertex_array_range; extern GLboolean __GLEW_NV_vertex_array_range2; extern GLboolean __GLEW_NV_vertex_program; extern GLboolean __GLEW_NV_vertex_program1_1; extern GLboolean __GLEW_NV_vertex_program2; extern GLboolean __GLEW_NV_vertex_program2_option; extern GLboolean __GLEW_NV_vertex_program3; extern GLboolean __GLEW_NV_vertex_program4; extern GLboolean __GLEW_OES_byte_coordinates; extern GLboolean __GLEW_OES_compressed_paletted_texture; extern GLboolean __GLEW_OES_read_format; extern GLboolean __GLEW_OES_single_precision; extern GLboolean __GLEW_OML_interlace; extern GLboolean __GLEW_OML_resample; extern GLboolean __GLEW_OML_subsample; extern GLboolean __GLEW_PGI_misc_hints; extern GLboolean __GLEW_PGI_vertex_hints; extern GLboolean __GLEW_REND_screen_coordinates; extern GLboolean __GLEW_S3_s3tc; extern GLboolean __GLEW_SGIS_color_range; extern GLboolean __GLEW_SGIS_detail_texture; extern GLboolean __GLEW_SGIS_fog_function; extern GLboolean __GLEW_SGIS_generate_mipmap; extern GLboolean __GLEW_SGIS_multisample; extern GLboolean __GLEW_SGIS_pixel_texture; extern GLboolean __GLEW_SGIS_sharpen_texture; extern GLboolean __GLEW_SGIS_texture4D; extern GLboolean __GLEW_SGIS_texture_border_clamp; extern GLboolean __GLEW_SGIS_texture_edge_clamp; extern GLboolean __GLEW_SGIS_texture_filter4; extern GLboolean __GLEW_SGIS_texture_lod; extern GLboolean __GLEW_SGIS_texture_select; extern GLboolean __GLEW_SGIX_async; extern GLboolean __GLEW_SGIX_async_histogram; extern GLboolean __GLEW_SGIX_async_pixel; extern GLboolean __GLEW_SGIX_blend_alpha_minmax; extern GLboolean __GLEW_SGIX_clipmap; extern GLboolean __GLEW_SGIX_depth_texture; extern GLboolean __GLEW_SGIX_flush_raster; extern GLboolean __GLEW_SGIX_fog_offset; extern GLboolean __GLEW_SGIX_fog_texture; extern GLboolean __GLEW_SGIX_fragment_specular_lighting; extern GLboolean __GLEW_SGIX_framezoom; extern GLboolean __GLEW_SGIX_interlace; extern GLboolean __GLEW_SGIX_ir_instrument1; extern GLboolean __GLEW_SGIX_list_priority; extern GLboolean __GLEW_SGIX_pixel_texture; extern GLboolean __GLEW_SGIX_pixel_texture_bits; extern GLboolean __GLEW_SGIX_reference_plane; extern GLboolean __GLEW_SGIX_resample; extern GLboolean __GLEW_SGIX_shadow; extern GLboolean __GLEW_SGIX_shadow_ambient; extern GLboolean __GLEW_SGIX_sprite; extern GLboolean __GLEW_SGIX_tag_sample_buffer; extern GLboolean __GLEW_SGIX_texture_add_env; extern GLboolean __GLEW_SGIX_texture_coordinate_clamp; extern GLboolean __GLEW_SGIX_texture_lod_bias; extern GLboolean __GLEW_SGIX_texture_multi_buffer; extern GLboolean __GLEW_SGIX_texture_range; extern GLboolean __GLEW_SGIX_texture_scale_bias; extern GLboolean __GLEW_SGIX_vertex_preclip; extern GLboolean __GLEW_SGIX_vertex_preclip_hint; extern GLboolean __GLEW_SGIX_ycrcb; extern GLboolean __GLEW_SGI_color_matrix; extern GLboolean __GLEW_SGI_color_table; extern GLboolean __GLEW_SGI_texture_color_table; extern GLboolean __GLEW_SUNX_constant_data; extern GLboolean __GLEW_SUN_convolution_border_modes; extern GLboolean __GLEW_SUN_global_alpha; extern GLboolean __GLEW_SUN_mesh_array; extern GLboolean __GLEW_SUN_read_video_pixels; extern GLboolean __GLEW_SUN_slice_accum; extern GLboolean __GLEW_SUN_triangle_list; extern GLboolean __GLEW_SUN_vertex; extern GLboolean __GLEW_WIN_phong_shading; extern GLboolean __GLEW_WIN_specular_fog; extern GLboolean __GLEW_WIN_swap_hint; # 10618 "/usr/include/GL/glew.h" 3 4 extern GLenum glewInit (); extern GLboolean glewIsSupported (const char* name); extern GLboolean glewExperimental; extern GLboolean glewGetExtension (const char* name); extern const GLubyte* glewGetErrorString (GLenum error); extern const GLubyte* glewGetString (GLenum name); } # 29 "gpu.h" 2 # 1 "/usr/include/GL/glut.h" 1 3 4 # 14 "/usr/include/GL/glut.h" 3 4 extern "C" { # 370 "/usr/include/GL/glut.h" 3 4 extern void *glutStrokeRoman; extern void *glutStrokeMonoRoman; extern void *glutBitmap9By15; extern void *glutBitmap8By13; extern void *glutBitmapTimesRoman10; extern void *glutBitmapTimesRoman24; extern void *glutBitmapHelvetica10; extern void *glutBitmapHelvetica12; extern void *glutBitmapHelvetica18; # 533 "/usr/include/GL/glut.h" 3 4 extern void glutInit(int *argcp, char **argv); extern void glutInitDisplayMode(unsigned int mode); extern void glutInitDisplayString(const char *string); extern void glutInitWindowPosition(int x, int y); extern void glutInitWindowSize(int width, int height); extern void glutMainLoop(void); extern int glutCreateWindow(const char *title); extern int glutCreateSubWindow(int win, int x, int y, int width, int height); extern void glutDestroyWindow(int win); extern void glutPostRedisplay(void); extern void glutPostWindowRedisplay(int win); extern void glutSwapBuffers(void); extern int glutGetWindow(void); extern void glutSetWindow(int win); extern void glutSetWindowTitle(const char *title); extern void glutSetIconTitle(const char *title); extern void glutPositionWindow(int x, int y); extern void glutReshapeWindow(int width, int height); extern void glutPopWindow(void); extern void glutPushWindow(void); extern void glutIconifyWindow(void); extern void glutShowWindow(void); extern void glutHideWindow(void); extern void glutFullScreen(void); extern void glutSetCursor(int cursor); extern void glutWarpPointer(int x, int y); extern void glutEstablishOverlay(void); extern void glutRemoveOverlay(void); extern void glutUseLayer(GLenum layer); extern void glutPostOverlayRedisplay(void); extern void glutPostWindowOverlayRedisplay(int win); extern void glutShowOverlay(void); extern void glutHideOverlay(void); extern int glutCreateMenu(void ( *func)(int)); extern void glutDestroyMenu(int menu); extern int glutGetMenu(void); extern void glutSetMenu(int menu); extern void glutAddMenuEntry(const char *label, int value); extern void glutAddSubMenu(const char *label, int submenu); extern void glutChangeToMenuEntry(int item, const char *label, int value); extern void glutChangeToSubMenu(int item, const char *label, int submenu); extern void glutRemoveMenuItem(int item); extern void glutAttachMenu(int button); extern void glutDetachMenu(int button); extern void glutDisplayFunc(void ( *func)(void)); extern void glutReshapeFunc(void ( *func)(int width, int height)); extern void glutKeyboardFunc(void ( *func)(unsigned char key, int x, int y)); extern void glutMouseFunc(void ( *func)(int button, int state, int x, int y)); extern void glutMotionFunc(void ( *func)(int x, int y)); extern void glutPassiveMotionFunc(void ( *func)(int x, int y)); extern void glutEntryFunc(void ( *func)(int state)); extern void glutVisibilityFunc(void ( *func)(int state)); extern void glutIdleFunc(void ( *func)(void)); extern void glutTimerFunc(unsigned int millis, void ( *func)(int value), int value); extern void glutMenuStateFunc(void ( *func)(int state)); extern void glutSpecialFunc(void ( *func)(int key, int x, int y)); extern void glutSpaceballMotionFunc(void ( *func)(int x, int y, int z)); extern void glutSpaceballRotateFunc(void ( *func)(int x, int y, int z)); extern void glutSpaceballButtonFunc(void ( *func)(int button, int state)); extern void glutButtonBoxFunc(void ( *func)(int button, int state)); extern void glutDialsFunc(void ( *func)(int dial, int value)); extern void glutTabletMotionFunc(void ( *func)(int x, int y)); extern void glutTabletButtonFunc(void ( *func)(int button, int state, int x, int y)); extern void glutMenuStatusFunc(void ( *func)(int status, int x, int y)); extern void glutOverlayDisplayFunc(void ( *func)(void)); extern void glutWindowStatusFunc(void ( *func)(int state)); extern void glutKeyboardUpFunc(void ( *func)(unsigned char key, int x, int y)); extern void glutSpecialUpFunc(void ( *func)(int key, int x, int y)); extern void glutJoystickFunc(void ( *func)(unsigned int buttonMask, int x, int y, int z), int pollInterval); extern void glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue); extern GLfloat glutGetColor(int ndx, int component); extern void glutCopyColormap(int win); extern int glutGet(GLenum type); extern int glutDeviceGet(GLenum type); extern int glutExtensionSupported(const char *name); extern int glutGetModifiers(void); extern int glutLayerGet(GLenum type); extern void * glutGetProcAddress(const char *procName); extern void glutBitmapCharacter(void *font, int character); extern int glutBitmapWidth(void *font, int character); extern void glutStrokeCharacter(void *font, int character); extern int glutStrokeWidth(void *font, int character); extern int glutBitmapLength(void *font, const unsigned char *string); extern int glutStrokeLength(void *font, const unsigned char *string); extern void glutWireSphere(GLdouble radius, GLint slices, GLint stacks); extern void glutSolidSphere(GLdouble radius, GLint slices, GLint stacks); extern void glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); extern void glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); extern void glutWireCube(GLdouble size); extern void glutSolidCube(GLdouble size); extern void glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); extern void glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); extern void glutWireDodecahedron(void); extern void glutSolidDodecahedron(void); extern void glutWireTeapot(GLdouble size); extern void glutSolidTeapot(GLdouble size); extern void glutWireOctahedron(void); extern void glutSolidOctahedron(void); extern void glutWireTetrahedron(void); extern void glutSolidTetrahedron(void); extern void glutWireIcosahedron(void); extern void glutSolidIcosahedron(void); extern int glutVideoResizeGet(GLenum param); extern void glutSetupVideoResizing(void); extern void glutStopVideoResizing(void); extern void glutVideoResize(int x, int y, int width, int height); extern void glutVideoPan(int x, int y, int width, int height); extern void glutReportErrors(void); # 725 "/usr/include/GL/glut.h" 3 4 extern void glutIgnoreKeyRepeat(int ignore); extern void glutSetKeyRepeat(int repeatMode); extern void glutForceJoystickFunc(void); # 739 "/usr/include/GL/glut.h" 3 4 extern void glutGameModeString(const char *string); extern int glutEnterGameMode(void); extern void glutLeaveGameMode(void); extern int glutGameModeGet(GLenum mode); } # 30 "gpu.h" 2 void checkGLErrors(int line, char *file); void printInfoLog(GLhandleARB obj); bool checkFramebufferStatus(); bool initGPU(void); bool configureGPUTextures(unsigned int k, unsigned int vars); bool gpuGDAKernel(unsigned int k, unsigned int vars, double t, float *packedEData, float *packedPiData, float *packedOutData); bool clearGPUTextures(); bool wrapupGPU(void); # 46 "anneal.h" 2 # 1 "../include/vigra/diff2d.hxx" 1 # 47 "anneal.h" 2 # 1 "../include/vigra/iteratoradapter.hxx" 1 # 48 "anneal.h" 2 # 1 "../include/vigra_ext/XMIWrapper.h" 1 # 23 "../include/vigra_ext/XMIWrapper.h" extern "C" { # 1 "/usr/include/xmi.h" 1 3 4 # 74 "/usr/include/xmi.h" 3 4 extern const char mi_libxmi_ver[8]; # 138 "/usr/include/xmi.h" 3 4 typedef struct { int x, y; } miPoint; # 151 "/usr/include/xmi.h" 3 4 typedef unsigned int miPixel; # 165 "/usr/include/xmi.h" 3 4 typedef struct lib_miPaintedSet miPaintedSet; extern miPaintedSet * miNewPaintedSet (void); extern void miDeletePaintedSet (miPaintedSet *paintedSet); extern void miClearPaintedSet (miPaintedSet *paintedSet); typedef struct lib_miGC miGC; extern miGC * miNewGC (int npixels, const miPixel *pixels); extern void miDeleteGC (miGC *pGC); extern miGC * miCopyGC (const miGC *pGC); enum { MI_LINE_SOLID, MI_LINE_ON_OFF_DASH, MI_LINE_DOUBLE_DASH }; enum { MI_JOIN_MITER, MI_JOIN_ROUND, MI_JOIN_BEVEL, MI_JOIN_TRIANGULAR }; enum { MI_CAP_NOT_LAST, MI_CAP_BUTT, MI_CAP_ROUND, MI_CAP_PROJECTING, MI_CAP_TRIANGULAR }; enum { MI_EVEN_ODD_RULE, MI_WINDING_RULE }; enum { MI_ARC_CHORD, MI_ARC_PIE_SLICE }; typedef enum { MI_GC_FILL_RULE, MI_GC_JOIN_STYLE, MI_GC_CAP_STYLE, MI_GC_LINE_STYLE, MI_GC_ARC_MODE, MI_GC_LINE_WIDTH } miGCAttribute; extern void miSetGCAttrib (miGC *pGC, miGCAttribute attribute, int value); extern void miSetGCAttribs (miGC *pGC, int nattributes, const miGCAttribute *attributes, const int *values); extern void miSetGCDashes (miGC *pGC, int ndashes, const unsigned int *dashes, int offset); extern void miSetGCMiterLimit (miGC *pGC, double miter_limit); extern void miSetGCPixels (miGC *pGC, int npixels, const miPixel *pixels); extern void miSetGCPaintSolid (void); extern void miSetGCPaintInterpParallel (miPoint pts[2], miPixel pixels[2]); extern void miSetGCPaintInterpTriangular (miPoint pts[3], miPixel pixels[3]); extern void miSetGCPaintInterpElliptical (void); # 261 "/usr/include/xmi.h" 3 4 typedef enum { MI_COORD_MODE_ORIGIN, MI_COORD_MODE_PREVIOUS } miCoordMode; typedef enum { MI_SHAPE_GENERAL, MI_SHAPE_CONVEX } miPolygonShape; extern "C" { extern void miDrawPoints (miPaintedSet *paintedSet, const miGC *pGC, miCoordMode mode, int npts, const miPoint *pPts); extern void miDrawLines (miPaintedSet *paintedSet, const miGC *pGC, miCoordMode mode, int npts, const miPoint *pPts); extern void miFillPolygon (miPaintedSet *paintedSet, const miGC *pGC, miPolygonShape shape, miCoordMode mode, int npts, const miPoint *pPts); # 282 "/usr/include/xmi.h" 3 4 typedef struct { int x, y; unsigned int width, height; } miRectangle; extern void miDrawRectangles (miPaintedSet *paintedSet, const miGC *pGC, int nrects, const miRectangle *pRects); extern void miFillRectangles (miPaintedSet *paintedSet, const miGC *pGC, int nrects, const miRectangle *pRects); # 311 "/usr/include/xmi.h" 3 4 typedef struct { int x, y; unsigned int width, height; int angle1, angle2; } miArc; extern void miDrawArcs (miPaintedSet *paintedSet, const miGC *pGC, int narcs, const miArc *parcs); extern void miFillArcs (miPaintedSet *paintedSet, const miGC *pGC, int narcs, const miArc *parcs); # 334 "/usr/include/xmi.h" 3 4 typedef struct lib_miEllipseCache miEllipseCache; extern miEllipseCache * miNewEllipseCache (void); extern void miDeleteEllipseCache (miEllipseCache *ellipseCache); extern void miDrawArcs_r (miPaintedSet *paintedSet, const miGC *pGC, int narcs, const miArc *parcs, miEllipseCache *ellipseCache); } # 353 "/usr/include/xmi.h" 3 4 typedef miPixel (*miPixelMerge2) (miPixel source, miPixel destination); typedef miPixel (*miPixelMerge3) (miPixel texture, miPixel source, miPixel destination); typedef struct { int **bitmap; unsigned int width; unsigned int height; } miBitmap; typedef struct { miPixel **pixmap; unsigned int width; unsigned int height; } miPixmap; # 385 "/usr/include/xmi.h" 3 4 typedef miPixmap miCanvasPixmap; typedef struct { miCanvasPixmap *drawable; miBitmap *stipple; miPoint stippleOrigin; miPixmap *texture; miPoint textureOrigin; miPixelMerge2 pixelMerge2; miPixelMerge3 pixelMerge3; } miCanvas; extern void miCopyPaintedSetToCanvas (const miPaintedSet *paintedSet, miCanvas *canvas, miPoint origin); # 446 "/usr/include/xmi.h" 3 4 extern void miSetCanvasStipple (miCanvas *pCanvas, const miBitmap *pStipple, miPoint stippleOrigin); extern void miSetCanvasTexture (miCanvas *pCanvas, const miPixmap *pTexture, miPoint textureOrigin); extern void miSetPixelMerge2 (miCanvas *pCanvas, miPixelMerge2 pixelMerge2); extern void miSetPixelMerge3 (miCanvas *pCanvas, miPixelMerge3 pixelMerge3); # 476 "/usr/include/xmi.h" 3 4 extern miCanvas * miNewCanvas (unsigned int width, unsigned int height, miPixel initPixel); extern void miDeleteCanvas (miCanvas *pCanvas); extern miCanvas * miCopyCanvas (const miCanvas *pCanvas); # 25 "../include/vigra_ext/XMIWrapper.h" 2 } # 34 "../include/vigra_ext/XMIWrapper.h" typedef struct { int count; miPoint *points; unsigned int *widths; } Spans; typedef struct { miPixel pixel; Spans *group; int size; int count; int ymin, ymax; } SpanGroup; typedef struct lib_miPaintedSet { SpanGroup **groups; int size; int ngroups; } _miPaintedSet; namespace vigra_ext { template void copyPaintedSetToImage(DestIterator dest_upperleft, DestIterator dest_lowerright, DestAccessor da, const miPaintedSet *paintedSet, const Diff2D offset) { int dst_w = dest_lowerright.x - dest_upperleft.x; int dst_h = dest_lowerright.y - dest_upperleft.y; for (int group = 0; group < paintedSet->ngroups; group++) { if (paintedSet->groups[group]->group[0].count > 0) { miPixel pixel = paintedSet->groups[group]->pixel; int spans = paintedSet->groups[group]->group[0].count; const miPoint *ppt = paintedSet->groups[group]->group[0].points; unsigned int *pwidth = paintedSet->groups[group]->group[0].widths; if (ppt[0].y + offset.y >= dst_h) continue; if (ppt[spans-1].y + offset.y < 0) continue; for (int i = 0; i < spans; i++) { int y = ppt[i].y + offset.y; if (y < 0) continue; if (y >= dst_h) continue; int width = pwidth[i]; int xstart = ppt[i].x + offset.x; int xend = xstart + width - 1; int xstart_clip = (xstart < 0) ? 0 : xstart; int xend_clip = (xend >= dst_w) ? (dst_w-1) : xend; DestIterator dx = dest_upperleft + Diff2D(xstart_clip, y); for (int x = xstart_clip; x <= xend_clip; ++x, ++dx.x) { da.set(pixel, dx); } } } } }; template void copyPaintedSetToImage(vigra::triple image, const miPaintedSet *paintedSet, const Diff2D offset) { copyPaintedSetToImage(image.first, image.second, image.third, paintedSet, offset); }; } # 49 "anneal.h" 2 using std::for_each; using std::pair; using std::vector; using __gnu_cxx::slist; using boost::lambda::bind; using boost::lambda::_1; using boost::lambda::delete_ptr; using vigra::LineIterator; using vigra::Point2D; using vigra::Rect2D; using vigra_ext::copyPaintedSetToImage; namespace enblend { template void drawDottedLine(CostImage & i, vector & l, typename CostImage::PixelType p) { typedef typename CostImage::PixelType CostImagePixelType; miPixel pixels[2]; pixels[0] = p; pixels[1] = p; miGC *pGC = miNewGC(2, pixels); miPaintedSet *paintedSet = miNewPaintedSet(); miPoint *mip = new miPoint[l.size()]; int index = 0; for (vector::iterator points = l.begin(); points != l.end(); ++points, ++index) { mip[index].x = (*points).x; mip[index].y = (*points).y; } miDrawLines(paintedSet, pGC, MI_COORD_MODE_ORIGIN, index, mip); copyPaintedSetToImage(destImageRange(i), paintedSet, Diff2D(0,0)); miClearPaintedSet(paintedSet); p = (p > (NumericTraits::max() / 2)) ? NumericTraits::zero() : NumericTraits::max(); pixels[0] = p; pixels[1] = p; miSetGCPixels(pGC, 2, pixels); miDrawPoints(paintedSet, pGC, MI_COORD_MODE_ORIGIN, index, mip); copyPaintedSetToImage(destImageRange(i), paintedSet, Diff2D(0,0)); miDeleteGC(pGC); miDeletePaintedSet(paintedSet); delete[] mip; } template class GDAConfiguration { public: typedef typename CostImage::PixelType CostImagePixelType; typedef typename CostImage::const_traverser CostIterator; GDAConfiguration(const CostImage* const d, slist > *v, VisualizeImage* const vi) : costImage(d), visualizeStateSpaceImage(vi), E(__null), Pi(__null), EF(__null), PiF(__null) { kMax = 1; int costImageShortDimension = std::min(costImage->width(), costImage->height()); int stateSpaceWidth = costImageShortDimension / 3; slist >::iterator last = v->previous(v->end()); Point2D previousPoint = last->second; for (slist >::iterator current = v->begin(); current != v->end(); ) { bool currentMoveable = current->first; Point2D currentPoint = current->second; ++current; Point2D nextPoint = (current == v->end()) ? v->begin()->second : current->second; mfEstimates.push_back(currentPoint); vector *stateSpace = new vector(); pointStateSpaces.push_back(stateSpace); vector *stateDistances = new vector(); pointStateDistances.push_back(stateDistances); if (currentMoveable) { Diff2D vp(currentPoint.x - previousPoint.x, currentPoint.y - previousPoint.y); Diff2D vn(nextPoint.x - currentPoint.x, nextPoint.y - currentPoint.y); Diff2D np(-vp.y, vp.x); Diff2D nn(-vn.y, vn.x); Diff2D normal = np + nn; normal *= (stateSpaceWidth / normal.magnitude()); Diff2D leftPoint = currentPoint + normal; Diff2D rightPoint = currentPoint - normal; int lineLength = std::max(std::abs(rightPoint.x - leftPoint.x), std::abs(rightPoint.y - leftPoint.y)); int spaceBetweenPoints = static_cast(ceil(lineLength / (double)GDAKmax)); LineIterator linePoint(currentPoint, leftPoint); for (int i = 0; i < (lineLength+1)/2; ++i, ++linePoint) { if (!costImage->isInside(*linePoint)) break; else if ((*costImage)[*linePoint] == NumericTraits::max()) break; else if ((i % spaceBetweenPoints) == 0) { stateSpace->push_back(Point2D(*linePoint)); stateDistances->push_back(std::max(std::abs(linePoint->x - currentPoint.x), std::abs(linePoint->y - currentPoint.y)) / 2); if (visualizeStateSpaceImage) (*visualizeStateSpaceImage)[*linePoint].setBlue(255); } } linePoint = LineIterator(currentPoint, rightPoint); ++linePoint; for (int i=1; i < 1+(lineLength/2); ++i, ++linePoint) { if (!costImage->isInside(*linePoint)) break; else if ((*costImage)[*linePoint] == NumericTraits::max()) break; else if ((i % spaceBetweenPoints) == 0) { stateSpace->push_back(Point2D(*linePoint)); stateDistances->push_back(std::max(std::abs(linePoint->x - currentPoint.x), std::abs(linePoint->y - currentPoint.y)) / 2); if (visualizeStateSpaceImage) (*visualizeStateSpaceImage)[*linePoint].setBlue(255); } } # 204 "anneal.h" } if (stateSpace->size() == 0) { stateSpace->push_back(currentPoint); stateDistances->push_back(0); if (visualizeStateSpaceImage && costImage->isInside(currentPoint)) { (*visualizeStateSpaceImage)[currentPoint].setBlue(200); } } unsigned int localK = stateSpace->size(); if (localK > GDAKmax) { cerr << "enblend: localK=" << localK << " > GDAKmax=" << GDAKmax << endl; exit(1); } kMax = std::max(kMax, localK); pointStateProbabilities.push_back(new vector(localK, 1.0 / localK)); convergedPoints.push_back(localK < 2); previousPoint = currentPoint; } if (UseGPU) { EF = new float[kMax * mfEstimates.size()]; PiF = new float[kMax * mfEstimates.size()]; } else { E = new int[kMax]; Pi = new double[kMax]; } int kMaxOrig = kMax; if (kMax <= 2) kMax = 15; tau = 0.75; deltaEMax = 7000.0; deltaEMin = 5.0; double epsilon = 1.0 / (kMax * kMax); tInitial = ceil(deltaEMax / log((kMax - 1 + (kMax * kMax * epsilon)) / (kMax - 1 - (kMax * kMax * epsilon)))); tFinal = deltaEMin / log((kMax - (kMax * epsilon) - 1) / (kMax * epsilon)); kMax = kMaxOrig; if (Verbose > 2) { cout << endl << "tInitial=" << tInitial << " tFinal=" << tFinal << " epsilon=" << epsilon << " kMax=" << kMax; cout.flush(); } } ~GDAConfiguration() { for_each(pointStateSpaces.begin(), pointStateSpaces.end(), bind(delete_ptr(),_1)); for_each(pointStateProbabilities.begin(), pointStateProbabilities.end(), bind(delete_ptr(),_1)); for_each(pointStateDistances.begin(), pointStateDistances.end(), bind(delete_ptr(),_1)); delete[] E; delete[] Pi; delete[] EF; delete[] PiF; } void run() { int progressIndicator = 1; int numIterations = (int)ceil(log(tFinal/tInitial)/log(tau)); int iterationCount = 0; int iterationsPerTick = (numIterations+3) / 4; if (UseGPU) configureGPUTextures(kMax, pointStateSpaces.size()); tCurrent = tInitial; if (Verbose > 2) { cout << endl << "tInitial=" << tCurrent << " numIterations=" << numIterations; cout.flush(); } while (tCurrent > tFinal) { double epsilon = 1.0 / kMax; unsigned int eta = (unsigned int)ceil(log(epsilon) / log(((kMax - 2.0) / (2.0 * kMax) * exp(-tCurrent / deltaEMax)) + 0.5)); if (Verbose > 2) { cout << endl << "tCurrent=" << tCurrent << " eta=" << eta << " kMax=" << kMax; cout.flush(); } for (unsigned int i = 0; i < eta; i++) iterate(); tCurrent *= tau; if (Verbose > 2) { int numConvergedPoints = 0; for (unsigned int i = 0; i < convergedPoints.size(); i++) { if (convergedPoints[i]) numConvergedPoints++; } cout << " converged=" << numConvergedPoints << "/" << convergedPoints.size(); cout.flush(); } else if ((Verbose > 0) && (iterationCount % iterationsPerTick) == 0) { cout << " " << progressIndicator++ << "/4"; cout.flush(); } iterationCount++; } if (UseGPU) clearGPUTextures(); if (visualizeStateSpaceImage) { for (unsigned int i = 0; i < pointStateSpaces.size(); ++i) { vector *stateSpace = pointStateSpaces[i]; for (unsigned int j = 0; j < stateSpace->size(); ++j) { Point2D point = (*stateSpace)[j]; if (visualizeStateSpaceImage->isInside(point)) (*visualizeStateSpaceImage)[point].setGreen(255); } } } if (Verbose > 2) { cout << endl; for (unsigned int i = 0; i < convergedPoints.size(); i++) { if (!convergedPoints[i]) { cout << "Unconverged point:" << endl; vector *stateSpace = pointStateSpaces[i]; vector *stateProbabilities = pointStateProbabilities[i]; unsigned int localK = stateSpace->size(); for (unsigned int state = 0; state < localK; ++state) { cout << " state " << (*stateSpace)[state] << " weight=" << (*stateProbabilities)[state] << endl; } cout << " mfEstimate=" << mfEstimates[i] << endl; } } } } vector & getCurrentPoints() { return mfEstimates; } protected: inline void calculateStateProbabilities() { unsigned int lastIndex = mfEstimates.size() - 1; for (unsigned int index = 0; index < mfEstimates.size(); ++index) { if (convergedPoints[index]) continue; vector *stateSpace = pointStateSpaces[index]; vector *stateProbabilities = pointStateProbabilities[index]; vector *stateDistances = pointStateDistances[index]; unsigned int localK = stateSpace->size(); unsigned int nextIndex = (index + 1) % mfEstimates.size(); Point2D lastPointEstimate = mfEstimates[lastIndex]; bool lastPointInCostImage = costImage->isInside(lastPointEstimate); Point2D nextPointEstimate = mfEstimates[nextIndex]; bool nextPointInCostImage = costImage->isInside(nextPointEstimate); lastIndex = index; double exp_a = 1512775 / tCurrent; for (unsigned int i = 0; i < localK; ++i) { Point2D currentPoint = (*stateSpace)[i]; E[i] = (*stateDistances)[i]; if (lastPointInCostImage) E[i] += costImageCost(lastPointEstimate, currentPoint); if (nextPointInCostImage) E[i] += costImageCost(currentPoint, nextPointEstimate); E[i] = NumericTraits::fromRealPromote(E[i] * exp_a); Pi[i] = 0.0; } union { double d; struct { int i, j; } n; } eco; eco.n.j = 0; for (unsigned int j = 0; j < localK; ++j) { double piTj = (*stateProbabilities)[j]; Pi[j] += piTj; int ej = E[j]; for (unsigned int i = (j+1); i < localK; ++i) { double piT = (*stateProbabilities)[i] + piTj; eco.n.i = (ej - E[i]) + (1072693248 - 60801); double piTAn = piT / (1 + eco.d); if (isnan(piTAn)) { if (ej > E[i]) piTAn = 0.0; else piTAn = piT; } Pi[j] += piTAn; Pi[i] += piT - piTAn; } double result = Pi[j] / localK; (*stateProbabilities)[j] = result; } } } inline void calculateStateProbabilitiesGPU() { unsigned int unconvergedPoints = 0; unsigned int lastIndex = mfEstimates.size() - 1; for (unsigned int index = 0; index < mfEstimates.size(); ++index) { if (convergedPoints[index]) continue; unsigned int rowIndex = unconvergedPoints / 4; unsigned int vectorIndex = unconvergedPoints % 4; float *EFbase = &(EF[(rowIndex * kMax * 4) + vectorIndex]); float *PiFbase = &(PiF[(rowIndex * kMax * 4) + vectorIndex]); vector *stateSpace = pointStateSpaces[index]; vector *stateProbabilities = pointStateProbabilities[index]; vector *stateDistances = pointStateDistances[index]; unsigned int localK = stateSpace->size(); unsigned int nextIndex = (index + 1) % mfEstimates.size(); Point2D lastPointEstimate = mfEstimates[lastIndex]; bool lastPointInCostImage = costImage->isInside(lastPointEstimate); Point2D nextPointEstimate = mfEstimates[nextIndex]; bool nextPointInCostImage = costImage->isInside(nextPointEstimate); lastIndex = index; for (unsigned int i = 0; i < localK; ++i) { Point2D currentPoint = (*stateSpace)[i]; EFbase[4*i] = (*stateDistances)[i]; if (lastPointInCostImage) EFbase[4*i] += costImageCost(lastPointEstimate, currentPoint); if (nextPointInCostImage) EFbase[4*i] += costImageCost(currentPoint, nextPointEstimate); PiFbase[4*i] = static_cast((*stateProbabilities)[i]); # 505 "anneal.h" } for (unsigned int i = localK; i < kMax; ++i) { PiFbase[4*i] = 0.0f; } unconvergedPoints++; } gpuGDAKernel(kMax, unconvergedPoints, tCurrent, EF, PiF, PiF); unconvergedPoints = 0; for (unsigned int index = 0; index < mfEstimates.size(); ++index) { if (convergedPoints[index]) continue; unsigned int rowIndex = unconvergedPoints / 4; unsigned int vectorIndex = unconvergedPoints % 4; float *PiFbase = &(PiF[(rowIndex * kMax * 4) + vectorIndex]); vector *stateProbabilities = pointStateProbabilities[index]; unsigned int localK = stateProbabilities->size(); # 538 "anneal.h" for (unsigned int i = 0; i < localK; ++i) { (*stateProbabilities)[i] = static_cast(PiFbase[4*i]); # 576 "anneal.h" } unconvergedPoints++; } } void iterate() { if (UseGPU) { calculateStateProbabilitiesGPU(); # 611 "anneal.h" } else { calculateStateProbabilities(); } kMax = 1; for (unsigned int index = 0; index < pointStateSpaces.size(); ++index) { if (convergedPoints[index]) continue; vector *stateSpace = pointStateSpaces[index]; vector *stateProbabilities = pointStateProbabilities[index]; vector *stateDistances = pointStateDistances[index]; unsigned int localK = stateSpace->size(); double estimateX = 0.0; double estimateY = 0.0; double totalWeight = 0.0; bool hasHighWeightState = false; for (unsigned int k = 0; k < localK; ++k) { double weight = (*stateProbabilities)[k]; totalWeight += weight; if (weight > 0.99) hasHighWeightState = true; Point2D state = (*stateSpace)[k]; estimateX += weight * (double)state.x; estimateY += weight * (double)state.y; } estimateX /= totalWeight; estimateY /= totalWeight; Point2D newEstimate(NumericTraits::fromRealPromote(estimateX), NumericTraits::fromRealPromote(estimateY)); if (!costImage->isInside(newEstimate)) { # 653 "anneal.h" cout << endl << "enblend: optimizer warning: new mean field estimate is outside cost image." << endl; for (unsigned int state = 0; state < localK; ++state) { cout << " state " << (*stateSpace)[state] << " weight = "; cout << (*stateProbabilities)[state] << endl; } cout << " new estimate = " << newEstimate << endl; convergedPoints[index] = true; continue; } mfEstimates[index] = newEstimate; double totalWeights = 0.0; double cutoffWeight = hasHighWeightState ? 0.50 : 0.00001; for (unsigned int k = 0; k < stateSpace->size(); ) { double weight = (*stateProbabilities)[k]; if (weight < cutoffWeight) { (*stateProbabilities)[k] = (*stateProbabilities)[stateProbabilities->size() - 1]; (*stateSpace)[k] = (*stateSpace)[stateSpace->size() - 1]; (*stateDistances)[k] = (*stateDistances)[stateDistances->size() - 1]; stateProbabilities->pop_back(); stateSpace->pop_back(); stateDistances->pop_back(); } else { totalWeights += weight; ++k; } } for (unsigned int k = 0; k < stateSpace->size(); ++k) { (*stateProbabilities)[k] /= totalWeights; } localK = stateSpace->size(); if (localK < 2) convergedPoints[index] = true; kMax = std::max((size_t)kMax, stateProbabilities->size()); } } inline int costImageCost(const Point2D &start, const Point2D &end) { int cost = 0; int lineLength = std::max(std::abs(end.x - start.x), std::abs(end.y - start.y)); if (lineLength > 0) { LineIterator lineStart(costImage->upperLeft() + start, costImage->upperLeft() + end); for (int i = 0; i < lineLength; ++i) { cost += *lineStart; ++lineStart; } } if (lineLength < 8) cost += NumericTraits::max() * (8 - lineLength); return cost; } bool segmentIntersect(const Point2D & l1a, const Point2D & l1b, const Point2D & l2a, const Point2D & l2b) { int denom = (l2b.y - l2a.y)*(l1b.x - l1a.x) - (l2b.x - l2a.x)*(l1b.y - l1a.y); if (denom == 0) return false; int uaNum = (l2b.x - l2a.x)*(l1a.y - l2a.y) - (l2b.y - l2a.y)*(l1a.x - l2a.x); int ubNum = (l1b.x - l1a.x)*(l1a.y - l2a.y) - (l1b.y - l1a.y)*(l1a.x - l2a.x); if (denom < 0) { uaNum *= -1; ubNum *= -1; denom *= -1; } if (uaNum > 0 && uaNum < denom && ubNum > 0 && ubNum < denom) return true; return false; } const CostImage *costImage; VisualizeImage *visualizeStateSpaceImage; vector mfEstimates; vector* > pointStateSpaces; vector* > pointStateProbabilities; vector* > pointStateDistances; vector convergedPoints; double tInitial; double tFinal; double tCurrent; double tau; double deltaEMax; double deltaEMin; unsigned int kMax; int *E; double *Pi; float *EF; float *PiF; }; template void annealSnake(const CostImage* const ci, slist > *snake, VisualizeImage* const vi) { GDAConfiguration cfg(ci, snake, vi); cfg.run(); slist >::iterator snakePoint = snake->begin(); vector::iterator annealedPoint = cfg.getCurrentPoints().begin(); for (; snakePoint != snake->end(); ++snakePoint, ++annealedPoint) { snakePoint->second = *annealedPoint; } }; } # 36 "mask.h" 2 # 1 "nearest.h" 1 # 24 "nearest.h" # 1 "../config.h" 1 # 25 "nearest.h" 2 # 37 "nearest.h" # 1 "../include/vigra/stdcachedfileimage.hxx" 1 # 25 "../include/vigra/stdcachedfileimage.hxx" # 1 "../include/vigra/tuple.hxx" 1 # 26 "../include/vigra/stdcachedfileimage.hxx" 2 # 1 "../include/vigra/iteratortraits.hxx" 1 # 27 "../include/vigra/stdcachedfileimage.hxx" 2 # 1 "../include/vigra/rgbvalue.hxx" 1 # 29 "../include/vigra/stdcachedfileimage.hxx" 2 # 1 "../include/vigra/sized_int.hxx" 1 # 30 "../include/vigra/stdcachedfileimage.hxx" 2 # 1 "../include/vigra/cachedfileimage.hxx" 1 # 31 "../include/vigra/stdcachedfileimage.hxx" 2 namespace vigra { # 105 "../include/vigra/stdcachedfileimage.hxx" template<> struct IteratorTraits< CachedFileImageIterator > { typedef CachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor default_accessor; typedef StandardValueAccessor DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator > { typedef ConstCachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor default_accessor; typedef StandardConstValueAccessor DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator > { typedef StridedCachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor default_accessor; typedef StandardValueAccessor DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator > { typedef ConstStridedCachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor default_accessor; typedef StandardConstValueAccessor DefaultAccessor; }; typedef CachedFileImage UInt8CFImage; template<> struct IteratorTraits< CachedFileImageIterator > { typedef CachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor default_accessor; typedef StandardValueAccessor DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator > { typedef ConstCachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor default_accessor; typedef StandardConstValueAccessor DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator > { typedef StridedCachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor default_accessor; typedef StandardValueAccessor DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator > { typedef ConstStridedCachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor default_accessor; typedef StandardConstValueAccessor DefaultAccessor; }; typedef CachedFileImage Int8CFImage; template<> struct IteratorTraits< CachedFileImageIterator > { typedef CachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor default_accessor; typedef StandardValueAccessor DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator > { typedef ConstCachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor default_accessor; typedef StandardConstValueAccessor DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator > { typedef StridedCachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor default_accessor; typedef StandardValueAccessor DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator > { typedef ConstStridedCachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor default_accessor; typedef StandardConstValueAccessor DefaultAccessor; }; typedef CachedFileImage UInt16CFImage; template<> struct IteratorTraits< CachedFileImageIterator > { typedef CachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor default_accessor; typedef StandardValueAccessor DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator > { typedef ConstCachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor default_accessor; typedef StandardConstValueAccessor DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator > { typedef StridedCachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor default_accessor; typedef StandardValueAccessor DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator > { typedef ConstStridedCachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor default_accessor; typedef StandardConstValueAccessor DefaultAccessor; }; typedef CachedFileImage Int16CFImage; template<> struct IteratorTraits< CachedFileImageIterator > { typedef CachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor default_accessor; typedef StandardValueAccessor DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator > { typedef ConstCachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor default_accessor; typedef StandardConstValueAccessor DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator > { typedef StridedCachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor default_accessor; typedef StandardValueAccessor DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator > { typedef ConstStridedCachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor default_accessor; typedef StandardConstValueAccessor DefaultAccessor; }; typedef CachedFileImage UInt32CFImage; template<> struct IteratorTraits< CachedFileImageIterator > { typedef CachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor default_accessor; typedef StandardValueAccessor DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator > { typedef ConstCachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor default_accessor; typedef StandardConstValueAccessor DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator > { typedef StridedCachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor default_accessor; typedef StandardValueAccessor DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator > { typedef ConstStridedCachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor default_accessor; typedef StandardConstValueAccessor DefaultAccessor; }; typedef CachedFileImage Int32CFImage; template<> struct IteratorTraits< CachedFileImageIterator > { typedef CachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor default_accessor; typedef StandardValueAccessor DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator > { typedef ConstCachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor default_accessor; typedef StandardConstValueAccessor DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator > { typedef StridedCachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor default_accessor; typedef StandardValueAccessor DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator > { typedef ConstStridedCachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor default_accessor; typedef StandardConstValueAccessor DefaultAccessor; }; typedef CachedFileImage FCFImage; template<> struct IteratorTraits< CachedFileImageIterator > { typedef CachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor default_accessor; typedef StandardValueAccessor DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator > { typedef ConstCachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor default_accessor; typedef StandardConstValueAccessor DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator > { typedef StridedCachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardValueAccessor default_accessor; typedef StandardValueAccessor DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator > { typedef ConstStridedCachedFileImageIterator Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef StandardConstValueAccessor default_accessor; typedef StandardConstValueAccessor DefaultAccessor; }; typedef CachedFileImage DCFImage; template<> struct IteratorTraits< CachedFileImageIterator > > { typedef CachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator > > { typedef ConstCachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator > > { typedef StridedCachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator > > { typedef ConstStridedCachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; typedef CachedFileImage > UInt8RGBCFImage; template<> struct IteratorTraits< CachedFileImageIterator > > { typedef CachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator > > { typedef ConstCachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator > > { typedef StridedCachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator > > { typedef ConstStridedCachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; typedef CachedFileImage > Int8RGBCFImage; template<> struct IteratorTraits< CachedFileImageIterator > > { typedef CachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator > > { typedef ConstCachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator > > { typedef StridedCachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator > > { typedef ConstStridedCachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; typedef CachedFileImage > UInt16RGBCFImage; template<> struct IteratorTraits< CachedFileImageIterator > > { typedef CachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator > > { typedef ConstCachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator > > { typedef StridedCachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator > > { typedef ConstStridedCachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; typedef CachedFileImage > Int16RGBCFImage; template<> struct IteratorTraits< CachedFileImageIterator > > { typedef CachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator > > { typedef ConstCachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator > > { typedef StridedCachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator > > { typedef ConstStridedCachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; typedef CachedFileImage > UInt32RGBCFImage; template<> struct IteratorTraits< CachedFileImageIterator > > { typedef CachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator > > { typedef ConstCachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator > > { typedef StridedCachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator > > { typedef ConstStridedCachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; typedef CachedFileImage > Int32RGBCFImage; template<> struct IteratorTraits< CachedFileImageIterator > > { typedef CachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator > > { typedef ConstCachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator > > { typedef StridedCachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator > > { typedef ConstStridedCachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; typedef CachedFileImage > FRGBCFImage; template<> struct IteratorTraits< CachedFileImageIterator > > { typedef CachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; template<> struct IteratorTraits< ConstCachedFileImageIterator > > { typedef ConstCachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; template<> struct IteratorTraits< StridedCachedFileImageIterator > > { typedef StridedCachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; template<> struct IteratorTraits< ConstStridedCachedFileImageIterator > > { typedef ConstStridedCachedFileImageIterator > Iterator; typedef Iterator iterator; typedef iterator::iterator_category iterator_category; typedef iterator::value_type value_type; typedef iterator::reference reference; typedef iterator::index_reference index_reference; typedef iterator::pointer pointer; typedef iterator::difference_type difference_type; typedef iterator::row_iterator row_iterator; typedef iterator::column_iterator column_iterator; typedef RGBAccessor > default_accessor; typedef RGBAccessor > DefaultAccessor; }; typedef CachedFileImage > DRGBCFImage; template struct IteratorTraits > { typedef CachedFileImageIterator Iterator; typedef Iterator iterator; typedef typename iterator::iterator_category iterator_category; typedef typename iterator::value_type value_type; typedef typename iterator::reference reference; typedef typename iterator::index_reference index_reference; typedef typename iterator::pointer pointer; typedef typename iterator::difference_type difference_type; typedef typename iterator::row_iterator row_iterator; typedef typename iterator::column_iterator column_iterator; typedef StandardAccessor DefaultAccessor; typedef StandardAccessor default_accessor; }; template struct IteratorTraits > { typedef ConstCachedFileImageIterator Iterator; typedef Iterator iterator; typedef typename iterator::iterator_category iterator_category; typedef typename iterator::value_type value_type; typedef typename iterator::reference reference; typedef typename iterator::index_reference index_reference; typedef typename iterator::pointer pointer; typedef typename iterator::difference_type difference_type; typedef typename iterator::row_iterator row_iterator; typedef typename iterator::column_iterator column_iterator; typedef StandardConstAccessor DefaultAccessor; typedef StandardConstAccessor default_accessor; }; } # 38 "nearest.h" 2 using std::cerr; using std::cout; using std::endl; using std::pair; using vigra::NumericTraits; using vigra::triple; namespace enblend { template inline dist_t _nftDistance(dist_t deltaX, dist_t deltaY) { return (deltaY == NumericTraits::max()) ? deltaY : (deltaY + (deltaX * deltaX)); # 69 "nearest.h" }; template inline dist_t _nftDistance(dist_t deltaY) { return deltaY * deltaY; # 85 "nearest.h" }; template class FeatureList { struct Node { T value; Node *prev; }; Node *array; Node *firstUnused; Node *last; Node *iterator; public: FeatureList(int size) { array = new Node[size]; firstUnused = array; last = __null; iterator = __null; } ~FeatureList() { delete [] array; } void clear() { firstUnused = array; last = __null; iterator = __null; } void push_back(const T& value) { firstUnused->value = value; firstUnused->prev = last; last = firstUnused; firstUnused++; } void move_to_beginning() { iterator = array; } void move_to_end() { iterator = last; } bool has_previous() const { return (iterator->prev != __null); } void erase_previous() { iterator->prev = iterator->prev->prev; } T get_current() { return iterator->value; } T get_previous() { return iterator->prev->value; } void move_backwards() { iterator = iterator->prev; } bool empty() { return (last == __null); } }; template void nearestFeatureTransform(bool wraparound, SrcImageIterator src_upperleft, SrcImageIterator src_lowerright, SrcAccessor sa, DestImageIterator dest_upperleft, DestAccessor da, typename SrcAccessor::value_type featurelessPixel) { typedef typename EnblendNumericTraits::ImageType DNFImage; typedef typename DNFImage::traverser DnfIterator; typedef typename SrcAccessor::value_type SrcValueType; SrcImageIterator sx, sy, send, smidpoint; DnfIterator dnfcx, dnfcy; DnfIterator dnflx, dnfly; DestImageIterator dx, dy; int w = src_lowerright.x - src_upperleft.x; int h = src_lowerright.y - src_upperleft.y; DNFImage *dnfColumn = new DNFImage(w, h); DNFImage *dnfLeft = new DNFImage(w, h); SrcValueType* lastFeature = new SrcValueType[w]; bool* foundFirstFeature = new bool[w]; UInt32* lastFeatureDeltaY = new UInt32[w]; if (Verbose > 0) { if (wraparound) cout << "Creating blend mask: 1/6"; else cout << "Creating blend mask: 1/4"; cout.flush(); } for (int i = 0; i < w; i++) { foundFirstFeature[i] = false; } sy = src_upperleft; send = src_lowerright; dnfcy = dnfColumn->upperLeft(); dy = dest_upperleft; for (; sy.y < send.y; ++sy.y, ++dnfcy.y, ++dy.y) { sx = sy; dnfcx = dnfcy; dx = dy; for (int xIndex = 0; sx.x < send.x; ++sx.x, ++dnfcx.x, ++dx.x, ++xIndex) { if (sa(sx) != featurelessPixel) { lastFeature[xIndex] = sa(sx); foundFirstFeature[xIndex] = true; *dnfcx = 0; lastFeatureDeltaY[xIndex] = 0; da.set(lastFeature[xIndex], dx); } else if (foundFirstFeature[xIndex]) { *dnfcx = _nftDistance(lastFeatureDeltaY[xIndex]); da.set(lastFeature[xIndex], dx); } else { *dnfcx = NumericTraits::max(); } ++lastFeatureDeltaY[xIndex]; } } if (Verbose > 0) { if (wraparound) cout << " 2/6"; else cout << " 2/4"; cout.flush(); } for (int i = 0; i < w; i++) { foundFirstFeature[i] = false; } sy = src_lowerright; send = src_upperleft; dnfcy = dnfColumn->lowerRight(); dy = dest_upperleft + Diff2D(w, h); for (; sy.y > send.y;) { --sy.y; --dnfcy.y; --dy.y; sx = sy; dnfcx = dnfcy; dx = dy; for (int xIndex = w-1; sx.x > send.x; --xIndex) { --sx.x; --dnfcx.x; --dx.x; if (sa(sx) != featurelessPixel) { lastFeature[xIndex] = sa(sx); foundFirstFeature[xIndex] = true; *dnfcx = 0; lastFeatureDeltaY[xIndex] = 0; } else if (foundFirstFeature[xIndex]) { UInt32 distLastFeature = _nftDistance(lastFeatureDeltaY[xIndex]); if (distLastFeature < *dnfcx) { *dnfcx = distLastFeature; da.set(lastFeature[xIndex], dx); } } ++lastFeatureDeltaY[xIndex]; } } FeatureList potentialFeatureList((wraparound) ? w*2 : w); if (Verbose > 0) { if (wraparound) cout << " 3/6"; else cout << " 3/4"; cout.flush(); } sy = src_upperleft; send = src_lowerright; smidpoint = src_upperleft + Diff2D(w/2, h/2); dnfcy = dnfColumn->upperLeft(); dnfly = dnfLeft->upperLeft(); dy = dest_upperleft; for (; sy.y < send.y; ++sy.y, ++dnfcy.y, ++dnfly.y, ++dy.y) { if (Verbose > 0 && wraparound && (sy.y == smidpoint.y)) { cout << " 4/6"; cout.flush(); } potentialFeatureList.clear(); for (int twiceAround = (wraparound?1:0); twiceAround >= 0; twiceAround--) { sx = sy; dnfcx = dnfcy; dnflx = dnfly; dx = dy; for (; sx.x < send.x; ++sx.x, ++dnfcx.x, ++dnflx.x, ++dx.x) { UInt32 distPotentialFeature = *dnfcx; if (distPotentialFeature == NumericTraits::max()) { if (potentialFeatureList.empty()) { *dnflx = distPotentialFeature; continue; } potentialFeatureList.move_to_end(); typename DnfIterator::MoveX firstFeature = potentialFeatureList.get_current(); int deltaX = (dnfcx.x - firstFeature) % w; if (deltaX < 0) deltaX += w; distPotentialFeature = _nftDistance((UInt32)deltaX, dnfcx(firstFeature - dnfcx.x, 0)); } else { potentialFeatureList.push_back(dnfcx.x); potentialFeatureList.move_to_end(); } while (potentialFeatureList.has_previous()) { typename DnfIterator::MoveX previousFeature = potentialFeatureList.get_previous(); int deltaX = (dnfcx.x - previousFeature) % w; if (deltaX < 0) deltaX += w; UInt32 distPreviousFeature = _nftDistance((UInt32)deltaX, dnfcx(previousFeature - dnfcx.x, 0)); if (distPreviousFeature >= distPotentialFeature) { potentialFeatureList.erase_previous(); } else { potentialFeatureList.move_backwards(); distPotentialFeature = distPreviousFeature; } } *dnflx = distPotentialFeature; da.set(dx((potentialFeatureList.get_current() - dnfcx.x), 0), dx); } } } if (Verbose > 0) { if (wraparound) cout << " 5/6"; else cout << " 4/4"; cout.flush(); } sy = src_lowerright; send = src_upperleft; smidpoint = src_upperleft + Diff2D(w/2, h/2); dnfcy = dnfColumn->lowerRight(); dnfly = dnfLeft->lowerRight(); dy = dest_upperleft + Diff2D(w, h); for (; sy.y > send.y;) { --sy.y; --dnfcy.y; --dnfly.y; --dy.y; if (Verbose > 0 && wraparound && (sy.y == smidpoint.y)) { cout << " 6/6"; cout.flush(); } potentialFeatureList.clear(); for (int twiceAround = (wraparound?1:0); twiceAround >= 0; twiceAround--) { sx = sy; dnfcx = dnfcy; dnflx = dnfly; dx = dy; for (; sx.x > send.x;) { --sx.x; --dnfcx.x; --dnflx.x; --dx.x; UInt32 distPotentialFeature = *dnfcx; if (distPotentialFeature == NumericTraits::max()) { if (potentialFeatureList.empty()) { continue; } potentialFeatureList.move_to_end(); typename DnfIterator::MoveX firstFeature = potentialFeatureList.get_current(); int deltaX = (firstFeature - dnfcx.x) % w; if (deltaX < 0) deltaX += w; distPotentialFeature = _nftDistance((UInt32)deltaX, dnfcx(firstFeature - dnfcx.x, 0)); } else { potentialFeatureList.push_back(dnfcx.x); potentialFeatureList.move_to_end(); } while (potentialFeatureList.has_previous()) { typename DnfIterator::MoveX previousFeature = potentialFeatureList.get_previous(); int deltaX = (previousFeature - dnfcx.x) % w; if (deltaX < 0) deltaX += w; UInt32 distPreviousFeature = _nftDistance((UInt32)deltaX, dnfcx(previousFeature - dnfcx.x, 0)); if (distPreviousFeature >= distPotentialFeature) { potentialFeatureList.erase_previous(); } else { potentialFeatureList.move_backwards(); distPotentialFeature = distPreviousFeature; } } if (*dnflx > distPotentialFeature) { da.set(dx((potentialFeatureList.get_current() - dnfcx.x), 0), dx); } } } } delete dnfColumn; delete dnfLeft; delete [] lastFeature; delete [] foundFirstFeature; delete [] lastFeatureDeltaY; if (Verbose > 0) { cout << endl; } return; }; template inline void nearestFeatureTransform(bool wraparound, triple src, pair dest, typename SrcAccessor::value_type featurelessPixel) { nearestFeatureTransform(wraparound, src.first, src.second, src.third, dest.first, dest.second, featurelessPixel); }; } # 37 "mask.h" 2 # 1 "path.h" 1 # 24 "path.h" # 1 "../config.h" 1 # 25 "path.h" 2 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/queue" 1 3 # 63 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/queue" 3 # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/queue" 3 # 73 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/queue" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/deque" 1 3 # 63 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/deque" 3 # 64 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/deque" 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 1 3 # 69 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 83 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 inline size_t __deque_buf_size(size_t __size) { return __size < 512 ? size_t(512 / __size) : size_t(1); } # 101 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 template struct _Deque_iterator { typedef _Deque_iterator<_Tp, _Tp&, _Tp*> iterator; typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator; static size_t _S_buffer_size() { return __deque_buf_size(sizeof(_Tp)); } typedef std::random_access_iterator_tag iterator_category; typedef _Tp value_type; typedef _Ptr pointer; typedef _Ref reference; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Tp** _Map_pointer; typedef _Deque_iterator _Self; _Tp* _M_cur; _Tp* _M_first; _Tp* _M_last; _Map_pointer _M_node; _Deque_iterator(_Tp* __x, _Map_pointer __y) : _M_cur(__x), _M_first(*__y), _M_last(*__y + _S_buffer_size()), _M_node(__y) {} _Deque_iterator() : _M_cur(0), _M_first(0), _M_last(0), _M_node(0) {} _Deque_iterator(const iterator& __x) : _M_cur(__x._M_cur), _M_first(__x._M_first), _M_last(__x._M_last), _M_node(__x._M_node) {} reference operator*() const { return *_M_cur; } pointer operator->() const { return _M_cur; } _Self& operator++() { ++_M_cur; if (_M_cur == _M_last) { _M_set_node(_M_node + 1); _M_cur = _M_first; } return *this; } _Self operator++(int) { _Self __tmp = *this; ++*this; return __tmp; } _Self& operator--() { if (_M_cur == _M_first) { _M_set_node(_M_node - 1); _M_cur = _M_last; } --_M_cur; return *this; } _Self operator--(int) { _Self __tmp = *this; --*this; return __tmp; } _Self& operator+=(difference_type __n) { const difference_type __offset = __n + (_M_cur - _M_first); if (__offset >= 0 && __offset < difference_type(_S_buffer_size())) _M_cur += __n; else { const difference_type __node_offset = __offset > 0 ? __offset / difference_type(_S_buffer_size()) : -difference_type((-__offset - 1) / _S_buffer_size()) - 1; _M_set_node(_M_node + __node_offset); _M_cur = _M_first + (__offset - __node_offset * difference_type(_S_buffer_size())); } return *this; } _Self operator+(difference_type __n) const { _Self __tmp = *this; return __tmp += __n; } _Self& operator-=(difference_type __n) { return *this += -__n; } _Self operator-(difference_type __n) const { _Self __tmp = *this; return __tmp -= __n; } reference operator[](difference_type __n) const { return *(*this + __n); } void _M_set_node(_Map_pointer __new_node) { _M_node = __new_node; _M_first = *__new_node; _M_last = _M_first + difference_type(_S_buffer_size()); } }; template inline bool operator==(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) { return __x._M_cur == __y._M_cur; } template inline bool operator==(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) { return __x._M_cur == __y._M_cur; } template inline bool operator!=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) { return !(__x == __y); } template inline bool operator!=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) { return !(__x == __y); } template inline bool operator<(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) { return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur) : (__x._M_node < __y._M_node); } template inline bool operator<(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) { return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur) : (__x._M_node < __y._M_node); } template inline bool operator>(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) { return __y < __x; } template inline bool operator>(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) { return __y < __x; } template inline bool operator<=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) { return !(__y < __x); } template inline bool operator<=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) { return !(__y < __x); } template inline bool operator>=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) { return !(__x < __y); } template inline bool operator>=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) { return !(__x < __y); } template inline typename _Deque_iterator<_Tp, _Ref, _Ptr>::difference_type operator-(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) { return typename _Deque_iterator<_Tp, _Ref, _Ptr>::difference_type (_Deque_iterator<_Tp, _Ref, _Ptr>::_S_buffer_size()) * (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first) + (__y._M_last - __y._M_cur); } template inline typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type operator-(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) { return typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type (_Deque_iterator<_Tp, _RefL, _PtrL>::_S_buffer_size()) * (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first) + (__y._M_last - __y._M_cur); } template inline _Deque_iterator<_Tp, _Ref, _Ptr> operator+(ptrdiff_t __n, const _Deque_iterator<_Tp, _Ref, _Ptr>& __x) { return __x + __n; } template void fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>& __first, const _Deque_iterator<_Tp, _Tp&, _Tp*>& __last, const _Tp& __value); # 370 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 template class _Deque_base { public: typedef _Alloc allocator_type; allocator_type get_allocator() const { return allocator_type(_M_get_Tp_allocator()); } typedef _Deque_iterator<_Tp, _Tp&, _Tp*> iterator; typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator; _Deque_base(const allocator_type& __a, size_t __num_elements) : _M_impl(__a) { _M_initialize_map(__num_elements); } _Deque_base(const allocator_type& __a) : _M_impl(__a) { } ~_Deque_base(); protected: typedef typename _Alloc::template rebind<_Tp*>::other _Map_alloc_type; typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; struct _Deque_impl : public _Tp_alloc_type { _Tp** _M_map; size_t _M_map_size; iterator _M_start; iterator _M_finish; _Deque_impl(const _Tp_alloc_type& __a) : _Tp_alloc_type(__a), _M_map(0), _M_map_size(0), _M_start(), _M_finish() { } }; _Tp_alloc_type& _M_get_Tp_allocator() { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); } const _Tp_alloc_type& _M_get_Tp_allocator() const { return *static_cast(&this->_M_impl); } _Map_alloc_type _M_get_map_allocator() const { return _Map_alloc_type(_M_get_Tp_allocator()); } _Tp* _M_allocate_node() { return _M_impl._Tp_alloc_type::allocate(__deque_buf_size(sizeof(_Tp))); } void _M_deallocate_node(_Tp* __p) { _M_impl._Tp_alloc_type::deallocate(__p, __deque_buf_size(sizeof(_Tp))); } _Tp** _M_allocate_map(size_t __n) { return _M_get_map_allocator().allocate(__n); } void _M_deallocate_map(_Tp** __p, size_t __n) { _M_get_map_allocator().deallocate(__p, __n); } protected: void _M_initialize_map(size_t); void _M_create_nodes(_Tp** __nstart, _Tp** __nfinish); void _M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish); enum { _S_initial_map_size = 8 }; _Deque_impl _M_impl; }; template _Deque_base<_Tp, _Alloc>:: ~_Deque_base() { if (this->_M_impl._M_map) { _M_destroy_nodes(this->_M_impl._M_start._M_node, this->_M_impl._M_finish._M_node + 1); _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); } } # 478 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 template void _Deque_base<_Tp, _Alloc>:: _M_initialize_map(size_t __num_elements) { const size_t __num_nodes = (__num_elements/ __deque_buf_size(sizeof(_Tp)) + 1); this->_M_impl._M_map_size = std::max((size_t) _S_initial_map_size, size_t(__num_nodes + 2)); this->_M_impl._M_map = _M_allocate_map(this->_M_impl._M_map_size); _Tp** __nstart = (this->_M_impl._M_map + (this->_M_impl._M_map_size - __num_nodes) / 2); _Tp** __nfinish = __nstart + __num_nodes; try { _M_create_nodes(__nstart, __nfinish); } catch(...) { _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); this->_M_impl._M_map = 0; this->_M_impl._M_map_size = 0; throw; } this->_M_impl._M_start._M_set_node(__nstart); this->_M_impl._M_finish._M_set_node(__nfinish - 1); this->_M_impl._M_start._M_cur = _M_impl._M_start._M_first; this->_M_impl._M_finish._M_cur = (this->_M_impl._M_finish._M_first + __num_elements % __deque_buf_size(sizeof(_Tp))); } template void _Deque_base<_Tp, _Alloc>:: _M_create_nodes(_Tp** __nstart, _Tp** __nfinish) { _Tp** __cur; try { for (__cur = __nstart; __cur < __nfinish; ++__cur) *__cur = this->_M_allocate_node(); } catch(...) { _M_destroy_nodes(__nstart, __cur); throw; } } template void _Deque_base<_Tp, _Alloc>:: _M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish) { for (_Tp** __n = __nstart; __n < __nfinish; ++__n) _M_deallocate_node(*__n); } # 628 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 template > class deque : protected _Deque_base<_Tp, _Alloc> { typedef typename _Alloc::value_type _Alloc_value_type; typedef _Deque_base<_Tp, _Alloc> _Base; typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; public: typedef _Tp value_type; typedef typename _Tp_alloc_type::pointer pointer; typedef typename _Tp_alloc_type::const_pointer const_pointer; typedef typename _Tp_alloc_type::reference reference; typedef typename _Tp_alloc_type::const_reference const_reference; typedef typename _Base::iterator iterator; typedef typename _Base::const_iterator const_iterator; typedef std::reverse_iterator const_reverse_iterator; typedef std::reverse_iterator reverse_iterator; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Alloc allocator_type; protected: typedef pointer* _Map_pointer; static size_t _S_buffer_size() { return __deque_buf_size(sizeof(_Tp)); } using _Base::_M_initialize_map; using _Base::_M_create_nodes; using _Base::_M_destroy_nodes; using _Base::_M_allocate_node; using _Base::_M_deallocate_node; using _Base::_M_allocate_map; using _Base::_M_deallocate_map; using _Base::_M_get_Tp_allocator; using _Base::_M_impl; public: explicit deque(const allocator_type& __a = allocator_type()) : _Base(__a, 0) {} # 693 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 explicit deque(size_type __n, const value_type& __value = value_type(), const allocator_type& __a = allocator_type()) : _Base(__a, __n) { _M_fill_initialize(__value); } # 706 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 deque(const deque& __x) : _Base(__x._M_get_Tp_allocator(), __x.size()) { std::__uninitialized_copy_a(__x.begin(), __x.end(), this->_M_impl._M_start, _M_get_Tp_allocator()); } # 726 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 template deque(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) : _Base(__a) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_initialize_dispatch(__first, __last, _Integral()); } ~deque() { _M_destroy_data(begin(), end(), _M_get_Tp_allocator()); } # 751 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 deque& operator=(const deque& __x); # 764 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 void assign(size_type __n, const value_type& __val) { _M_fill_assign(__n, __val); } # 780 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 template void assign(_InputIterator __first, _InputIterator __last) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_assign_dispatch(__first, __last, _Integral()); } allocator_type get_allocator() const { return _Base::get_allocator(); } iterator begin() { return this->_M_impl._M_start; } const_iterator begin() const { return this->_M_impl._M_start; } iterator end() { return this->_M_impl._M_finish; } const_iterator end() const { return this->_M_impl._M_finish; } reverse_iterator rbegin() { return reverse_iterator(this->_M_impl._M_finish); } const_reverse_iterator rbegin() const { return const_reverse_iterator(this->_M_impl._M_finish); } reverse_iterator rend() { return reverse_iterator(this->_M_impl._M_start); } const_reverse_iterator rend() const { return const_reverse_iterator(this->_M_impl._M_start); } size_type size() const { return this->_M_impl._M_finish - this->_M_impl._M_start; } size_type max_size() const { return _M_get_Tp_allocator().max_size(); } # 886 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 void resize(size_type __new_size, value_type __x = value_type()) { const size_type __len = size(); if (__new_size < __len) _M_erase_at_end(this->_M_impl._M_start + difference_type(__new_size)); else insert(this->_M_impl._M_finish, __new_size - __len, __x); } bool empty() const { return this->_M_impl._M_finish == this->_M_impl._M_start; } # 916 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 reference operator[](size_type __n) { return this->_M_impl._M_start[difference_type(__n)]; } # 931 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 const_reference operator[](size_type __n) const { return this->_M_impl._M_start[difference_type(__n)]; } protected: void _M_range_check(size_type __n) const { if (__n >= this->size()) __throw_out_of_range(("deque::_M_range_check")); } public: # 956 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 reference at(size_type __n) { _M_range_check(__n); return (*this)[__n]; } # 974 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 const_reference at(size_type __n) const { _M_range_check(__n); return (*this)[__n]; } reference front() { return *begin(); } const_reference front() const { return *begin(); } reference back() { iterator __tmp = end(); --__tmp; return *__tmp; } const_reference back() const { const_iterator __tmp = end(); --__tmp; return *__tmp; } # 1031 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 void push_front(const value_type& __x) { if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first) { this->_M_impl.construct(this->_M_impl._M_start._M_cur - 1, __x); --this->_M_impl._M_start._M_cur; } else _M_push_front_aux(__x); } # 1052 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 void push_back(const value_type& __x) { if (this->_M_impl._M_finish._M_cur != this->_M_impl._M_finish._M_last - 1) { this->_M_impl.construct(this->_M_impl._M_finish._M_cur, __x); ++this->_M_impl._M_finish._M_cur; } else _M_push_back_aux(__x); } # 1073 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 void pop_front() { if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_last - 1) { this->_M_impl.destroy(this->_M_impl._M_start._M_cur); ++this->_M_impl._M_start._M_cur; } else _M_pop_front_aux(); } # 1094 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 void pop_back() { if (this->_M_impl._M_finish._M_cur != this->_M_impl._M_finish._M_first) { --this->_M_impl._M_finish._M_cur; this->_M_impl.destroy(this->_M_impl._M_finish._M_cur); } else _M_pop_back_aux(); } # 1116 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 iterator insert(iterator __position, const value_type& __x); # 1128 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 void insert(iterator __position, size_type __n, const value_type& __x) { _M_fill_insert(__position, __n, __x); } # 1142 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 template void insert(iterator __position, _InputIterator __first, _InputIterator __last) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_insert_dispatch(__position, __first, __last, _Integral()); } # 1165 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 iterator erase(iterator __position); # 1184 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 iterator erase(iterator __first, iterator __last); # 1196 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 void swap(deque& __x) { std::swap(this->_M_impl._M_start, __x._M_impl._M_start); std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); std::swap(this->_M_impl._M_map, __x._M_impl._M_map); std::swap(this->_M_impl._M_map_size, __x._M_impl._M_map_size); std::__alloc_swap<_Tp_alloc_type>::_S_do_it(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); } void clear() { _M_erase_at_end(begin()); } protected: template void _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) { _M_initialize_map(__n); _M_fill_initialize(__x); } template void _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { typedef typename std::iterator_traits<_InputIterator>:: iterator_category _IterCategory; _M_range_initialize(__first, __last, _IterCategory()); } # 1257 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 template void _M_range_initialize(_InputIterator __first, _InputIterator __last, std::input_iterator_tag); template void _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); # 1281 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 void _M_fill_initialize(const value_type& __value); template void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) { _M_fill_assign(static_cast(__n), static_cast(__val)); } template void _M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { typedef typename std::iterator_traits<_InputIterator>:: iterator_category _IterCategory; _M_assign_aux(__first, __last, _IterCategory()); } template void _M_assign_aux(_InputIterator __first, _InputIterator __last, std::input_iterator_tag); template void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { const size_type __len = std::distance(__first, __last); if (__len > size()) { _ForwardIterator __mid = __first; std::advance(__mid, size()); std::copy(__first, __mid, begin()); insert(end(), __mid, __last); } else _M_erase_at_end(std::copy(__first, __last, begin())); } void _M_fill_assign(size_type __n, const value_type& __val) { if (__n > size()) { std::fill(begin(), end(), __val); insert(end(), __n - size(), __val); } else { _M_erase_at_end(begin() + difference_type(__n)); std::fill(begin(), end(), __val); } } void _M_push_back_aux(const value_type&); void _M_push_front_aux(const value_type&); void _M_pop_back_aux(); void _M_pop_front_aux(); template void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, __true_type) { _M_fill_insert(__pos, static_cast(__n), static_cast(__x)); } template void _M_insert_dispatch(iterator __pos, _InputIterator __first, _InputIterator __last, __false_type) { typedef typename std::iterator_traits<_InputIterator>:: iterator_category _IterCategory; _M_range_insert_aux(__pos, __first, __last, _IterCategory()); } template void _M_range_insert_aux(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag); template void _M_range_insert_aux(iterator __pos, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); void _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); iterator _M_insert_aux(iterator __pos, const value_type& __x); void _M_insert_aux(iterator __pos, size_type __n, const value_type& __x); template void _M_insert_aux(iterator __pos, _ForwardIterator __first, _ForwardIterator __last, size_type __n); void _M_destroy_data_aux(iterator __first, iterator __last); void _M_destroy_data_dispatch(iterator, iterator, __true_type) { } void _M_destroy_data_dispatch(iterator __first, iterator __last, __false_type) { _M_destroy_data_aux(__first, __last); } template void _M_destroy_data(iterator __first, iterator __last, const _Alloc1&) { _M_destroy_data_aux(__first, __last); } void _M_destroy_data(iterator __first, iterator __last, const std::allocator<_Tp>&) { typedef typename std::__is_scalar::__type _Has_trivial_destructor; _M_destroy_data_dispatch(__first, __last, _Has_trivial_destructor()); } void _M_erase_at_begin(iterator __pos) { _M_destroy_data(begin(), __pos, _M_get_Tp_allocator()); _M_destroy_nodes(this->_M_impl._M_start._M_node, __pos._M_node); this->_M_impl._M_start = __pos; } void _M_erase_at_end(iterator __pos) { _M_destroy_data(__pos, end(), _M_get_Tp_allocator()); _M_destroy_nodes(__pos._M_node + 1, this->_M_impl._M_finish._M_node + 1); this->_M_impl._M_finish = __pos; } # 1477 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 iterator _M_reserve_elements_at_front(size_type __n) { const size_type __vacancies = this->_M_impl._M_start._M_cur - this->_M_impl._M_start._M_first; if (__n > __vacancies) _M_new_elements_at_front(__n - __vacancies); return this->_M_impl._M_start - difference_type(__n); } iterator _M_reserve_elements_at_back(size_type __n) { const size_type __vacancies = (this->_M_impl._M_finish._M_last - this->_M_impl._M_finish._M_cur) - 1; if (__n > __vacancies) _M_new_elements_at_back(__n - __vacancies); return this->_M_impl._M_finish + difference_type(__n); } void _M_new_elements_at_front(size_type __new_elements); void _M_new_elements_at_back(size_type __new_elements); # 1515 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 void _M_reserve_map_at_back(size_type __nodes_to_add = 1) { if (__nodes_to_add + 1 > this->_M_impl._M_map_size - (this->_M_impl._M_finish._M_node - this->_M_impl._M_map)) _M_reallocate_map(__nodes_to_add, false); } void _M_reserve_map_at_front(size_type __nodes_to_add = 1) { if (__nodes_to_add > size_type(this->_M_impl._M_start._M_node - this->_M_impl._M_map)) _M_reallocate_map(__nodes_to_add, true); } void _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front); }; # 1547 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 template inline bool operator==(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) { return __x.size() == __y.size() && std::equal(__x.begin(), __x.end(), __y.begin()); } # 1565 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_deque.h" 3 template inline bool operator<(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) { return std::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); } template inline bool operator!=(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) { return !(__x == __y); } template inline bool operator>(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) { return __y < __x; } template inline bool operator<=(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) { return !(__y < __x); } template inline bool operator>=(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) { return !(__x < __y); } template inline void swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y) { __x.swap(__y); } } # 71 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/deque" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/deque.tcc" 1 3 # 65 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/deque.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template deque<_Tp, _Alloc>& deque<_Tp, _Alloc>:: operator=(const deque& __x) { const size_type __len = size(); if (&__x != this) { if (__len >= __x.size()) _M_erase_at_end(std::copy(__x.begin(), __x.end(), this->_M_impl._M_start)); else { const_iterator __mid = __x.begin() + difference_type(__len); std::copy(__x.begin(), __mid, this->_M_impl._M_start); insert(this->_M_impl._M_finish, __mid, __x.end()); } } return *this; } template typename deque<_Tp, _Alloc>::iterator deque<_Tp, _Alloc>:: insert(iterator __position, const value_type& __x) { if (__position._M_cur == this->_M_impl._M_start._M_cur) { push_front(__x); return this->_M_impl._M_start; } else if (__position._M_cur == this->_M_impl._M_finish._M_cur) { push_back(__x); iterator __tmp = this->_M_impl._M_finish; --__tmp; return __tmp; } else return _M_insert_aux(__position, __x); } template typename deque<_Tp, _Alloc>::iterator deque<_Tp, _Alloc>:: erase(iterator __position) { iterator __next = __position; ++__next; const difference_type __index = __position - begin(); if (static_cast(__index) < (size() >> 1)) { if (__position != begin()) std::copy_backward(begin(), __position, __next); pop_front(); } else { if (__next != end()) std::copy(__next, end(), __position); pop_back(); } return begin() + __index; } template typename deque<_Tp, _Alloc>::iterator deque<_Tp, _Alloc>:: erase(iterator __first, iterator __last) { if (__first == begin() && __last == end()) { clear(); return end(); } else { const difference_type __n = __last - __first; const difference_type __elems_before = __first - begin(); if (static_cast(__elems_before) <= (size() - __n) / 2) { if (__first != begin()) std::copy_backward(begin(), __first, __last); _M_erase_at_begin(begin() + __n); } else { if (__last != end()) std::copy(__last, end(), __first); _M_erase_at_end(end() - __n); } return begin() + __elems_before; } } template template void deque<_Tp, _Alloc>:: _M_assign_aux(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) { iterator __cur = begin(); for (; __first != __last && __cur != end(); ++__cur, ++__first) *__cur = *__first; if (__first == __last) _M_erase_at_end(__cur); else insert(end(), __first, __last); } template void deque<_Tp, _Alloc>:: _M_fill_insert(iterator __pos, size_type __n, const value_type& __x) { if (__pos._M_cur == this->_M_impl._M_start._M_cur) { iterator __new_start = _M_reserve_elements_at_front(__n); try { std::__uninitialized_fill_a(__new_start, this->_M_impl._M_start, __x, _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; } catch(...) { _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node); throw; } } else if (__pos._M_cur == this->_M_impl._M_finish._M_cur) { iterator __new_finish = _M_reserve_elements_at_back(__n); try { std::__uninitialized_fill_a(this->_M_impl._M_finish, __new_finish, __x, _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; } catch(...) { _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, __new_finish._M_node + 1); throw; } } else _M_insert_aux(__pos, __n, __x); } template void deque<_Tp, _Alloc>:: _M_fill_initialize(const value_type& __value) { _Map_pointer __cur; try { for (__cur = this->_M_impl._M_start._M_node; __cur < this->_M_impl._M_finish._M_node; ++__cur) std::__uninitialized_fill_a(*__cur, *__cur + _S_buffer_size(), __value, _M_get_Tp_allocator()); std::__uninitialized_fill_a(this->_M_impl._M_finish._M_first, this->_M_impl._M_finish._M_cur, __value, _M_get_Tp_allocator()); } catch(...) { std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur), _M_get_Tp_allocator()); throw; } } template template void deque<_Tp, _Alloc>:: _M_range_initialize(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) { this->_M_initialize_map(0); try { for (; __first != __last; ++__first) push_back(*__first); } catch(...) { clear(); throw; } } template template void deque<_Tp, _Alloc>:: _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { const size_type __n = std::distance(__first, __last); this->_M_initialize_map(__n); _Map_pointer __cur_node; try { for (__cur_node = this->_M_impl._M_start._M_node; __cur_node < this->_M_impl._M_finish._M_node; ++__cur_node) { _ForwardIterator __mid = __first; std::advance(__mid, _S_buffer_size()); std::__uninitialized_copy_a(__first, __mid, *__cur_node, _M_get_Tp_allocator()); __first = __mid; } std::__uninitialized_copy_a(__first, __last, this->_M_impl._M_finish._M_first, _M_get_Tp_allocator()); } catch(...) { std::_Destroy(this->_M_impl._M_start, iterator(*__cur_node, __cur_node), _M_get_Tp_allocator()); throw; } } template void deque<_Tp, _Alloc>:: _M_push_back_aux(const value_type& __t) { value_type __t_copy = __t; _M_reserve_map_at_back(); *(this->_M_impl._M_finish._M_node + 1) = this->_M_allocate_node(); try { this->_M_impl.construct(this->_M_impl._M_finish._M_cur, __t_copy); this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node + 1); this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_first; } catch(...) { _M_deallocate_node(*(this->_M_impl._M_finish._M_node + 1)); throw; } } template void deque<_Tp, _Alloc>:: _M_push_front_aux(const value_type& __t) { value_type __t_copy = __t; _M_reserve_map_at_front(); *(this->_M_impl._M_start._M_node - 1) = this->_M_allocate_node(); try { this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node - 1); this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_last - 1; this->_M_impl.construct(this->_M_impl._M_start._M_cur, __t_copy); } catch(...) { ++this->_M_impl._M_start; _M_deallocate_node(*(this->_M_impl._M_start._M_node - 1)); throw; } } template void deque<_Tp, _Alloc>:: _M_pop_back_aux() { _M_deallocate_node(this->_M_impl._M_finish._M_first); this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node - 1); this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_last - 1; this->_M_impl.destroy(this->_M_impl._M_finish._M_cur); } template void deque<_Tp, _Alloc>:: _M_pop_front_aux() { this->_M_impl.destroy(this->_M_impl._M_start._M_cur); _M_deallocate_node(this->_M_impl._M_start._M_first); this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node + 1); this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_first; } template template void deque<_Tp, _Alloc>:: _M_range_insert_aux(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag) { std::copy(__first, __last, std::inserter(*this, __pos)); } template template void deque<_Tp, _Alloc>:: _M_range_insert_aux(iterator __pos, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { const size_type __n = std::distance(__first, __last); if (__pos._M_cur == this->_M_impl._M_start._M_cur) { iterator __new_start = _M_reserve_elements_at_front(__n); try { std::__uninitialized_copy_a(__first, __last, __new_start, _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; } catch(...) { _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node); throw; } } else if (__pos._M_cur == this->_M_impl._M_finish._M_cur) { iterator __new_finish = _M_reserve_elements_at_back(__n); try { std::__uninitialized_copy_a(__first, __last, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; } catch(...) { _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, __new_finish._M_node + 1); throw; } } else _M_insert_aux(__pos, __first, __last, __n); } template typename deque<_Tp, _Alloc>::iterator deque<_Tp, _Alloc>:: _M_insert_aux(iterator __pos, const value_type& __x) { difference_type __index = __pos - this->_M_impl._M_start; value_type __x_copy = __x; if (static_cast(__index) < size() / 2) { push_front(front()); iterator __front1 = this->_M_impl._M_start; ++__front1; iterator __front2 = __front1; ++__front2; __pos = this->_M_impl._M_start + __index; iterator __pos1 = __pos; ++__pos1; std::copy(__front2, __pos1, __front1); } else { push_back(back()); iterator __back1 = this->_M_impl._M_finish; --__back1; iterator __back2 = __back1; --__back2; __pos = this->_M_impl._M_start + __index; std::copy_backward(__pos, __back2, __back1); } *__pos = __x_copy; return __pos; } template void deque<_Tp, _Alloc>:: _M_insert_aux(iterator __pos, size_type __n, const value_type& __x) { const difference_type __elems_before = __pos - this->_M_impl._M_start; const size_type __length = this->size(); value_type __x_copy = __x; if (__elems_before < difference_type(__length / 2)) { iterator __new_start = _M_reserve_elements_at_front(__n); iterator __old_start = this->_M_impl._M_start; __pos = this->_M_impl._M_start + __elems_before; try { if (__elems_before >= difference_type(__n)) { iterator __start_n = (this->_M_impl._M_start + difference_type(__n)); std::__uninitialized_copy_a(this->_M_impl._M_start, __start_n, __new_start, _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; std::copy(__start_n, __pos, __old_start); std::fill(__pos - difference_type(__n), __pos, __x_copy); } else { std::__uninitialized_copy_fill(this->_M_impl._M_start, __pos, __new_start, this->_M_impl._M_start, __x_copy, _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; std::fill(__old_start, __pos, __x_copy); } } catch(...) { _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node); throw; } } else { iterator __new_finish = _M_reserve_elements_at_back(__n); iterator __old_finish = this->_M_impl._M_finish; const difference_type __elems_after = difference_type(__length) - __elems_before; __pos = this->_M_impl._M_finish - __elems_after; try { if (__elems_after > difference_type(__n)) { iterator __finish_n = (this->_M_impl._M_finish - difference_type(__n)); std::__uninitialized_copy_a(__finish_n, this->_M_impl._M_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; std::copy_backward(__pos, __finish_n, __old_finish); std::fill(__pos, __pos + difference_type(__n), __x_copy); } else { std::__uninitialized_fill_copy(this->_M_impl._M_finish, __pos + difference_type(__n), __x_copy, __pos, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; std::fill(__pos, __old_finish, __x_copy); } } catch(...) { _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, __new_finish._M_node + 1); throw; } } } template template void deque<_Tp, _Alloc>:: _M_insert_aux(iterator __pos, _ForwardIterator __first, _ForwardIterator __last, size_type __n) { const difference_type __elemsbefore = __pos - this->_M_impl._M_start; const size_type __length = size(); if (static_cast(__elemsbefore) < __length / 2) { iterator __new_start = _M_reserve_elements_at_front(__n); iterator __old_start = this->_M_impl._M_start; __pos = this->_M_impl._M_start + __elemsbefore; try { if (__elemsbefore >= difference_type(__n)) { iterator __start_n = (this->_M_impl._M_start + difference_type(__n)); std::__uninitialized_copy_a(this->_M_impl._M_start, __start_n, __new_start, _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; std::copy(__start_n, __pos, __old_start); std::copy(__first, __last, __pos - difference_type(__n)); } else { _ForwardIterator __mid = __first; std::advance(__mid, difference_type(__n) - __elemsbefore); std::__uninitialized_copy_copy(this->_M_impl._M_start, __pos, __first, __mid, __new_start, _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; std::copy(__mid, __last, __old_start); } } catch(...) { _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node); throw; } } else { iterator __new_finish = _M_reserve_elements_at_back(__n); iterator __old_finish = this->_M_impl._M_finish; const difference_type __elemsafter = difference_type(__length) - __elemsbefore; __pos = this->_M_impl._M_finish - __elemsafter; try { if (__elemsafter > difference_type(__n)) { iterator __finish_n = (this->_M_impl._M_finish - difference_type(__n)); std::__uninitialized_copy_a(__finish_n, this->_M_impl._M_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; std::copy_backward(__pos, __finish_n, __old_finish); std::copy(__first, __last, __pos); } else { _ForwardIterator __mid = __first; std::advance(__mid, __elemsafter); std::__uninitialized_copy_copy(__mid, __last, __pos, this->_M_impl._M_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; std::copy(__first, __mid, __pos); } } catch(...) { _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, __new_finish._M_node + 1); throw; } } } template void deque<_Tp, _Alloc>:: _M_destroy_data_aux(iterator __first, iterator __last) { for (_Map_pointer __node = __first._M_node + 1; __node < __last._M_node; ++__node) std::_Destroy(*__node, *__node + _S_buffer_size(), _M_get_Tp_allocator()); if (__first._M_node != __last._M_node) { std::_Destroy(__first._M_cur, __first._M_last, _M_get_Tp_allocator()); std::_Destroy(__last._M_first, __last._M_cur, _M_get_Tp_allocator()); } else std::_Destroy(__first._M_cur, __last._M_cur, _M_get_Tp_allocator()); } template void deque<_Tp, _Alloc>:: _M_new_elements_at_front(size_type __new_elems) { if (this->max_size() - this->size() < __new_elems) __throw_length_error(("deque::_M_new_elements_at_front")); const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1) / _S_buffer_size()); _M_reserve_map_at_front(__new_nodes); size_type __i; try { for (__i = 1; __i <= __new_nodes; ++__i) *(this->_M_impl._M_start._M_node - __i) = this->_M_allocate_node(); } catch(...) { for (size_type __j = 1; __j < __i; ++__j) _M_deallocate_node(*(this->_M_impl._M_start._M_node - __j)); throw; } } template void deque<_Tp, _Alloc>:: _M_new_elements_at_back(size_type __new_elems) { if (this->max_size() - this->size() < __new_elems) __throw_length_error(("deque::_M_new_elements_at_back")); const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1) / _S_buffer_size()); _M_reserve_map_at_back(__new_nodes); size_type __i; try { for (__i = 1; __i <= __new_nodes; ++__i) *(this->_M_impl._M_finish._M_node + __i) = this->_M_allocate_node(); } catch(...) { for (size_type __j = 1; __j < __i; ++__j) _M_deallocate_node(*(this->_M_impl._M_finish._M_node + __j)); throw; } } template void deque<_Tp, _Alloc>:: _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front) { const size_type __old_num_nodes = this->_M_impl._M_finish._M_node - this->_M_impl._M_start._M_node + 1; const size_type __new_num_nodes = __old_num_nodes + __nodes_to_add; _Map_pointer __new_nstart; if (this->_M_impl._M_map_size > 2 * __new_num_nodes) { __new_nstart = this->_M_impl._M_map + (this->_M_impl._M_map_size - __new_num_nodes) / 2 + (__add_at_front ? __nodes_to_add : 0); if (__new_nstart < this->_M_impl._M_start._M_node) std::copy(this->_M_impl._M_start._M_node, this->_M_impl._M_finish._M_node + 1, __new_nstart); else std::copy_backward(this->_M_impl._M_start._M_node, this->_M_impl._M_finish._M_node + 1, __new_nstart + __old_num_nodes); } else { size_type __new_map_size = this->_M_impl._M_map_size + std::max(this->_M_impl._M_map_size, __nodes_to_add) + 2; _Map_pointer __new_map = this->_M_allocate_map(__new_map_size); __new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2 + (__add_at_front ? __nodes_to_add : 0); std::copy(this->_M_impl._M_start._M_node, this->_M_impl._M_finish._M_node + 1, __new_nstart); _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); this->_M_impl._M_map = __new_map; this->_M_impl._M_map_size = __new_map_size; } this->_M_impl._M_start._M_set_node(__new_nstart); this->_M_impl._M_finish._M_set_node(__new_nstart + __old_num_nodes - 1); } template void fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>& __first, const _Deque_iterator<_Tp, _Tp&, _Tp*>& __last, const _Tp& __value) { typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; for (typename _Self::_Map_pointer __node = __first._M_node + 1; __node < __last._M_node; ++__node) std::fill(*__node, *__node + _Self::_S_buffer_size(), __value); if (__first._M_node != __last._M_node) { std::fill(__first._M_cur, __first._M_last, __value); std::fill(__last._M_first, __last._M_cur, __value); } else std::fill(__first._M_cur, __last._M_cur, __value); } } # 74 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/deque" 2 3 # 74 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/queue" 2 3 # 1 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_queue.h" 1 3 # 68 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_queue.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 94 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_queue.h" 3 template > class queue { typedef typename _Sequence::value_type _Sequence_value_type; template friend bool operator==(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&); template friend bool operator<(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&); public: typedef typename _Sequence::value_type value_type; typedef typename _Sequence::reference reference; typedef typename _Sequence::const_reference const_reference; typedef typename _Sequence::size_type size_type; typedef _Sequence container_type; protected: # 128 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_queue.h" 3 _Sequence c; public: explicit queue(const _Sequence& __c = _Sequence()) : c(__c) {} bool empty() const { return c.empty(); } size_type size() const { return c.size(); } reference front() { ; return c.front(); } const_reference front() const { ; return c.front(); } reference back() { ; return c.back(); } const_reference back() const { ; return c.back(); } # 202 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_queue.h" 3 void push(const value_type& __x) { c.push_back(__x); } # 217 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_queue.h" 3 void pop() { ; c.pop_front(); } }; # 237 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_queue.h" 3 template inline bool operator==(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) { return __x.c == __y.c; } # 255 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_queue.h" 3 template inline bool operator<(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) { return __x.c < __y.c; } template inline bool operator!=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) { return !(__x == __y); } template inline bool operator>(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) { return __y < __x; } template inline bool operator<=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) { return !(__y < __x); } template inline bool operator>=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) { return !(__x < __y); } # 320 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_queue.h" 3 template, typename _Compare = less > class priority_queue { typedef typename _Sequence::value_type _Sequence_value_type; public: typedef typename _Sequence::value_type value_type; typedef typename _Sequence::reference reference; typedef typename _Sequence::const_reference const_reference; typedef typename _Sequence::size_type size_type; typedef _Sequence container_type; protected: _Sequence c; _Compare comp; public: explicit priority_queue(const _Compare& __x = _Compare(), const _Sequence& __s = _Sequence()) : c(__s), comp(__x) { std::make_heap(c.begin(), c.end(), comp); } # 370 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_queue.h" 3 template priority_queue(_InputIterator __first, _InputIterator __last, const _Compare& __x = _Compare(), const _Sequence& __s = _Sequence()) : c(__s), comp(__x) { ; c.insert(c.end(), __first, __last); std::make_heap(c.begin(), c.end(), comp); } bool empty() const { return c.empty(); } size_type size() const { return c.size(); } const_reference top() const { ; return c.front(); } # 412 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_queue.h" 3 void push(const value_type& __x) { c.push_back(__x); std::push_heap(c.begin(), c.end(), comp); } # 430 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/bits/stl_queue.h" 3 void pop() { ; std::pop_heap(c.begin(), c.end(), comp); c.pop_back(); } }; } # 76 "/usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.0/include/g++-v4/queue" 2 3 # 28 "path.h" 2 using std::priority_queue; using std::vector; using vigra::Point2D; using vigra::UInt8Image; namespace enblend { template class PathCompareFunctor { public: PathCompareFunctor(Image *i) : image(i) {} bool operator()(const Point &a, const Point &b) { return ((*image)[a] > (*image)[b]); } protected: Image *image; }; template vector *minCostPath(CostImageIterator cost_upperleft, CostImageIterator cost_lowerright, CostAccessor ca, Point2D startingPoint, Point2D endingPoint) { typedef typename CostAccessor::value_type CostPixelType; typedef typename NumericTraits::Promote WorkingPixelType; typedef BasicImage WorkingImageType; typedef typename WorkingImageType::traverser WorkingImageIterator; typedef priority_queue, PathCompareFunctor > PQ; int w = cost_lowerright.x - cost_upperleft.x; int h = cost_lowerright.y - cost_upperleft.y; const UInt8 neighborArray[] = {0xA, 1, 6, 8, 5, 2, 9, 4}; const UInt8 neighborArrayInverse[] = {5, 2, 9, 4, 0xA, 1, 6, 8}; UInt8Image *pathNextHop = new UInt8Image(w, h, UInt8(0)); WorkingImageType *costSoFar = new WorkingImageType(w, h, NumericTraits::max()); PQ *pq = new PQ(PathCompareFunctor(costSoFar)); vector *result = new vector; (*costSoFar)[endingPoint] = std::max(NumericTraits::one(), NumericTraits::toPromote(ca(cost_upperleft + endingPoint))); pq->push(endingPoint); while (!pq->empty()) { Point2D top = pq->top(); pq->pop(); if (top != startingPoint) { WorkingPixelType costToTop = (*costSoFar)[top]; for (int i = 0; i < 8; i++) { UInt8 neighborDirection = neighborArray[i]; Point2D neighborPoint = top; if (neighborDirection & 0x8) --neighborPoint.y; if (neighborDirection & 0x4) ++neighborPoint.y; if (neighborDirection & 0x2) --neighborPoint.x; if (neighborDirection & 0x1) ++neighborPoint.x; if ((neighborPoint.y < 0) || (neighborPoint.y >= h) || (neighborPoint.x < 0) || (neighborPoint.x >= w)) continue; WorkingPixelType neighborPreviousCost = (*costSoFar)[neighborPoint]; if (neighborPreviousCost != NumericTraits::max()) continue; WorkingPixelType neighborCost = std::max(NumericTraits::one(), NumericTraits::toPromote(ca(cost_upperleft + neighborPoint))); if (neighborCost == NumericTraits::max()) neighborCost <<= 16; if ((i & 1) == 0) { neighborCost = WorkingPixelType(double(neighborCost) * 1.4); } WorkingPixelType newNeighborCost = neighborCost + costToTop; if (newNeighborCost < neighborPreviousCost) { (*costSoFar)[neighborPoint] = newNeighborCost; (*pathNextHop)[neighborPoint] = neighborArrayInverse[i]; pq->push(neighborPoint); } } } else { UInt8 nextHop = (*pathNextHop)[top]; while (nextHop != 0) { if (nextHop & 0x8) --top.y; if (nextHop & 0x4) ++top.y; if (nextHop & 0x2) --top.x; if (nextHop & 0x1) ++top.x; nextHop = (*pathNextHop)[top]; if (nextHop != 0) result->push_back(top); } break; } } delete pathNextHop; delete costSoFar; delete pq; return result; }; template vector *minCostPath(triple cost, Point2D startingPoint, Point2D endingPoint) { return minCostPath(cost.first, cost.second, cost.third, startingPoint, endingPoint); }; } # 38 "mask.h" 2 # 1 "../include/vigra/contourcirculator.hxx" 1 # 41 "../include/vigra/contourcirculator.hxx" # 1 "../include/vigra/pixelneighborhood.hxx" 1 # 42 "../include/vigra/pixelneighborhood.hxx" namespace vigra { # 68 "../include/vigra/pixelneighborhood.hxx" enum AtImageBorder { NotAtBorder = 0, RightBorder = 1, LeftBorder = 2, TopBorder = 4, BottomBorder = 8, TopRightBorder = TopBorder | RightBorder, TopLeftBorder = TopBorder | LeftBorder, BottomLeftBorder = BottomBorder | LeftBorder, BottomRightBorder = BottomBorder | RightBorder }; # 91 "../include/vigra/pixelneighborhood.hxx" inline AtImageBorder isAtImageBorder(int x, int y, int width, int height) { return static_cast((x == 0 ? LeftBorder : x == width-1 ? RightBorder : NotAtBorder) | (y == 0 ? TopBorder : y == height-1 ? BottomBorder : NotAtBorder)); } # 112 "../include/vigra/pixelneighborhood.hxx" namespace FourNeighborhood { # 145 "../include/vigra/pixelneighborhood.hxx" class NeighborCode { public: # 156 "../include/vigra/pixelneighborhood.hxx" enum Direction { Error = -1, East = 0, North, West, South, DirectionCount, CausalFirst = North, CausalLast = West, AntiCausalFirst = South, AntiCausalLast = East }; static unsigned int directionBit(Direction d) { static unsigned int b[] = {1 << (East + 1), 1 << (North + 1), 1 << (West + 1), 1 << (South + 1)}; return b[d]; }; static unsigned int nearBorderDirectionCount(AtImageBorder b) { static unsigned int c[] = { 4, 3, 3, 0, 3, 2, 2, 0, 3, 2, 2}; return c[b]; } static Direction nearBorderDirections(AtImageBorder b, int index) { static Direction c[11][4] = { { East, North, West, South}, { North, West, South, Error}, { East, North, South, Error}, { Error, Error, Error, Error}, { East, West, South, Error}, { West, South, Error, Error}, { East, South, Error, Error}, { Error, Error, Error, Error}, { East, North, West, Error}, { North, West, Error, Error}, { East, North, Error, Error} }; return c[b][index]; } static Diff2D const & diff(Direction code) { static Diff2D d[] = { Diff2D(1, 0), Diff2D(0, -1), Diff2D(-1, 0), Diff2D(0, 1) }; return d[code]; } static Diff2D const & diff(int code) { return diff(static_cast(code)); } static Diff2D const & relativeDiff(Direction fromCode, Direction toCode) { static Diff2D d[][4] = { { Diff2D(0, 0), Diff2D(-1, -1), Diff2D(-2, 0), Diff2D(-1, 1) }, { Diff2D(1, 1), Diff2D(0, 0), Diff2D(-1, 1), Diff2D(0, 2) }, { Diff2D(2, 0), Diff2D(1, -1), Diff2D(0, 0), Diff2D(1, 1) }, { Diff2D(1, -1), Diff2D(0, -2), Diff2D(-1, -1), Diff2D(0, 0) } }; return d[fromCode][toCode]; } static Diff2D const & relativeDiff(int fromCode, int toCode) { return relativeDiff(static_cast(fromCode), static_cast(toCode)); } static int dX(Direction code) { return diff(code).x; } static int dY(Direction code) { return diff(code).y; } static int dX(int code) { return diff(code).x; } static int dY(int code) { return diff(code).y; } static Direction code(Diff2D const & diff) { switch(diff.x) { case 0: { switch(diff.y) { case 1: return South; case -1: return North; default: return Error; } } case -1: { return (diff.y == 0) ? West : Error; } case 1: { return (diff.y == 0) ? East : Error; } } return Error; } static bool isDiagonal(Direction) { return false; } static Diff2D const & right() { return diff(East); } static Diff2D const & top() { return diff(North); } static Diff2D const & left() { return diff(West); } static Diff2D const & bottom() { return diff(South); } static Diff2D const & east() { return diff(East); } static Diff2D const & north() { return diff(North); } static Diff2D const & west() { return diff(West); } static Diff2D const & south() { return diff(South); } }; typedef NeighborCode::Direction Direction; static const Direction East = NeighborCode::East; static const Direction North = NeighborCode::North; static const Direction West = NeighborCode::West; static const Direction South = NeighborCode::South; static const Direction DirectionCount = NeighborCode::DirectionCount; inline Diff2D const & east() { return NeighborCode::diff(East); } inline Diff2D const & north() { return NeighborCode::diff(North); } inline Diff2D const & west() { return NeighborCode::diff(West); } inline Diff2D const & south() { return NeighborCode::diff(South); } } typedef FourNeighborhood::NeighborCode FourNeighborCode; # 337 "../include/vigra/pixelneighborhood.hxx" namespace EightNeighborhood { # 369 "../include/vigra/pixelneighborhood.hxx" class NeighborCode { public: # 380 "../include/vigra/pixelneighborhood.hxx" enum Direction { Error = -1, East = 0, NorthEast, North, NorthWest, West, SouthWest, South, SouthEast, DirectionCount, CausalFirst = NorthEast, CausalLast = West, AntiCausalFirst = SouthWest, AntiCausalLast = East }; static unsigned int directionBit(Direction d) { static unsigned int b[] = {1 << (East + 1), 1 << (NorthEast + 1), 1 << (North + 1), 1 << (NorthWest + 1), 1 << (West + 1), 1 << (SouthWest + 1), 1 << (South + 1), 1 << (SouthEast + 1)}; return b[d]; }; static unsigned int nearBorderDirectionCount(AtImageBorder b) { static unsigned int c[] = { 8, 5, 5, 0, 5, 3, 3, 0, 5, 3, 3}; return c[b]; } static Direction nearBorderDirections(AtImageBorder b, int index) { static Direction c[11][8] = { { East, NorthEast, North, NorthWest, West, SouthWest, South, SouthEast}, { North, NorthWest, West, SouthWest, South, Error, Error, Error}, { East, NorthEast, North, South, SouthEast, Error, Error, Error}, { Error, Error, Error, Error, Error, Error, Error, Error}, { East, West, SouthWest, South, SouthEast, Error, Error, Error}, { West, SouthWest, South, Error, Error, Error, Error, Error}, { East, South, SouthEast, Error, Error, Error, Error, Error}, { Error, Error, Error, Error, Error, Error, Error, Error}, { East, NorthEast, North, NorthWest, West, Error, Error, Error}, { North, NorthWest, West, Error, Error, Error, Error, Error}, { East, NorthEast, North, Error, Error, Error, Error, Error} }; return c[b][index]; } static Diff2D const & diff(Direction code) { static Diff2D d[] = { Diff2D(1, 0), Diff2D(1, -1), Diff2D(0, -1), Diff2D(-1, -1), Diff2D(-1, 0), Diff2D(-1, 1), Diff2D(0, 1), Diff2D(1, 1) }; return d[code]; } static Diff2D const & diff(int code) { return diff(static_cast(code)); } static Diff2D const & relativeDiff(Direction fromCode, Direction toCode) { static Diff2D d[][8] = { { Diff2D(0, 0), Diff2D(0, -1), Diff2D(-1, -1), Diff2D(-2, -1), Diff2D(-2, 0), Diff2D(-2, 1), Diff2D(-1, 1), Diff2D(0, 1) }, { Diff2D(0, 1), Diff2D(0, 0), Diff2D(-1, 0), Diff2D(-2, 0), Diff2D(-2, 1), Diff2D(-2, 2), Diff2D(-1, 2), Diff2D(0, 2) }, { Diff2D(1, 1), Diff2D(1, 0), Diff2D(0, 0), Diff2D(-1, 0), Diff2D(-1, 1), Diff2D(-1, 2), Diff2D(0, 2), Diff2D(1, 2) }, { Diff2D(2, 1), Diff2D(2, 0), Diff2D(1, 0), Diff2D(0, 0), Diff2D(0, 1), Diff2D(0, 2), Diff2D(1, 2), Diff2D(2, 2) }, { Diff2D(2, 0), Diff2D(2, -1), Diff2D(1, -1), Diff2D(0, -1), Diff2D(0, 0), Diff2D(0, 1), Diff2D(1, 1), Diff2D(2, 1) }, { Diff2D(2, -1), Diff2D(2, -2), Diff2D(1, -2), Diff2D(0, -2), Diff2D(0, -1), Diff2D(0, 0), Diff2D(1, 0), Diff2D(2, 0) }, { Diff2D(1, -1), Diff2D(1, -2), Diff2D(0, -2), Diff2D(-1, -2), Diff2D(-1, -1), Diff2D(-1, 0), Diff2D(0, 0), Diff2D(1, 0) }, { Diff2D(0, -1), Diff2D(0, -2), Diff2D(-1, -2), Diff2D(-2, -2), Diff2D(-2, -1), Diff2D(-2, 0), Diff2D(-1, 0), Diff2D(0, 0) } }; return d[fromCode][toCode]; } static Diff2D const & relativeDiff(int fromCode, int toCode) { return relativeDiff(static_cast(fromCode), static_cast(toCode)); } static int dX(Direction code) { return diff(code).x; } static int dY(Direction code) { return diff(code).y; } static int dX(int code) { return diff(code).x; } static int dY(int code) { return diff(code).y; } static Direction code(FourNeighborhood::Direction d) { return static_cast(2*d); } static Direction code(Diff2D const & diff) { switch(diff.x) { case 0: { switch(diff.y) { case 1: return South; case -1: return North; default: return Error; } } case -1: { switch(diff.y) { case 0: return West; case 1: return SouthWest; case -1: return NorthWest; default: return Error; } } case 1: { switch(diff.y) { case 0: return East; case 1: return SouthEast; case -1: return NorthEast; default: return Error; } } } return Error; } static bool isDiagonal(Direction code) { return (code % 2) != 0; } static Diff2D const & right() { return diff(East); } static Diff2D const & topRight() { return diff(NorthEast); } static Diff2D const & top() { return diff(North); } static Diff2D const & topLeft() { return diff(NorthWest); } static Diff2D const & left() { return diff(West); } static Diff2D const & bottomLeft() { return diff(SouthWest); } static Diff2D const & bottom() { return diff(South); } static Diff2D const & bottomRight() { return diff(SouthEast); } static Diff2D const & east() { return diff(East); } static Diff2D const & northEast() { return diff(NorthEast); } static Diff2D const & north() { return diff(North); } static Diff2D const & northWest() { return diff(NorthWest); } static Diff2D const & west() { return diff(West); } static Diff2D const & southWest() { return diff(SouthWest); } static Diff2D const & south() { return diff(South); } static Diff2D const & southEast() { return diff(SouthEast); } }; typedef NeighborCode::Direction Direction; static const Direction East = NeighborCode::East; static const Direction NorthEast = NeighborCode::NorthEast; static const Direction North = NeighborCode::North; static const Direction NorthWest = NeighborCode::NorthWest; static const Direction West = NeighborCode::West; static const Direction SouthWest = NeighborCode::SouthWest; static const Direction South = NeighborCode::South; static const Direction SouthEast = NeighborCode::SouthEast; static const Direction DirectionCount = NeighborCode::DirectionCount; inline Diff2D const & east() { return NeighborCode::diff(East); } inline Diff2D const & northEast() { return NeighborCode::diff(NorthEast); } inline Diff2D const & north() { return NeighborCode::diff(North); } inline Diff2D const & northWest() { return NeighborCode::diff(NorthWest); } inline Diff2D const & west() { return NeighborCode::diff(West); } inline Diff2D const & southWest() { return NeighborCode::diff(SouthWest); } inline Diff2D const & south() { return NeighborCode::diff(South); } inline Diff2D const & southEast() { return NeighborCode::diff(SouthEast); } } typedef EightNeighborhood::NeighborCode EightNeighborCode; # 633 "../include/vigra/pixelneighborhood.hxx" template class NeighborOffsetCirculator : public NEIGHBORCODE { public: typedef NEIGHBORCODE NeighborCode; typedef typename NEIGHBORCODE::Direction Direction; typedef Diff2D value_type; typedef Diff2D const & reference; typedef Diff2D const & index_reference; typedef Diff2D const * pointer; typedef int difference_type; typedef random_access_circulator_tag iterator_category; protected: Direction direction_; public: NeighborOffsetCirculator(Direction dir = NEIGHBORCODE::East) : direction_(dir) { } NeighborOffsetCirculator & operator++() { direction_ = static_cast((direction_+1) % NEIGHBORCODE::DirectionCount); return *this; } NeighborOffsetCirculator & operator--() { direction_ = static_cast((direction_ + NEIGHBORCODE::DirectionCount-1) % NEIGHBORCODE::DirectionCount); return *this; } NeighborOffsetCirculator operator++(int) { NeighborOffsetCirculator ret(*this); operator++(); return ret; } NeighborOffsetCirculator operator--(int) { NeighborOffsetCirculator ret(*this); operator--(); return ret; } NeighborOffsetCirculator & operator+=(difference_type d) { direction_ = static_cast((direction_ + d) % NEIGHBORCODE::DirectionCount); if(direction_ < 0) direction_ = static_cast(direction_ + NEIGHBORCODE::DirectionCount); return *this; } NeighborOffsetCirculator & operator-=(difference_type d) { direction_ = static_cast((direction_ - d) % NEIGHBORCODE::DirectionCount); if(direction_ < 0) direction_ = static_cast(direction_ + NEIGHBORCODE::DirectionCount); return *this; } NeighborOffsetCirculator operator+(difference_type d) const { return NeighborOffsetCirculator(*this) += d; } NeighborOffsetCirculator operator-(difference_type d) const { return NeighborOffsetCirculator(*this) -= d; } NeighborOffsetCirculator & turnRight() { direction_ = static_cast((direction_ + NEIGHBORCODE::South) % NEIGHBORCODE::DirectionCount); return *this; } NeighborOffsetCirculator & turnLeft() { direction_ = static_cast((direction_ + NEIGHBORCODE::North) % NEIGHBORCODE::DirectionCount); return *this; } NeighborOffsetCirculator & turnRound() { direction_ = opposite(); return *this; } NeighborOffsetCirculator & turnTo(Direction d) { direction_ = d; return *this; } bool operator==(NeighborOffsetCirculator const & o) const { return direction_ == o.direction_; } bool operator!=(NeighborOffsetCirculator const & o) const { return direction_ != o.direction_; } difference_type operator-(NeighborOffsetCirculator const & o) const { return direction_ - o.direction_; } reference operator*() const { return diff(); } index_reference operator[](difference_type d) const { return NEIGHBORCODE::diff(direction(d)); } pointer operator->() const { return &diff(); } Diff2D const & diff() const { return NEIGHBORCODE::diff(direction_); } static Diff2D const & diff(Direction dir) { return NEIGHBORCODE::diff(dir); } Diff2D const &relativeDiff(difference_type offset) const { Direction toDir = static_cast((direction_ + offset) % NEIGHBORCODE::DirectionCount); if(toDir < 0) toDir = static_cast(toDir + NEIGHBORCODE::DirectionCount); return NEIGHBORCODE::relativeDiff(direction_, toDir); } int dX() const { return NEIGHBORCODE::dX(direction_); } int dY() const { return NEIGHBORCODE::dY(direction_); } bool isDiagonal() const { return NEIGHBORCODE::isDiagonal(direction_); } Direction direction() const { return direction_; } unsigned int directionBit() const { return NEIGHBORCODE::directionBit(direction_); } Direction opposite() const { return static_cast((direction_ + NEIGHBORCODE::West) % NEIGHBORCODE::DirectionCount); } unsigned int oppositeDirectionBit() const { return NEIGHBORCODE::directionBit(opposite()); } Direction direction(difference_type offset) const { int result = (direction_ + offset) % NEIGHBORCODE::DirectionCount; if(result < 0) result += NEIGHBORCODE::DirectionCount; return static_cast(result); } }; typedef NeighborOffsetCirculator EightNeighborOffsetCirculator; typedef NeighborOffsetCirculator FourNeighborOffsetCirculator; # 958 "../include/vigra/pixelneighborhood.hxx" template class NeighborhoodCirculator : private IMAGEITERATOR { typedef NeighborOffsetCirculator NEIGHBOROFFSETCIRCULATOR; public: typedef IMAGEITERATOR base_type; typedef NEIGHBORCODE NeighborCode; typedef typename IMAGEITERATOR::value_type value_type; typedef typename NEIGHBORCODE::Direction Direction; typedef typename IMAGEITERATOR::reference reference; typedef typename IMAGEITERATOR::index_reference index_reference; typedef typename IMAGEITERATOR::pointer pointer; typedef typename NEIGHBOROFFSETCIRCULATOR::difference_type difference_type; typedef typename NEIGHBOROFFSETCIRCULATOR::iterator_category iterator_category; NeighborhoodCirculator(IMAGEITERATOR const & center = IMAGEITERATOR(), Direction d = NEIGHBOROFFSETCIRCULATOR::East) : IMAGEITERATOR(center), neighborCode_(d) { IMAGEITERATOR::operator+=(neighborCode_.diff()); } NeighborhoodCirculator & operator++() { return operator+=(1); } NeighborhoodCirculator operator++(int) { NeighborhoodCirculator ret(*this); operator++(); return ret; } NeighborhoodCirculator & operator--() { return operator+=(-1); } NeighborhoodCirculator operator--(int) { NeighborhoodCirculator ret(*this); operator--(); return ret; } NeighborhoodCirculator & operator+=(difference_type d) { IMAGEITERATOR::operator+=(neighborCode_.relativeDiff(d)); neighborCode_+= d; return *this; } NeighborhoodCirculator & operator-=(difference_type d) { return operator+=(-d); } NeighborhoodCirculator operator+(difference_type d) const { NeighborhoodCirculator result(*this); result+= d; return result; } NeighborhoodCirculator operator-(difference_type d) const { NeighborhoodCirculator result(*this); result-= d; return result; } NeighborhoodCirculator & turnRight() { Direction oldDirection = neighborCode_.direction(); neighborCode_.turnRight(); IMAGEITERATOR::operator+=(NeighborCode::relativeDiff (oldDirection, neighborCode_.direction())); return *this; } NeighborhoodCirculator & turnLeft() { Direction oldDirection = neighborCode_.direction(); neighborCode_.turnLeft(); IMAGEITERATOR::operator+=(NeighborCode::relativeDiff (oldDirection, neighborCode_.direction())); return *this; } NeighborhoodCirculator & turnRound() { Direction oldDirection = neighborCode_.direction(); neighborCode_.turnRound(); IMAGEITERATOR::operator+=(NeighborCode::relativeDiff (oldDirection, neighborCode_.direction())); return *this; } NeighborhoodCirculator & turnTo(Direction d) { Direction oldDirection = neighborCode_.direction(); neighborCode_.turnTo(d); IMAGEITERATOR::operator+=(NeighborCode::relativeDiff (oldDirection, neighborCode_.direction())); return *this; } NeighborhoodCirculator & moveCenterToNeighbor() { IMAGEITERATOR::operator+=(neighborCode_.diff()); return *this; } NeighborhoodCirculator & swapCenterNeighbor() { neighborCode_.turnRound(); IMAGEITERATOR::operator+=(neighborCode_.diff()); return *this; } bool operator==(NeighborhoodCirculator const & rhs) const { return neighborCode_ == rhs.neighborCode_ && IMAGEITERATOR::operator==(rhs); } bool operator!=(NeighborhoodCirculator const & rhs) const { return neighborCode_ != rhs.neighborCode_ || IMAGEITERATOR::operator!=(rhs); } difference_type operator-(NeighborhoodCirculator const & rhs) const { return neighborCode_ - rhs.neighborCode_; } reference operator*() const { return IMAGEITERATOR::operator*(); } index_reference operator[](difference_type d) const { return IMAGEITERATOR::operator[](neighborCode_.relativeDiff(d)); } pointer operator->() const { return IMAGEITERATOR::operator->(); } base_type const & base() const { return *this; } base_type center() const { return (base_type)*this - neighborCode_.diff(); } Direction direction() const { return neighborCode_.direction(); } unsigned int directionBit() const { return neighborCode_.directionBit(); } Diff2D const & diff() const { return neighborCode_.diff(); } bool isDiagonal() const { return neighborCode_.isDiagonal(); } private: NEIGHBOROFFSETCIRCULATOR neighborCode_; }; # 1264 "../include/vigra/pixelneighborhood.hxx" template class RestrictedNeighborhoodCirculator : private NeighborhoodCirculator { typedef NeighborhoodCirculator BaseType; public: typedef IMAGEITERATOR base_type; typedef NEIGHBORCODE NeighborCode; typedef typename BaseType::value_type value_type; typedef typename BaseType::Direction Direction; typedef typename BaseType::reference reference; typedef typename BaseType::index_reference index_reference; typedef typename BaseType::pointer pointer; typedef typename BaseType::difference_type difference_type; typedef typename BaseType::iterator_category iterator_category; RestrictedNeighborhoodCirculator(IMAGEITERATOR const & center = IMAGEITERATOR(), AtImageBorder atBorder = NotAtBorder) : BaseType(center, NEIGHBORCODE::nearBorderDirections(atBorder, 0)), whichBorder_(atBorder), count_(NEIGHBORCODE::nearBorderDirectionCount(atBorder)), current_(0) {} RestrictedNeighborhoodCirculator & operator++() { return operator+=(1); } RestrictedNeighborhoodCirculator operator++(int) { RestrictedNeighborhoodCirculator ret(*this); operator++(); return ret; } RestrictedNeighborhoodCirculator & operator--() { return operator+=(-1); } RestrictedNeighborhoodCirculator operator--(int) { RestrictedNeighborhoodCirculator ret(*this); operator--(); return ret; } RestrictedNeighborhoodCirculator & operator+=(difference_type d) { current_ = static_cast((current_ + count_ + d) % count_); BaseType::turnTo(NEIGHBORCODE::nearBorderDirections(whichBorder_, current_)); return *this; } RestrictedNeighborhoodCirculator & operator-=(difference_type d) { return operator+=(-d); } RestrictedNeighborhoodCirculator operator+(difference_type d) const { RestrictedNeighborhoodCirculator result(*this); result+= d; return result; } RestrictedNeighborhoodCirculator operator-(difference_type d) const { RestrictedNeighborhoodCirculator result(*this); result-= d; return result; } bool operator==(RestrictedNeighborhoodCirculator const & rhs) const { return current_ == rhs.current_; } bool operator!=(RestrictedNeighborhoodCirculator const & rhs) const { return current_ != rhs.current_; } difference_type operator-(RestrictedNeighborhoodCirculator const & rhs) const { return (current_ - rhs.current_) % count_; } reference operator*() const { return BaseType::operator*(); } pointer operator->() const { return BaseType::operator->(); } base_type const & base() const { return BaseType::base(); } base_type center() const { return BaseType::center(); } Direction direction() const { return BaseType::direction(); } unsigned int directionBit() const { return BaseType::directionBit(); } Diff2D const & diff() const { return BaseType::diff(); } bool isDiagonal() const { return BaseType::isDiagonal(); } private: AtImageBorder whichBorder_; signed char count_, current_; }; } # 42 "../include/vigra/contourcirculator.hxx" 2 namespace vigra { # 93 "../include/vigra/contourcirculator.hxx" template class CrackContourCirculator { typedef NeighborhoodCirculator NEIGHBORHOODCIRCULATOR; typedef typename IMAGEITERATOR::value_type label_type; protected: NEIGHBORHOODCIRCULATOR neighborCirc_; label_type label_; Point2D pos_; CrackContourCirculator(NEIGHBORHOODCIRCULATOR const & circ) : neighborCirc_(circ), label_(*(circ.center())), pos_(0, 0) {} public: typedef Point2D value_type; typedef Point2D const & reference; typedef Point2D const * pointer; typedef forward_circulator_tag iterator_category; # 139 "../include/vigra/contourcirculator.hxx" CrackContourCirculator(IMAGEITERATOR const & in_the_region, vigra::FourNeighborCode::Direction dir = vigra::FourNeighborCode::West) : neighborCirc_(in_the_region, EightNeighborCode::code(dir)), label_(*in_the_region), pos_(0, 0) { neighborCirc_.turnLeft(); } CrackContourCirculator & operator++() { pos_ += neighborCirc_.diff(); neighborCirc_--; if(*neighborCirc_ == label_) { neighborCirc_.moveCenterToNeighbor(); --neighborCirc_; } else { neighborCirc_.moveCenterToNeighbor(); neighborCirc_ += 3; if(*neighborCirc_ == label_) { neighborCirc_.moveCenterToNeighbor(); neighborCirc_.turnRight(); } else { neighborCirc_.moveCenterToNeighbor(); neighborCirc_.turnLeft(); neighborCirc_.moveCenterToNeighbor(); neighborCirc_.turnRight(); } } return *this; } CrackContourCirculator operator++(int) { CrackContourCirculator ret(*this); ++(*this); return ret; } bool operator==(CrackContourCirculator const & o) const { return neighborCirc_ == o.neighborCirc_; } bool operator!=(CrackContourCirculator const & o) const { return neighborCirc_ != o.neighborCirc_; } reference pos() const { return pos_; } reference operator*() const { return pos_; } pointer operator->() const { return &pos_; } IMAGEITERATOR outerPixel() const { return NEIGHBORHOODCIRCULATOR(neighborCirc_).turnRight().base(); } Diff2D const & diff() const { return neighborCirc_.diff(); } }; } # 40 "mask.h" 2 # 1 "../include/vigra/functorexpression.hxx" 1 # 337 "../include/vigra/functorexpression.hxx" # 1 "../include/vigra/functortraits.hxx" 1 # 338 "../include/vigra/functorexpression.hxx" 2 namespace vigra { namespace functor { # 351 "../include/vigra/functorexpression.hxx" struct ErrorType; template struct ResultTraits0; template struct ResultTraits1 { typedef T1 Res; }; template struct ResultTraits2 { typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits3 { typedef typename PromoteTraits::Promote P1; typedef typename PromoteTraits::Promote Res; }; template struct UnaryFunctor { UnaryFunctor(EXPR const & e) : expr_(e) {} typename ResultTraits0::Res operator()() const { return expr_(); } template typename ResultTraits1::Res operator()(T1 const & v) const { return expr_(v); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return expr_(v1, v2); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr_(v1, v2, v3); } protected: EXPR expr_; }; template struct ResultTraits0 > { typedef typename ResultTraits0::Res Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res Res; }; struct ArgumentFunctor1; struct ArgumentFunctor2; struct ArgumentFunctor3; template <> struct UnaryFunctor { UnaryFunctor() {} template T1 const & operator()(T1 const & v1) const { return v1; } template T1 const & operator()(T1 const & v1, T2 const &) const { return v1; } template T1 const & operator()(T1 const & v1, T2 const &, T3 const &) const { return v1; } }; template <> struct ResultTraits0 > { typedef ErrorType Res; }; template struct ResultTraits1, T1> { typedef T1 Res; }; template struct ResultTraits2, T1, T2> { typedef T1 Res; }; template struct ResultTraits3, T1, T2, T3> { typedef T1 Res; }; inline UnaryFunctor Arg1() { return UnaryFunctor(); } template <> struct UnaryFunctor { UnaryFunctor() {} template T2 const & operator()(T1 const &, T2 const & v2) const { return v2; } template T2 const & operator()(T1 const &, T2 const & v2, T3 const &) const { return v2; } }; template <> struct ResultTraits0 > { typedef ErrorType Res; }; template struct ResultTraits1, T1> { typedef ErrorType Res; }; template struct ResultTraits2, T1, T2> { typedef T2 Res; }; template struct ResultTraits3, T1, T2, T3> { typedef T2 Res; }; inline UnaryFunctor Arg2() { return UnaryFunctor(); } template <> struct UnaryFunctor { UnaryFunctor() {} template T3 const & operator()(T1 const &, T2 const &, T3 const & v3) const { return v3; } }; template <> struct ResultTraits0 > { typedef ErrorType Res; }; template struct ResultTraits1, T1> { typedef ErrorType Res; }; template struct ResultTraits2, T1, T2> { typedef ErrorType Res; }; template struct ResultTraits3, T1, T2, T3> { typedef T3 Res; }; inline UnaryFunctor Arg3() { return UnaryFunctor(); } template struct ParameterFunctor { ParameterFunctor(T v) : value_(v) {} T const & operator()() const { return value_; } template T const & operator()(U1 const &) const { return value_; } template T const & operator()(U1 const &, U2 const &) const { return value_; } template T const & operator()(U1 const &, U2 const &, U3 const &) const { return value_; } protected: T value_; }; template struct ResultTraits0 > { typedef T Res; }; template struct ResultTraits1, T1> { typedef T Res; }; template struct ResultTraits2, T1, T2> { typedef T Res; }; template struct ResultTraits3, T1, T2, T3> { typedef T Res; }; template UnaryFunctor > Param(T const & v) { ParameterFunctor fv(v); return UnaryFunctor >(fv); } # 687 "../include/vigra/functorexpression.hxx" template class UnaryAnalyser { public: UnaryAnalyser(EXPR const & e) : expr_(e) {} void operator()() const { expr_(); } template void operator()(T1 const & v) const { expr_(v); } template void operator()(T1 const & v1, T2 const & v2) const { expr_(v1, v2); } template void operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { expr_(v1, v2, v3); } protected: EXPR expr_; }; template struct VarFunctor; template struct UnaryFunctor >; # 779 "../include/vigra/functorexpression.hxx" template struct AssignmentFunctor_assign { AssignmentFunctor_assign(UnaryFunctor > v, UnaryFunctor const & e) : value_(v.value_), expr_(e) {} V & operator()() const { const_cast(value_) = expr_(); return const_cast(value_); } template V & operator()(T1 const & v1) const { const_cast(value_) = expr_(v1); return const_cast(value_); } template V & operator()(T1 const & v1, T2 const & v2) const { const_cast(value_) = expr_(v1, v2); return const_cast(value_); } template V & operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { const_cast(value_) = expr_(v1, v2, v3); return const_cast(value_); } private: V & value_; UnaryFunctor expr_; }; template struct AssignmentFunctor_add { AssignmentFunctor_add(UnaryFunctor > v, UnaryFunctor const & e) : value_(v.value_), expr_(e) {} V & operator()() const { const_cast(value_) += expr_(); return const_cast(value_); } template V & operator()(T1 const & v1) const { const_cast(value_) += expr_(v1); return const_cast(value_); } template V & operator()(T1 const & v1, T2 const & v2) const { const_cast(value_) += expr_(v1, v2); return const_cast(value_); } template V & operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { const_cast(value_) += expr_(v1, v2, v3); return const_cast(value_); } private: V & value_; UnaryFunctor expr_; }; template struct AssignmentFunctor_subtract { AssignmentFunctor_subtract(UnaryFunctor > v, UnaryFunctor const & e) : value_(v.value_), expr_(e) {} V & operator()() const { const_cast(value_) -= expr_(); return const_cast(value_); } template V & operator()(T1 const & v1) const { const_cast(value_) -= expr_(v1); return const_cast(value_); } template V & operator()(T1 const & v1, T2 const & v2) const { const_cast(value_) -= expr_(v1, v2); return const_cast(value_); } template V & operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { const_cast(value_) -= expr_(v1, v2, v3); return const_cast(value_); } private: V & value_; UnaryFunctor expr_; }; template struct AssignmentFunctor_multiply { AssignmentFunctor_multiply(UnaryFunctor > v, UnaryFunctor const & e) : value_(v.value_), expr_(e) {} V & operator()() const { const_cast(value_) *= expr_(); return const_cast(value_); } template V & operator()(T1 const & v1) const { const_cast(value_) *= expr_(v1); return const_cast(value_); } template V & operator()(T1 const & v1, T2 const & v2) const { const_cast(value_) *= expr_(v1, v2); return const_cast(value_); } template V & operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { const_cast(value_) *= expr_(v1, v2, v3); return const_cast(value_); } private: V & value_; UnaryFunctor expr_; }; template struct AssignmentFunctor_divide { AssignmentFunctor_divide(UnaryFunctor > v, UnaryFunctor const & e) : value_(v.value_), expr_(e) {} V & operator()() const { const_cast(value_) /= expr_(); return const_cast(value_); } template V & operator()(T1 const & v1) const { const_cast(value_) /= expr_(v1); return const_cast(value_); } template V & operator()(T1 const & v1, T2 const & v2) const { const_cast(value_) /= expr_(v1, v2); return const_cast(value_); } template V & operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { const_cast(value_) /= expr_(v1, v2, v3); return const_cast(value_); } private: V & value_; UnaryFunctor expr_; }; # 793 "../include/vigra/functorexpression.hxx" template struct UnaryFunctor > { typedef T Res; UnaryFunctor(T & v) : value_(v) {} template UnaryAnalyser< AssignmentFunctor_assign > > operator=(UnaryFunctor const & e) { AssignmentFunctor_assign > va(*this, e); return UnaryAnalyser< AssignmentFunctor_assign > >(va); } template UnaryAnalyser< AssignmentFunctor_add > > operator+=(UnaryFunctor const & e) { AssignmentFunctor_add > va(*this, e); return UnaryAnalyser< AssignmentFunctor_add > >(va); } template UnaryAnalyser< AssignmentFunctor_subtract > > operator-=(UnaryFunctor const & e) { AssignmentFunctor_subtract > va(*this, e); return UnaryAnalyser< AssignmentFunctor_subtract > >(va); } template UnaryAnalyser< AssignmentFunctor_multiply > > operator*=(UnaryFunctor const & e) { AssignmentFunctor_multiply > va(*this, e); return UnaryAnalyser< AssignmentFunctor_multiply > >(va); } template UnaryAnalyser< AssignmentFunctor_divide > > operator/=(UnaryFunctor const & e) { AssignmentFunctor_divide > va(*this, e); return UnaryAnalyser< AssignmentFunctor_divide > >(va); } T const & operator()() const { return value_; } template T const & operator()(U1 const &) const { return value_; } template T const & operator()(U1 const &, U2 const &) const { return value_; } template T const & operator()(U1 const &, U2 const &, U3 const &) const { return value_; } T & value_; }; template struct ResultTraits0 > > { typedef T Res; }; template struct ResultTraits1 >, T1> { typedef T Res; }; template struct ResultTraits2 >, T1, T2> { typedef T Res; }; template struct ResultTraits3 >, T1, T2, T3> { typedef T Res; }; template UnaryFunctor > Var(T & v) { return UnaryFunctor >(v); } template struct IfThenFunctor { typedef void Res; IfThenFunctor(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} void operator()() const { if( expr1_() ) expr2_(); } template void operator()(T const & v1) const { if( expr1_(v1) ) expr2_(v1); } template void operator()(T1 const & v1, T2 const & v2) const { if( expr1_(v1, v2) ) expr2_(v1, v2); } template void operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { if( expr1_(v1, v2, v3) ) expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template UnaryAnalyser, UnaryAnalyser > > ifThen(UnaryFunctor const & e1, UnaryAnalyser const & e2) { IfThenFunctor, UnaryAnalyser > p(e1, e2); return UnaryAnalyser, UnaryAnalyser > >(p); } template struct IfThenElseFunctor; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R2; typedef typename ResultTraits0::Res R3; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R2; typedef typename ResultTraits1::Res R3; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R2; typedef typename ResultTraits2::Res R3; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R2; typedef typename ResultTraits3::Res R3; typedef typename PromoteTraits::Promote Res; }; template struct IfThenElseFunctor { IfThenElseFunctor(EXPR1 const & e1, EXPR2 const & e2, EXPR3 const & e3) : expr1_(e1), expr2_(e2), expr3_(e3) {} typename ResultTraits0::Res operator()() const { typename ResultTraits0::Res r2(expr2_()); typename ResultTraits0::Res r3(expr3_()); return expr1_() ? r2 : r3; } template typename ResultTraits1::Res operator()(T const & v1) const { typename ResultTraits1::Res r2(expr2_(v1)); typename ResultTraits1::Res r3(expr3_(v1)); return expr1_(v1) ? r2 : r3; } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { typename ResultTraits2::Res r2(expr2_(v1, v2)); typename ResultTraits2::Res r3(expr3_(v1, v2)); return expr1_(v1, v2) ? r2 : r3; } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { typename ResultTraits3::Res r2(expr2_(v1, v2, v3)); typename ResultTraits3::Res r3(expr3_(v1, v2, v3)); return expr1_(v1, v2, v3) ? r2 : r3; } private: EXPR1 expr1_; EXPR2 expr2_; EXPR3 expr3_; }; template UnaryFunctor, UnaryFunctor, UnaryFunctor > > ifThenElse(UnaryFunctor const & e1, UnaryFunctor const & e2, UnaryFunctor const & e3) { IfThenElseFunctor, UnaryFunctor, UnaryFunctor > p(e1, e2, e3); return UnaryFunctor, UnaryFunctor, UnaryFunctor > >(p); } # 1165 "../include/vigra/functorexpression.hxx" using std::sqrt; template struct Functor_sqrt; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct Functor_sqrt { Functor_sqrt(EXPR const & e) : expr_(e) {} typename ResultTraits0::Res operator()() const { return sqrt(expr_()); } template typename ResultTraits1::Res operator()(T const & v1) const { return sqrt(expr_(v1)); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return sqrt(expr_(v1, v2)); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return sqrt(expr_(v1, v2, v3)); } protected: EXPR expr_; }; template UnaryFunctor > > sqrt(UnaryFunctor const & e) { Functor_sqrt > p(e); return UnaryFunctor > >(p); } using std::exp; template struct Functor_exp; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct Functor_exp { Functor_exp(EXPR const & e) : expr_(e) {} typename ResultTraits0::Res operator()() const { return exp(expr_()); } template typename ResultTraits1::Res operator()(T const & v1) const { return exp(expr_(v1)); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return exp(expr_(v1, v2)); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return exp(expr_(v1, v2, v3)); } protected: EXPR expr_; }; template UnaryFunctor > > exp(UnaryFunctor const & e) { Functor_exp > p(e); return UnaryFunctor > >(p); } using std::log; template struct Functor_log; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct Functor_log { Functor_log(EXPR const & e) : expr_(e) {} typename ResultTraits0::Res operator()() const { return log(expr_()); } template typename ResultTraits1::Res operator()(T const & v1) const { return log(expr_(v1)); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return log(expr_(v1, v2)); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return log(expr_(v1, v2, v3)); } protected: EXPR expr_; }; template UnaryFunctor > > log(UnaryFunctor const & e) { Functor_log > p(e); return UnaryFunctor > >(p); } using std::log10; template struct Functor_log10; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct Functor_log10 { Functor_log10(EXPR const & e) : expr_(e) {} typename ResultTraits0::Res operator()() const { return log10(expr_()); } template typename ResultTraits1::Res operator()(T const & v1) const { return log10(expr_(v1)); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return log10(expr_(v1, v2)); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return log10(expr_(v1, v2, v3)); } protected: EXPR expr_; }; template UnaryFunctor > > log10(UnaryFunctor const & e) { Functor_log10 > p(e); return UnaryFunctor > >(p); } using std::sin; template struct Functor_sin; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct Functor_sin { Functor_sin(EXPR const & e) : expr_(e) {} typename ResultTraits0::Res operator()() const { return sin(expr_()); } template typename ResultTraits1::Res operator()(T const & v1) const { return sin(expr_(v1)); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return sin(expr_(v1, v2)); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return sin(expr_(v1, v2, v3)); } protected: EXPR expr_; }; template UnaryFunctor > > sin(UnaryFunctor const & e) { Functor_sin > p(e); return UnaryFunctor > >(p); } using std::asin; template struct Functor_asin; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct Functor_asin { Functor_asin(EXPR const & e) : expr_(e) {} typename ResultTraits0::Res operator()() const { return asin(expr_()); } template typename ResultTraits1::Res operator()(T const & v1) const { return asin(expr_(v1)); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return asin(expr_(v1, v2)); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return asin(expr_(v1, v2, v3)); } protected: EXPR expr_; }; template UnaryFunctor > > asin(UnaryFunctor const & e) { Functor_asin > p(e); return UnaryFunctor > >(p); } using std::cos; template struct Functor_cos; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct Functor_cos { Functor_cos(EXPR const & e) : expr_(e) {} typename ResultTraits0::Res operator()() const { return cos(expr_()); } template typename ResultTraits1::Res operator()(T const & v1) const { return cos(expr_(v1)); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return cos(expr_(v1, v2)); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return cos(expr_(v1, v2, v3)); } protected: EXPR expr_; }; template UnaryFunctor > > cos(UnaryFunctor const & e) { Functor_cos > p(e); return UnaryFunctor > >(p); } using std::acos; template struct Functor_acos; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct Functor_acos { Functor_acos(EXPR const & e) : expr_(e) {} typename ResultTraits0::Res operator()() const { return acos(expr_()); } template typename ResultTraits1::Res operator()(T const & v1) const { return acos(expr_(v1)); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return acos(expr_(v1, v2)); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return acos(expr_(v1, v2, v3)); } protected: EXPR expr_; }; template UnaryFunctor > > acos(UnaryFunctor const & e) { Functor_acos > p(e); return UnaryFunctor > >(p); } using std::tan; template struct Functor_tan; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct Functor_tan { Functor_tan(EXPR const & e) : expr_(e) {} typename ResultTraits0::Res operator()() const { return tan(expr_()); } template typename ResultTraits1::Res operator()(T const & v1) const { return tan(expr_(v1)); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return tan(expr_(v1, v2)); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return tan(expr_(v1, v2, v3)); } protected: EXPR expr_; }; template UnaryFunctor > > tan(UnaryFunctor const & e) { Functor_tan > p(e); return UnaryFunctor > >(p); } using std::atan; template struct Functor_atan; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct Functor_atan { Functor_atan(EXPR const & e) : expr_(e) {} typename ResultTraits0::Res operator()() const { return atan(expr_()); } template typename ResultTraits1::Res operator()(T const & v1) const { return atan(expr_(v1)); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return atan(expr_(v1, v2)); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return atan(expr_(v1, v2, v3)); } protected: EXPR expr_; }; template UnaryFunctor > > atan(UnaryFunctor const & e) { Functor_atan > p(e); return UnaryFunctor > >(p); } using std::abs; template struct Functor_abs; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct Functor_abs { Functor_abs(EXPR const & e) : expr_(e) {} typename ResultTraits0::Res operator()() const { return abs(expr_()); } template typename ResultTraits1::Res operator()(T const & v1) const { return abs(expr_(v1)); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return abs(expr_(v1, v2)); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return abs(expr_(v1, v2, v3)); } protected: EXPR expr_; }; template UnaryFunctor > > abs(UnaryFunctor const & e) { Functor_abs > p(e); return UnaryFunctor > >(p); } using std::floor; template struct Functor_floor; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct Functor_floor { Functor_floor(EXPR const & e) : expr_(e) {} typename ResultTraits0::Res operator()() const { return floor(expr_()); } template typename ResultTraits1::Res operator()(T const & v1) const { return floor(expr_(v1)); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return floor(expr_(v1, v2)); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return floor(expr_(v1, v2, v3)); } protected: EXPR expr_; }; template UnaryFunctor > > floor(UnaryFunctor const & e) { Functor_floor > p(e); return UnaryFunctor > >(p); } using std::ceil; template struct Functor_ceil; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R1; typedef typename NumericTraits::RealPromote Res; }; template struct Functor_ceil { Functor_ceil(EXPR const & e) : expr_(e) {} typename ResultTraits0::Res operator()() const { return ceil(expr_()); } template typename ResultTraits1::Res operator()(T const & v1) const { return ceil(expr_(v1)); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return ceil(expr_(v1, v2)); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return ceil(expr_(v1, v2, v3)); } protected: EXPR expr_; }; template UnaryFunctor > > ceil(UnaryFunctor const & e) { Functor_ceil > p(e); return UnaryFunctor > >(p); } # 1264 "../include/vigra/functorexpression.hxx" template struct Functor_minus; template struct ResultTraits0 > { typedef typename ResultTraits0::Res Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res Res; }; template struct Functor_minus { Functor_minus(EXPR const & e) : expr_(e) {} typename ResultTraits0::Res operator()() const { return - expr_(); } template typename ResultTraits1::Res operator()(T const & v1) const { return - expr_(v1); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return - expr_(v1, v2); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return - expr_(v1, v2, v3); } protected: EXPR expr_; }; template UnaryFunctor > > operator -(UnaryFunctor const & e) { Functor_minus > p(e); return UnaryFunctor > >(p); } template struct Functor_negate; template struct ResultTraits0 > { typedef typename ResultTraits0::Res Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res Res; }; template struct Functor_negate { Functor_negate(EXPR const & e) : expr_(e) {} typename ResultTraits0::Res operator()() const { return ! expr_(); } template typename ResultTraits1::Res operator()(T const & v1) const { return ! expr_(v1); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return ! expr_(v1, v2); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return ! expr_(v1, v2, v3); } protected: EXPR expr_; }; template UnaryFunctor > > operator !(UnaryFunctor const & e) { Functor_negate > p(e); return UnaryFunctor > >(p); } template struct Functor_bitNegate; template struct ResultTraits0 > { typedef typename ResultTraits0::Res Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res Res; }; template struct Functor_bitNegate { Functor_bitNegate(EXPR const & e) : expr_(e) {} typename ResultTraits0::Res operator()() const { return ~ expr_(); } template typename ResultTraits1::Res operator()(T const & v1) const { return ~ expr_(v1); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return ~ expr_(v1, v2); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return ~ expr_(v1, v2, v3); } protected: EXPR expr_; }; template UnaryFunctor > > operator ~(UnaryFunctor const & e) { Functor_bitNegate > p(e); return UnaryFunctor > >(p); } # 1368 "../include/vigra/functorexpression.hxx" using std::pow; template struct Functor_pow; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R1; typedef typename ResultTraits0::Res R2; typedef typename PromoteTraits::Promote R3; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R1; typedef typename ResultTraits1::Res R2; typedef typename PromoteTraits::Promote R3; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R1; typedef typename ResultTraits2::Res R2; typedef typename PromoteTraits::Promote R3; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R1; typedef typename ResultTraits3::Res R2; typedef typename PromoteTraits::Promote R3; typedef typename NumericTraits::RealPromote Res; }; template struct Functor_pow { Functor_pow(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0::Res operator()() const { return pow(expr1_(), expr2_()); } template typename ResultTraits1::Res operator()(T const & v1) const { return pow(expr1_(v1), expr2_(v1)); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return pow(expr1_(v1, v2), expr2_(v1, v2)); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return pow(expr1_(v1, v2, v3), expr2_(v1, v2, v3)); } private: EXPR1 expr1_; EXPR2 expr2_; }; template UnaryFunctor, UnaryFunctor > > pow(UnaryFunctor const & e1, UnaryFunctor const & e2) { Functor_pow, UnaryFunctor > p(e1, e2); return UnaryFunctor, UnaryFunctor > >(p); } using std::atan2; template struct Functor_atan2; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R1; typedef typename ResultTraits0::Res R2; typedef typename PromoteTraits::Promote R3; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R1; typedef typename ResultTraits1::Res R2; typedef typename PromoteTraits::Promote R3; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R1; typedef typename ResultTraits2::Res R2; typedef typename PromoteTraits::Promote R3; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R1; typedef typename ResultTraits3::Res R2; typedef typename PromoteTraits::Promote R3; typedef typename NumericTraits::RealPromote Res; }; template struct Functor_atan2 { Functor_atan2(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0::Res operator()() const { return atan2(expr1_(), expr2_()); } template typename ResultTraits1::Res operator()(T const & v1) const { return atan2(expr1_(v1), expr2_(v1)); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return atan2(expr1_(v1, v2), expr2_(v1, v2)); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return atan2(expr1_(v1, v2, v3), expr2_(v1, v2, v3)); } private: EXPR1 expr1_; EXPR2 expr2_; }; template UnaryFunctor, UnaryFunctor > > atan2(UnaryFunctor const & e1, UnaryFunctor const & e2) { Functor_atan2, UnaryFunctor > p(e1, e2); return UnaryFunctor, UnaryFunctor > >(p); } using std::fmod; template struct Functor_fmod; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R1; typedef typename ResultTraits0::Res R2; typedef typename PromoteTraits::Promote R3; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R1; typedef typename ResultTraits1::Res R2; typedef typename PromoteTraits::Promote R3; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R1; typedef typename ResultTraits2::Res R2; typedef typename PromoteTraits::Promote R3; typedef typename NumericTraits::RealPromote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R1; typedef typename ResultTraits3::Res R2; typedef typename PromoteTraits::Promote R3; typedef typename NumericTraits::RealPromote Res; }; template struct Functor_fmod { Functor_fmod(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0::Res operator()() const { return fmod(expr1_(), expr2_()); } template typename ResultTraits1::Res operator()(T const & v1) const { return fmod(expr1_(v1), expr2_(v1)); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return fmod(expr1_(v1, v2), expr2_(v1, v2)); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return fmod(expr1_(v1, v2, v3), expr2_(v1, v2, v3)); } private: EXPR1 expr1_; EXPR2 expr2_; }; template UnaryFunctor, UnaryFunctor > > fmod(UnaryFunctor const & e1, UnaryFunctor const & e2) { Functor_fmod, UnaryFunctor > p(e1, e2); return UnaryFunctor, UnaryFunctor > >(p); } # 1477 "../include/vigra/functorexpression.hxx" template struct Functor_min; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R1; typedef typename ResultTraits0::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R1; typedef typename ResultTraits1::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R1; typedef typename ResultTraits2::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R1; typedef typename ResultTraits3::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct Functor_min { Functor_min(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0::Res operator()() const { typename ResultTraits0 >::R1 r1(expr1_()); typename ResultTraits0 >::R2 r2(expr2_()); return (r1 < r2) ? r1 : r2; } template typename ResultTraits1::Res operator()(T const & v1) const { typename ResultTraits1, T>::R1 r1(expr1_(v1)); typename ResultTraits1, T>::R2 r2(expr2_(v1)); return (r1 < r2) ? r1 : r2; } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { typename ResultTraits2, T1, T2>::R1 r1(expr1_(v1, v2)); typename ResultTraits2, T1, T2>::R2 r2(expr2_(v1, v2)); return (r1 < r2) ? r1 : r2; } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { typename ResultTraits3, T1, T2, T3>::R1 r1(expr1_(v1, v2, v3)); typename ResultTraits3, T1, T2, T3>::R2 r2(expr2_(v1, v2, v3)); return (r1 < r2) ? r1 : r2; } private: EXPR1 expr1_; EXPR2 expr2_; }; template UnaryFunctor, UnaryFunctor > > min(UnaryFunctor const & e1, UnaryFunctor const & e2) { Functor_min, UnaryFunctor > p(e1, e2); return UnaryFunctor, UnaryFunctor > >(p); } template struct Functor_max; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R1; typedef typename ResultTraits0::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R1; typedef typename ResultTraits1::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R1; typedef typename ResultTraits2::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R1; typedef typename ResultTraits3::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct Functor_max { Functor_max(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0::Res operator()() const { typename ResultTraits0 >::R1 r1(expr1_()); typename ResultTraits0 >::R2 r2(expr2_()); return (r1 > r2) ? r1 : r2; } template typename ResultTraits1::Res operator()(T const & v1) const { typename ResultTraits1, T>::R1 r1(expr1_(v1)); typename ResultTraits1, T>::R2 r2(expr2_(v1)); return (r1 > r2) ? r1 : r2; } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { typename ResultTraits2, T1, T2>::R1 r1(expr1_(v1, v2)); typename ResultTraits2, T1, T2>::R2 r2(expr2_(v1, v2)); return (r1 > r2) ? r1 : r2; } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { typename ResultTraits3, T1, T2, T3>::R1 r1(expr1_(v1, v2, v3)); typename ResultTraits3, T1, T2, T3>::R2 r2(expr2_(v1, v2, v3)); return (r1 > r2) ? r1 : r2; } private: EXPR1 expr1_; EXPR2 expr2_; }; template UnaryFunctor, UnaryFunctor > > max(UnaryFunctor const & e1, UnaryFunctor const & e2) { Functor_max, UnaryFunctor > p(e1, e2); return UnaryFunctor, UnaryFunctor > >(p); } # 1575 "../include/vigra/functorexpression.hxx" template struct Functor_add; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R1; typedef typename ResultTraits0::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R1; typedef typename ResultTraits1::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R1; typedef typename ResultTraits2::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R1; typedef typename ResultTraits3::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct Functor_add { Functor_add(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0::Res operator()() const { return expr1_() + expr2_(); } template typename ResultTraits1::Res operator()(T const & v1) const { return expr1_(v1) + expr2_(v1); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) + expr2_(v1, v2); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) + expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template UnaryFunctor, UnaryFunctor > > operator +(UnaryFunctor const & e1, UnaryFunctor const & e2) { Functor_add, UnaryFunctor > p(e1, e2); return UnaryFunctor, UnaryFunctor > >(p); } template struct Functor_subtract; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R1; typedef typename ResultTraits0::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R1; typedef typename ResultTraits1::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R1; typedef typename ResultTraits2::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R1; typedef typename ResultTraits3::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct Functor_subtract { Functor_subtract(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0::Res operator()() const { return expr1_() - expr2_(); } template typename ResultTraits1::Res operator()(T const & v1) const { return expr1_(v1) - expr2_(v1); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) - expr2_(v1, v2); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) - expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template UnaryFunctor, UnaryFunctor > > operator -(UnaryFunctor const & e1, UnaryFunctor const & e2) { Functor_subtract, UnaryFunctor > p(e1, e2); return UnaryFunctor, UnaryFunctor > >(p); } template struct Functor_multiply; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R1; typedef typename ResultTraits0::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R1; typedef typename ResultTraits1::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R1; typedef typename ResultTraits2::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R1; typedef typename ResultTraits3::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct Functor_multiply { Functor_multiply(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0::Res operator()() const { return expr1_() * expr2_(); } template typename ResultTraits1::Res operator()(T const & v1) const { return expr1_(v1) * expr2_(v1); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) * expr2_(v1, v2); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) * expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template UnaryFunctor, UnaryFunctor > > operator *(UnaryFunctor const & e1, UnaryFunctor const & e2) { Functor_multiply, UnaryFunctor > p(e1, e2); return UnaryFunctor, UnaryFunctor > >(p); } template struct Functor_divide; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R1; typedef typename ResultTraits0::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R1; typedef typename ResultTraits1::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R1; typedef typename ResultTraits2::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R1; typedef typename ResultTraits3::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct Functor_divide { Functor_divide(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0::Res operator()() const { return expr1_() / expr2_(); } template typename ResultTraits1::Res operator()(T const & v1) const { return expr1_(v1) / expr2_(v1); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) / expr2_(v1, v2); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) / expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template UnaryFunctor, UnaryFunctor > > operator /(UnaryFunctor const & e1, UnaryFunctor const & e2) { Functor_divide, UnaryFunctor > p(e1, e2); return UnaryFunctor, UnaryFunctor > >(p); } template struct Functor_modulo; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R1; typedef typename ResultTraits0::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R1; typedef typename ResultTraits1::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R1; typedef typename ResultTraits2::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R1; typedef typename ResultTraits3::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct Functor_modulo { Functor_modulo(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0::Res operator()() const { return expr1_() % expr2_(); } template typename ResultTraits1::Res operator()(T const & v1) const { return expr1_(v1) % expr2_(v1); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) % expr2_(v1, v2); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) % expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template UnaryFunctor, UnaryFunctor > > operator %(UnaryFunctor const & e1, UnaryFunctor const & e2) { Functor_modulo, UnaryFunctor > p(e1, e2); return UnaryFunctor, UnaryFunctor > >(p); } template struct Functor_bitAnd; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R1; typedef typename ResultTraits0::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R1; typedef typename ResultTraits1::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R1; typedef typename ResultTraits2::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R1; typedef typename ResultTraits3::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct Functor_bitAnd { Functor_bitAnd(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0::Res operator()() const { return expr1_() & expr2_(); } template typename ResultTraits1::Res operator()(T const & v1) const { return expr1_(v1) & expr2_(v1); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) & expr2_(v1, v2); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) & expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template UnaryFunctor, UnaryFunctor > > operator &(UnaryFunctor const & e1, UnaryFunctor const & e2) { Functor_bitAnd, UnaryFunctor > p(e1, e2); return UnaryFunctor, UnaryFunctor > >(p); } template struct Functor_bitOr; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R1; typedef typename ResultTraits0::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R1; typedef typename ResultTraits1::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R1; typedef typename ResultTraits2::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R1; typedef typename ResultTraits3::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct Functor_bitOr { Functor_bitOr(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0::Res operator()() const { return expr1_() | expr2_(); } template typename ResultTraits1::Res operator()(T const & v1) const { return expr1_(v1) | expr2_(v1); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) | expr2_(v1, v2); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) | expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template UnaryFunctor, UnaryFunctor > > operator |(UnaryFunctor const & e1, UnaryFunctor const & e2) { Functor_bitOr, UnaryFunctor > p(e1, e2); return UnaryFunctor, UnaryFunctor > >(p); } template struct Functor_bitXor; template struct ResultTraits0 > { typedef typename ResultTraits0::Res R1; typedef typename ResultTraits0::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res R1; typedef typename ResultTraits1::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res R1; typedef typename ResultTraits2::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res R1; typedef typename ResultTraits3::Res R2; typedef typename PromoteTraits::Promote Res; }; template struct Functor_bitXor { Functor_bitXor(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0::Res operator()() const { return expr1_() ^ expr2_(); } template typename ResultTraits1::Res operator()(T const & v1) const { return expr1_(v1) ^ expr2_(v1); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) ^ expr2_(v1, v2); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) ^ expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template UnaryFunctor, UnaryFunctor > > operator ^(UnaryFunctor const & e1, UnaryFunctor const & e2) { Functor_bitXor, UnaryFunctor > p(e1, e2); return UnaryFunctor, UnaryFunctor > >(p); } # 1663 "../include/vigra/functorexpression.hxx" template struct Functor_equals; template struct ResultTraits0 > { typedef bool Res; }; template struct ResultTraits1, T1> { typedef bool Res; }; template struct ResultTraits2, T1, T2> { typedef bool Res; }; template struct ResultTraits3, T1, T2, T3> { typedef bool Res; }; template struct Functor_equals { Functor_equals(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} bool operator()() const { return expr1_() == expr2_(); } template bool operator()(T const & v1) const { return expr1_(v1) == expr2_(v1); } template bool operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) == expr2_(v1, v2); } template bool operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) == expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template UnaryFunctor, UnaryFunctor > > operator ==(UnaryFunctor const & e1, UnaryFunctor const & e2) { Functor_equals, UnaryFunctor > p(e1, e2); return UnaryFunctor, UnaryFunctor > >(p); } template struct Functor_differs; template struct ResultTraits0 > { typedef bool Res; }; template struct ResultTraits1, T1> { typedef bool Res; }; template struct ResultTraits2, T1, T2> { typedef bool Res; }; template struct ResultTraits3, T1, T2, T3> { typedef bool Res; }; template struct Functor_differs { Functor_differs(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} bool operator()() const { return expr1_() != expr2_(); } template bool operator()(T const & v1) const { return expr1_(v1) != expr2_(v1); } template bool operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) != expr2_(v1, v2); } template bool operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) != expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template UnaryFunctor, UnaryFunctor > > operator !=(UnaryFunctor const & e1, UnaryFunctor const & e2) { Functor_differs, UnaryFunctor > p(e1, e2); return UnaryFunctor, UnaryFunctor > >(p); } template struct Functor_less; template struct ResultTraits0 > { typedef bool Res; }; template struct ResultTraits1, T1> { typedef bool Res; }; template struct ResultTraits2, T1, T2> { typedef bool Res; }; template struct ResultTraits3, T1, T2, T3> { typedef bool Res; }; template struct Functor_less { Functor_less(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} bool operator()() const { return expr1_() < expr2_(); } template bool operator()(T const & v1) const { return expr1_(v1) < expr2_(v1); } template bool operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) < expr2_(v1, v2); } template bool operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) < expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template UnaryFunctor, UnaryFunctor > > operator <(UnaryFunctor const & e1, UnaryFunctor const & e2) { Functor_less, UnaryFunctor > p(e1, e2); return UnaryFunctor, UnaryFunctor > >(p); } template struct Functor_lessEqual; template struct ResultTraits0 > { typedef bool Res; }; template struct ResultTraits1, T1> { typedef bool Res; }; template struct ResultTraits2, T1, T2> { typedef bool Res; }; template struct ResultTraits3, T1, T2, T3> { typedef bool Res; }; template struct Functor_lessEqual { Functor_lessEqual(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} bool operator()() const { return expr1_() <= expr2_(); } template bool operator()(T const & v1) const { return expr1_(v1) <= expr2_(v1); } template bool operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) <= expr2_(v1, v2); } template bool operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) <= expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template UnaryFunctor, UnaryFunctor > > operator <=(UnaryFunctor const & e1, UnaryFunctor const & e2) { Functor_lessEqual, UnaryFunctor > p(e1, e2); return UnaryFunctor, UnaryFunctor > >(p); } template struct Functor_greater; template struct ResultTraits0 > { typedef bool Res; }; template struct ResultTraits1, T1> { typedef bool Res; }; template struct ResultTraits2, T1, T2> { typedef bool Res; }; template struct ResultTraits3, T1, T2, T3> { typedef bool Res; }; template struct Functor_greater { Functor_greater(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} bool operator()() const { return expr1_() > expr2_(); } template bool operator()(T const & v1) const { return expr1_(v1) > expr2_(v1); } template bool operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) > expr2_(v1, v2); } template bool operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) > expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template UnaryFunctor, UnaryFunctor > > operator >(UnaryFunctor const & e1, UnaryFunctor const & e2) { Functor_greater, UnaryFunctor > p(e1, e2); return UnaryFunctor, UnaryFunctor > >(p); } template struct Functor_greaterEqual; template struct ResultTraits0 > { typedef bool Res; }; template struct ResultTraits1, T1> { typedef bool Res; }; template struct ResultTraits2, T1, T2> { typedef bool Res; }; template struct ResultTraits3, T1, T2, T3> { typedef bool Res; }; template struct Functor_greaterEqual { Functor_greaterEqual(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} bool operator()() const { return expr1_() >= expr2_(); } template bool operator()(T const & v1) const { return expr1_(v1) >= expr2_(v1); } template bool operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) >= expr2_(v1, v2); } template bool operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) >= expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template UnaryFunctor, UnaryFunctor > > operator >=(UnaryFunctor const & e1, UnaryFunctor const & e2) { Functor_greaterEqual, UnaryFunctor > p(e1, e2); return UnaryFunctor, UnaryFunctor > >(p); } template struct Functor_and; template struct ResultTraits0 > { typedef bool Res; }; template struct ResultTraits1, T1> { typedef bool Res; }; template struct ResultTraits2, T1, T2> { typedef bool Res; }; template struct ResultTraits3, T1, T2, T3> { typedef bool Res; }; template struct Functor_and { Functor_and(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} bool operator()() const { return expr1_() && expr2_(); } template bool operator()(T const & v1) const { return expr1_(v1) && expr2_(v1); } template bool operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) && expr2_(v1, v2); } template bool operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) && expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template UnaryFunctor, UnaryFunctor > > operator &&(UnaryFunctor const & e1, UnaryFunctor const & e2) { Functor_and, UnaryFunctor > p(e1, e2); return UnaryFunctor, UnaryFunctor > >(p); } template struct Functor_or; template struct ResultTraits0 > { typedef bool Res; }; template struct ResultTraits1, T1> { typedef bool Res; }; template struct ResultTraits2, T1, T2> { typedef bool Res; }; template struct ResultTraits3, T1, T2, T3> { typedef bool Res; }; template struct Functor_or { Functor_or(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} bool operator()() const { return expr1_() || expr2_(); } template bool operator()(T const & v1) const { return expr1_(v1) || expr2_(v1); } template bool operator()(T1 const & v1, T2 const & v2) const { return expr1_(v1, v2) || expr2_(v1, v2); } template bool operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return expr1_(v1, v2, v3) || expr2_(v1, v2, v3); } private: EXPR1 expr1_; EXPR2 expr2_; }; template UnaryFunctor, UnaryFunctor > > operator ||(UnaryFunctor const & e1, UnaryFunctor const & e2) { Functor_or, UnaryFunctor > p(e1, e2); return UnaryFunctor, UnaryFunctor > >(p); } # 1680 "../include/vigra/functorexpression.hxx" template struct UnaryFctPtrFunctor { UnaryFctPtrFunctor(EXPR const & e, RES (*fct)(ARG)) : expr_(e), f_(fct) {} RES operator()() const { return f_(expr_()); } template RES operator()(T const & v1) const { return f_(expr_(v1)); } template RES operator()(T1 const & v1, T2 const & v2) const { return f_(expr_(v1, v2)); } template RES operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return f_(expr_(v1, v2, v3)); } protected: EXPR expr_; RES (*f_)(ARG); }; template struct ResultTraits0 > { typedef RES Res; }; template struct ResultTraits1, T1> { typedef RES Res; }; template struct ResultTraits2, T1, T2> { typedef RES Res; }; template struct ResultTraits3, T1, T2, T3> { typedef RES Res; }; template UnaryFunctor, RES, ARG> > applyFct(RES (*f)(ARG), UnaryFunctor const & e) { UnaryFctPtrFunctor, RES, ARG> p(e, f); return UnaryFunctor, RES, ARG> >(p); } template struct BinaryFctPtrFunctor { BinaryFctPtrFunctor(EXPR1 const & e1, EXPR2 const & e2, RES (*f)(ARG1, ARG2)) : expr1_(e1), expr2_(e2), f_(f) {} RES operator()() const { return f_(expr1_(), expr2_()); } template RES operator()(T const & v1) const { return f_(expr1_(v1), expr2_(v1)); } template RES operator()(T1 const & v1, T2 const & v2) const { return f_(expr1_(v1, v2), expr2_(v1, v2)); } template RES operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { return f_(expr1_(v1, v2, v3), expr2_(v1, v2, v3)); } protected: EXPR1 expr1_; EXPR2 expr2_; RES (*f_)(ARG1, ARG2); }; template struct ResultTraits0 > { typedef RES Res; }; template struct ResultTraits1, T1> { typedef RES Res; }; template struct ResultTraits2, T1, T2> { typedef RES Res; }; template struct ResultTraits3, T1, T2, T3> { typedef RES Res; }; template UnaryFunctor, UnaryFunctor, RES, ARG1, ARG2> > applyFct(RES (*f)(ARG1, ARG2), UnaryFunctor const & e1, UnaryFunctor const & e2) { BinaryFctPtrFunctor, UnaryFunctor, RES, ARG1, ARG2> p(e1, e2, f); return UnaryFunctor, UnaryFunctor, RES, ARG1, ARG2> >(p); } template struct CommaFunctor { CommaFunctor(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} typename ResultTraits0::Res operator()() const { expr1_(); return expr2_(); } template typename ResultTraits1::Res operator()(T const & v1) const { expr1_(v1); return expr2_(v1); } template typename ResultTraits2::Res operator()(T1 const & v1, T2 const & v2) const { expr1_(v1, v2); return expr2_(v1, v2); } template typename ResultTraits3::Res operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { expr1_(v1, v2, v3); return expr2_(v1, v2, v3); } protected: EXPR1 expr1_; EXPR2 expr2_; }; template struct ResultTraits0 > { typedef typename ResultTraits0::Res Res; }; template struct ResultTraits1, T1> { typedef typename ResultTraits1::Res Res; }; template struct ResultTraits2, T1, T2> { typedef typename ResultTraits2::Res Res; }; template struct ResultTraits3, T1, T2, T3> { typedef typename ResultTraits3::Res Res; }; template UnaryFunctor, UnaryFunctor > > operator,(UnaryAnalyser const & e1, UnaryFunctor const & e2) { CommaFunctor, UnaryFunctor > p(e1, e2); return UnaryFunctor, UnaryFunctor > >(p); } template struct CommaAnalyser { CommaAnalyser(EXPR1 const & e1, EXPR2 const & e2) : expr1_(e1), expr2_(e2) {} void operator()() const { expr1_(); expr2_(); } template void operator()(T const & v1) const { expr1_(v1); expr2_(v1); } template void operator()(T1 const & v1, T2 const & v2) const { expr1_(v1, v2); expr2_(v1, v2); } template void operator()(T1 const & v1, T2 const & v2, T3 const & v3) const { expr1_(v1, v2, v3); expr2_(v1, v2, v3); } protected: EXPR1 expr1_; EXPR2 expr2_; }; template UnaryAnalyser, UnaryAnalyser > > operator,(UnaryAnalyser const & e1, UnaryAnalyser const & e2) { CommaAnalyser, UnaryAnalyser > p(e1, e2); return UnaryAnalyser, UnaryAnalyser > >(p); } } template class FunctorTraits > : public FunctorTraitsBase > { public: typedef VigraTrueType isInitializer; typedef VigraTrueType isUnaryFunctor; typedef VigraTrueType isBinaryFunctor; typedef VigraTrueType isTernaryFunctor; }; template class FunctorTraits > : public FunctorTraitsBase > { public: typedef VigraTrueType isUnaryAnalyser; typedef VigraTrueType isBinaryAnalyser; typedef VigraTrueType isTernaryAnalyser; }; } # 42 "mask.h" 2 # 51 "mask.h" # 1 "/usr/include/boost/lambda/algorithm.hpp" 1 3 4 # 20 "/usr/include/boost/lambda/algorithm.hpp" 3 4 namespace boost { namespace lambda { namespace ll { struct for_each { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<3, Args>::type >::type type; }; template C operator()(A a, A b, C c) const { return ::std::for_each(a, b, c); } }; struct find { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<1, Args>::type >::type type; }; template A operator()(A a, A b, const C& c) const { return ::std::find(a, b, c); } }; struct find_if { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<1, Args>::type >::type type; }; template A operator()(A a, A b, C c) const { return ::std::find_if(a, b, c); } }; struct find_end { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<1, Args>::type >::type type; }; template A operator()(A a, A b, C c, C d) const { return ::std::find_end(a, b, c, d); } template A operator()(A a, A b, C c, C d, E e) const { return ::std::find_end(a, b, c, d, e); } }; struct find_first_of { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<1, Args>::type >::type type; }; template A operator()(A a, A b, C c, C d) const { return ::std::find_first_of(a, b, c, d); } template A operator()(A a, A b, C c, C d, E e) const { return ::std::find_first_of(a, b, c, d, e); } }; struct adjacent_find { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<1, Args>::type >::type type; }; template A operator()(A a, A b) const { return ::std::adjacent_find(a, b); } template A operator()(A a, A b, C c) const { return ::std::adjacent_find(a, b, c); } }; struct count { template struct sig { typedef typename ::std::iterator_traits< typename boost::remove_const< typename boost::tuples::element<1, Args>::type >::type >::difference_type type; }; template typename ::std::iterator_traits::difference_type operator()(A a, A b, const C& c) const { return ::std::count(a, b, c); } }; struct count_if { template struct sig { typedef typename ::std::iterator_traits< typename boost::remove_const< typename boost::tuples::element<1, Args>::type >::type >::difference_type type; }; template typename ::std::iterator_traits::difference_type operator()(A a, A b, C c) const { return ::std::count_if(a, b, c); } }; struct mismatch { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<1, Args>::type >::type element1_type; typedef typename boost::remove_const< typename boost::tuples::element<3, Args>::type >::type element2_type; typedef ::std::pair< element1_type, element2_type > type; }; template ::std::pair operator()(A a, A b, C c) const { return ::std::mismatch(a, b, c); } template ::std::pair operator()(A a, A b, C c, D d) const { return ::std::mismatch(a, b, c, d); } }; struct equal { template struct sig { typedef bool type; }; template bool operator()(A a, A b, C c) const { return ::std::equal(a, b, c); } template bool operator()(A a, A b, C c, D d) const { return ::std::equal(a, b, c, d); } }; struct search { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<1, Args>::type >::type type; }; template A operator()(A a, A b, C c, C d) const { return std::search(a, b, c, d);} template A operator()(A a, A b, C c, C d, E e) const { return std::search(a, b, c, d, e);} }; struct copy { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<3, Args>::type >::type type; }; template C operator()(A a, A b, C c) const { return ::std::copy(a, b, c); } }; struct copy_backward { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<3, Args>::type >::type type; }; template C operator()(A a, A b, C c) const { return ::std::copy_backward(a, b, c); } }; struct swap { template struct sig { typedef void type; }; template void operator()(A a, A b) const { ::std::swap(a, b); } }; struct swap_ranges { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<3, Args>::type >::type type; }; template C operator()(A a, A b, C c) const { return ::std::swap_ranges(a, b, c); } }; struct iter_swap { template struct sig { typedef void type; }; template void operator()(A a, A b) const { ::std::iter_swap(a, b); } }; struct transform { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element< boost::tuples::length::value - 2, Args >::type >::type type; }; template C operator()(A a, A b, C c, D d) const { return std::transform(a, b, c, d);} template D operator()(A a, A b, C c, D d, E e) const { return std::transform(a, b, c, d, e);} }; struct replace { template struct sig { typedef void type; }; template void operator()(A a, A b, const C& c, const C& d) const { ::std::replace(a, b, c, d); } }; struct replace_if { template struct sig { typedef void type; }; template void operator()(A a, A b, C c, const D& d) const { ::std::replace_if(a, b, c, d); } }; struct replace_copy { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<3, Args>::type >::type type; }; template C operator()(A a, A b, C c, const D& d, const D& e) const { return ::std::replace_copy(a, b, c, d, e); } }; struct replace_copy_if { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<3, Args>::type >::type type; }; template C operator()(A a, A b, C c, D d, const E& e) const { return ::std::replace_copy_if(a, b, c, d, e); } }; struct fill { template struct sig { typedef void type; }; template void operator()(A a, A b, const C& c) const { ::std::fill(a, b, c); } }; struct fill_n { template struct sig { typedef void type; }; template void operator()(A a, B b, const C& c) const { ::std::fill_n(a, b, c); } }; struct generate { template struct sig { typedef void type; }; template void operator()(A a, A b, C c) const { ::std::generate(a, b, c); } }; struct generate_n { template struct sig { typedef void type; }; template void operator()(A a, B b, C c) const { ::std::generate_n(a, b, c); } }; struct remove { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<1, Args>::type >::type type; }; template A operator()(A a, A b, const C& c) const { return ::std::remove(a, b, c); } }; struct remove_if { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<1, Args>::type >::type type; }; template A operator()(A a, A b, C c) const { return ::std::remove_if(a, b, c); } }; struct remove_copy { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<3, Args>::type >::type type; }; template C operator()(A a, A b, C c, const D& d) const { return ::std::remove_copy(a, b, c, d); } }; struct remove_copy_if { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<3, Args>::type >::type type; }; template C operator()(A a, A b, C c, D d) const { return ::std::remove_copy_if(a, b, c, d); } }; struct unique { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<1, Args>::type >::type type; }; template A operator()(A a, A b) const { return ::std::unique(a, b); } template A operator()(A a, A b, C c) const { return ::std::unique(a, b, c); } }; struct unique_copy { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<3, Args>::type >::type type; }; template C operator()(A a, A b, C c) const { return ::std::unique_copy(a, b, c); } template C operator()(A a, A b, C c, D d) const { return ::std::unique_copy(a, b, c, d); } }; struct reverse { template struct sig { typedef void type; }; template void operator()(A a, A b) const { ::std::reverse(a, b); } }; struct reverse_copy { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<3, Args>::type >::type type; }; template C operator()(A a, A b, C c) const { return ::std::reverse_copy(a, b, c); } }; struct rotate { template struct sig { typedef void type; }; template void operator()(A a, A b, A c) const { ::std::rotate(a, b, c); } }; struct rotate_copy { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<3, Args>::type >::type type; }; template D operator()(A a, A b, A c, D d) const { return ::std::rotate_copy(a, b, c, d); } }; struct random_shuffle { template struct sig { typedef void type; }; template void operator()(A a, A b) const { ::std::random_shuffle(a, b); } template void operator()(A a, A b, const C& c) const { ::std::random_shuffle(a, b, c); } }; struct partition { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<1, Args>::type >::type type; }; template A operator()(A a, A b, C c) const { return ::std::partition(a, b, c); } }; struct stable_partition { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<1, Args>::type >::type type; }; template A operator()(A a, A b, C c) const { return ::std::stable_partition(a, b, c); } }; struct sort { template struct sig { typedef void type; }; template void operator()(A a, A b) const { ::std::sort(a, b); } template void operator()(A a, A b, C c) const { ::std::sort(a, b, c); } }; struct stable_sort { template struct sig { typedef void type; }; template void operator()(A a, A b) const { ::std::stable_sort(a, b); } template void operator()(A a, A b, C c) const { ::std::stable_sort(a, b, c); } }; struct partial_sort { template struct sig { typedef void type; }; template void operator()(A a, A b, A c) const { ::std::partial_sort(a, b, c); } template void operator()(A a, A b, A c, D d) const { ::std::partial_sort(a, b, c, d); } }; struct partial_sort_copy { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<3, Args>::type >::type type; }; template C operator()(A a, A b, C c, C d) const { return ::std::partial_sort_copy(a, b, c, d); } template C operator()(A a, A b, C c, C d, E e) const { return ::std::partial_sort_copy(a, b, c, d, e); } }; struct nth_element { template struct sig { typedef void type; }; template void operator()(A a, A b, A c) const { ::std::nth_element(a, b, c); } template void operator()(A a, A b, A c, D d) const { ::std::nth_element(a, b, c, d); } }; struct lower_bound { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<1, Args>::type >::type type; }; template A operator()(A a, A b, const C& c) const { return ::std::lower_bound(a, b, c); } template A operator()(A a, A b, const C& c, D d) const { return ::std::lower_bound(a, b, c, d); } }; struct upper_bound { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<1, Args>::type >::type type; }; template A operator()(A a, A b, const C& c) const { return ::std::upper_bound(a, b, c); } template A operator()(A a, A b, const C& c, D d) const { return ::std::upper_bound(a, b, c, d); } }; struct equal_range { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<1, Args>::type >::type element_type; typedef ::std::pair< element_type, element_type > type; }; template ::std::pair operator()(A a, A b, const C& c) const { return ::std::equal_range(a, b, c); } template ::std::pair operator()(A a, A b, const C& c, D d) const { return ::std::equal_range(a, b, c, d); } }; struct binary_search { template struct sig { typedef bool type; }; template bool operator()(A a, A b, const C& c) const { return ::std::binary_search(a, b, c); } template bool operator()(A a, A b, const C& c, D d) const { return ::std::binary_search(a, b, c, d); } }; struct merge { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<5, Args>::type >::type type; }; template E operator()(A a, A b, C c, C d, E e) const { return std::merge(a, b, c, d, e);} template E operator()(A a, A b, C c, C d, E e, F f) const { return std::merge(a, b, c, d, e, f);} }; struct inplace_merge { template struct sig { typedef void type; }; template void operator()(A a, A b, A c) const { ::std::inplace_merge(a, b, c); } template void operator()(A a, A b, A c, D d) const { ::std::inplace_merge(a, b, c, d); } }; struct includes { template struct sig { typedef bool type; }; template bool operator()(A a, A b, C c, C d) const { return ::std::includes(a, b, c, d); } template bool operator()(A a, A b, C c, C d, E e) const { return ::std::includes(a, b, c, d, e); } }; struct set_union { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<5, Args>::type >::type type; }; template E operator()(A a, A b, C c, C d, E e) const { return std::set_union(a, b, c, d, e);} template E operator()(A a, A b, C c, C d, E e, F f) const { return std::set_union(a, b, c, d, e, f);} }; struct set_intersection { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<5, Args>::type >::type type; }; template E operator()(A a, A b, C c, C d, E e) const { return std::set_intersection(a, b, c, d, e);} template E operator()(A a, A b, C c, C d, E e, F f) const { return std::set_intersection(a, b, c, d, e, f);} }; struct set_difference { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<5, Args>::type >::type type; }; template E operator()(A a, A b, C c, C d, E e) const { return std::set_difference(a, b, c, d, e);} template E operator()(A a, A b, C c, C d, E e, F f) const { return std::set_difference(a, b, c, d, e, f);} }; struct set_symmetric_difference { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<5, Args>::type >::type type; }; template E operator()(A a, A b, C c, C d, E e) const { return std::set_symmetric_difference(a, b, c, d, e);} template E operator()(A a, A b, C c, C d, E e, F f) const { return std::set_symmetric_difference(a, b, c, d, e, f);} }; struct push_heap { template struct sig { typedef void type; }; template void operator()(A a, A b) const { ::std::push_heap(a, b); } template void operator()(A a, A b, C c) const { ::std::push_heap(a, b, c); } }; struct pop_heap { template struct sig { typedef void type; }; template void operator()(A a, A b) const { ::std::pop_heap(a, b); } template void operator()(A a, A b, C c) const { ::std::pop_heap(a, b, c); } }; struct make_heap { template struct sig { typedef void type; }; template void operator()(A a, A b) const { ::std::make_heap(a, b); } template void operator()(A a, A b, C c) const { ::std::make_heap(a, b, c); } }; struct sort_heap { template struct sig { typedef void type; }; template void operator()(A a, A b) const { ::std::sort_heap(a, b); } template void operator()(A a, A b, C c) const { ::std::sort_heap(a, b, c); } }; struct min { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<1, Args>::type >::type type; }; template A operator()(const A& a, const A& b) const { return (::std::min)(a, b); } template A operator()(const A& a, const A& b, C c) const { return (::std::min)(a, b, c); } }; struct max { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<1, Args>::type >::type type; }; template A operator()(const A& a, const A& b) const { return (::std::max)(a, b); } template A operator()(const A& a, const A& b, C c) const { return (::std::max)(a, b, c); } }; struct min_element { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<1, Args>::type >::type type; }; template A operator()(A a, A b) const { return ::std::min_element(a, b); } template A operator()(A a, A b, C c) const { return ::std::min_element(a, b, c); } }; struct max_element { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<1, Args>::type >::type type; }; template A operator()(A a, A b) const { return ::std::max_element(a, b); } template A operator()(A a, A b, C c) const { return ::std::max_element(a, b, c); } }; struct lexicographical_compare { template struct sig { typedef bool type; }; template bool operator()(A a, A b, C c, C d) const { return ::std::lexicographical_compare(a, b, c, d); } template bool operator()(A a, A b, C c, C d, E e) const { return ::std::lexicographical_compare(a, b, c, d, e); } }; struct next_permutation { template struct sig { typedef bool type; }; template bool operator()(A a, A b) const { return ::std::next_permutation(a, b); } template bool operator()(A a, A b, C c) const { return ::std::next_permutation(a, b, c); } }; struct prev_permutation { template struct sig { typedef bool type; }; template bool operator()(A a, A b) const { return ::std::prev_permutation(a, b); } template bool operator()(A a, A b, C c) const { return ::std::prev_permutation(a, b, c); } }; } # 1367 "/usr/include/boost/lambda/algorithm.hpp" 3 4 struct call_begin { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<1, Args>::type >::type::const_iterator type; }; template typename T::const_iterator operator()(const T& t) const { return t.begin(); } }; struct call_end { template struct sig { typedef typename boost::remove_const< typename boost::tuples::element<1, Args>::type >::type::const_iterator type; }; template typename T::const_iterator operator()(const T& t) const { return t.end(); } }; } } # 52 "mask.h" 2 # 1 "/usr/include/boost/lambda/if.hpp" 1 3 4 # 24 "/usr/include/boost/lambda/if.hpp" 3 4 namespace boost { namespace lambda { class ifthen_action {}; class ifthenelse_action {}; class ifthenelsereturn_action {}; template class lambda_functor_base { public: Args args; template struct sig { typedef void type; }; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { if (detail::select(boost::tuples::get<0>(args), a, b, c, env)) detail::select(boost::tuples::get<1>(args), a, b, c, env); } }; template inline const lambda_functor< lambda_functor_base< ifthen_action, tuple, lambda_functor > > > if_then(const lambda_functor& a1, const lambda_functor& a2) { return lambda_functor_base< ifthen_action, tuple, lambda_functor > > ( tuple, lambda_functor >(a1, a2) ); } template class lambda_functor_base { public: Args args; template struct sig { typedef void type; }; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { if (detail::select(boost::tuples::get<0>(args), a, b, c, env)) detail::select(boost::tuples::get<1>(args), a, b, c, env); else detail::select(boost::tuples::get<2>(args), a, b, c, env); } }; template inline const lambda_functor< lambda_functor_base< ifthenelse_action, tuple, lambda_functor, lambda_functor > > > if_then_else(const lambda_functor& a1, const lambda_functor& a2, const lambda_functor& a3) { return lambda_functor_base< ifthenelse_action, tuple, lambda_functor, lambda_functor > > (tuple, lambda_functor, lambda_functor > (a1, a2, a3) ); } template inline const lambda_functor< lambda_functor_base< other_action, tuple, typename const_copy_argument::type, typename const_copy_argument::type> > > if_then_else_return(const lambda_functor& a1, const Arg2 & a2, const Arg3 & a3) { return lambda_functor_base< other_action, tuple, typename const_copy_argument::type, typename const_copy_argument::type> > ( tuple, typename const_copy_argument::type, typename const_copy_argument::type> (a1, a2, a3) ); } namespace detail { template struct return_type_2_ifthenelsereturn; template struct return_type_2_ifthenelsereturn { typedef detail::return_type_deduction_failure type; }; template struct return_type_2_ifthenelsereturn { typedef A type; }; template struct return_type_2_ifthenelsereturn { typedef B type; }; template struct return_type_2_ifthenelsereturn { typedef A type; }; template struct return_type_2_ifthenelsereturn<1, false, false, false, A, B> { typedef const typename boost::remove_reference::type plainA; typedef const typename boost::remove_reference::type plainB; typedef typename return_type_2_ifthenelsereturn< 2, boost::is_convertible::value, boost::is_convertible::value, boost::is_same::value, plainA, plainB>::type type; }; template struct return_type_2_ifthenelsereturn<2, false, false, false, A, B> { typedef detail::return_type_deduction_failure type; }; template struct non_numeric_types { typedef typename return_type_2_ifthenelsereturn< 1, is_convertible::value, is_convertible::value, is_same::value, A, B>::type type; }; template struct arithmetic_or_not { typedef typename return_type_2, A, B>::type type; }; template struct arithmetic_or_not { typedef typename non_numeric_types::type type; }; template struct arithmetic_or_not <-1, -1, A, B> { typedef typename non_numeric_types::type type; }; template struct arithmetic_or_not <-1, CodeB, A, B> { typedef typename non_numeric_types::type type; }; template struct arithmetic_or_not { typedef typename non_numeric_types::type type; }; template struct same_or_not { typedef typename detail::remove_reference_and_cv::type plainA; typedef typename detail::remove_reference_and_cv::type plainB; typedef typename arithmetic_or_not< detail::promote_code::value, detail::promote_code::value, A, B>::type type; }; template struct same_or_not { typedef A type; }; } template struct return_type_2, A, B> { typedef typename detail::array_to_pointer::type A1; typedef typename detail::array_to_pointer::type B1; typedef typename boost::add_const::type>::type type; }; # 291 "/usr/include/boost/lambda/if.hpp" 3 4 template class lambda_functor_base, Args> { public: Args args; template struct sig { private: typedef typename detail::nth_return_type_sig<1, Args, SigArgs>::type ret1; typedef typename detail::nth_return_type_sig<2, Args, SigArgs>::type ret2; public: typedef typename return_type_2< other_action, ret1, ret2 >::type type; }; public: explicit lambda_functor_base(const Args& a) : args(a) {} template RET call(A& a, B& b, C& c, Env& env) const { return (detail::select(boost::tuples::get<0>(args), a, b, c, env)) ? detail::select(boost::tuples::get<1>(args), a, b, c, env) : detail::select(boost::tuples::get<2>(args), a, b, c, env); } }; # 352 "/usr/include/boost/lambda/if.hpp" 3 4 template struct if_then_else_composite { typedef if_then_else_composite self_t; template struct sig { typedef void type; }; if_then_else_composite( CondT const& cond_, ThenT const& then_, ElseT const& else__) : cond(cond_), then(then_), else_(else__) {} template Ret call(A& a, B& b, C& c, Env& env) const { if (cond.internal_call(a, b, c, env)) then.internal_call(a, b, c, env); else else_.internal_call(a, b, c, env); } CondT cond; ThenT then; ElseT else_; }; template struct else_gen { else_gen(CondT const& cond_, ThenT const& then_) : cond(cond_), then(then_) {} template lambda_functor::type> > operator[](ElseT const& else_) { typedef if_then_else_composite::type> result; return result(cond, then, to_lambda_functor(else_)); } CondT cond; ThenT then; }; template struct if_then_composite { template struct sig { typedef void type; }; if_then_composite(CondT const& cond_, ThenT const& then_) : cond(cond_), then(then_), else_(cond, then) {} template Ret call(A& a, B& b, C& c, Env& env) const { if (cond.internal_call(a, b, c, env)) then.internal_call(a, b, c, env); } CondT cond; ThenT then; else_gen else_; }; template struct if_gen { if_gen(CondT const& cond_) : cond(cond_) {} template lambda_functor::type, typename as_lambda_functor::type> > operator[](ThenT const& then) const { typedef if_then_composite< typename as_lambda_functor::type, typename as_lambda_functor::type> result; return result( to_lambda_functor(cond), to_lambda_functor(then)); } CondT cond; }; template inline if_gen if_(CondT const& cond) { return if_gen(cond); } } } # 54 "mask.h" 2 using std::make_pair; using std::vector; using __gnu_cxx::slist; using vigra::combineThreeImages; using vigra::combineTwoImages; using vigra::CrackContourCirculator; using vigra::exportImage; using vigra::ImageExportInfo; using vigra::ImageImportInfo; using vigra::importImageAlpha; using vigra::initImageIf; using vigra::LinearIntensityTransform; using vigra::linearRangeMapping; using vigra::NumericTraits; using vigra::Point2D; using vigra::Rect2D; using vigra::RGBToGrayAccessor; using vigra::Size2D; using vigra::transformImage; using vigra::transformImageIf; using vigra::functor::Arg1; using vigra::functor::Arg2; using vigra::functor::Arg3; using vigra::functor::ifThenElse; using vigra::functor::Param; using vigra::functor::UnaryFunctor; using vigra_ext::copyPaintedSetToImage; using boost::lambda::_1; using boost::lambda::_2; using boost::lambda::if_then_else_return; using boost::lambda::call_begin; using boost::lambda::call_end; using boost::lambda::constant; using boost::lambda::protect; namespace enblend { typedef slist > Segment; typedef vector Contour; typedef vector ContourVector; template class PixelDifferenceFunctor { typedef typename EnblendNumericTraits::ImagePixelComponentType PixelComponentType; typedef typename EnblendNumericTraits::ImagePixelComponentType ResultPixelComponentType; typedef LinearIntensityTransform RangeMapper; public: PixelDifferenceFunctor() : rm(linearRangeMapping(NumericTraits::min(), NumericTraits::max(), ResultType(NumericTraits::min()), ResultType(NumericTraits::max()))) { } inline ResultType operator()(const PixelType & a, const PixelType & b) const { typedef typename NumericTraits::isScalar src_is_scalar; return diff(a, b, src_is_scalar()); } protected: inline ResultType diff(const PixelType & a, const PixelType & b, VigraFalseType) const { PixelComponentType aLum = a.luminance(); PixelComponentType bLum = b.luminance(); PixelComponentType aHue = a.hue(); PixelComponentType bHue = b.hue(); PixelComponentType lumDiff = (aLum > bLum) ? (aLum - bLum) : (bLum - aLum); PixelComponentType hueDiff = (aHue > bHue) ? (aHue - bHue) : (bHue - aHue); if (hueDiff > (NumericTraits::max() / 2)) hueDiff = NumericTraits::max() - hueDiff; return rm(std::max(hueDiff, lumDiff)); } inline ResultType diff(const PixelType & a, const PixelType & b, VigraTrueType) const { typedef typename NumericTraits::isSigned src_is_signed; return scalar_diff(a, b, src_is_signed()); } inline ResultType scalar_diff(const PixelType & a, const PixelType & b, VigraTrueType) const { return rm(std::abs(a - b)); } inline ResultType scalar_diff(const PixelType & a, const PixelType & b, VigraFalseType) const { return rm(std::abs(static_cast(a) - static_cast(b))); } RangeMapper rm; }; template void fillContour(MaskType *mask, Contour & contour, Diff2D offset) { typedef typename MaskType::PixelType MaskPixelType; miPixel pixels[2]; pixels[0] = NumericTraits::max(); pixels[1] = NumericTraits::max(); miGC *pGC = miNewGC(2, pixels); miPaintedSet *paintedSet = miNewPaintedSet(); int totalPoints = 0; for (Contour::iterator currentSegment = contour.begin(); currentSegment != contour.end(); ++currentSegment) { totalPoints += (*currentSegment)->size(); } miPoint *points = new miPoint[totalPoints]; int i = 0; for (Contour::iterator currentSegment = contour.begin(); currentSegment != contour.end(); ++currentSegment) { for (Segment::iterator vertexIterator = (*currentSegment)->begin(); vertexIterator != (*currentSegment)->end(); ++vertexIterator) { points[i].x = vertexIterator->second.x; points[i].y = vertexIterator->second.y; ++i; } } miFillPolygon(paintedSet, pGC, MI_SHAPE_GENERAL, MI_COORD_MODE_ORIGIN, totalPoints, points); delete[] points; copyPaintedSetToImage(destImageRange(*mask), paintedSet, offset); miDeleteGC(pGC); miDeletePaintedSet(paintedSet); } template void maskBounds(MaskType *mask, Rect2D & uBB, Rect2D & mBB) { typedef typename MaskType::PixelType MaskPixelType; typedef typename MaskType::traverser MaskIteratorType; typedef typename MaskType::Accessor MaskAccessor; mBB = Rect2D(Point2D(mask->size()), Point2D(0,0)); MaskIteratorType myPrev = mask->upperLeft(); MaskIteratorType my = mask->upperLeft() + Diff2D(0,1); MaskIteratorType mend = mask->lowerRight(); MaskIteratorType mxLeft = myPrev; MaskIteratorType mx = myPrev + Diff2D(1,0); for (int x = 1; mx.x < mend.x; ++x, ++mx.x, ++mxLeft.x) { if (*mxLeft != *mx) mBB |= Rect2D(x-1, 0, x+1, 1); } for (int y = 1; my.y < mend.y; ++y, ++my.y, ++myPrev.y) { mxLeft = my; mx = my + Diff2D(1,0); MaskIteratorType mxUpLeft = myPrev; MaskIteratorType mxUp = myPrev + Diff2D(1,0); if (*mxUpLeft != *mxLeft) { mBB |= Rect2D(0, y-1, 1, y+1); } for (int x = 1; mx.x < mend.x; ++x, ++mx.x, ++mxLeft.x, ++mxUp.x) { if (*mxLeft != *mx) mBB |= Rect2D(x-1, y, x+1, y+1); if (*mxUp != *mx) mBB |= Rect2D(x, y-1, x+1, y+1); } } if (mBB.isEmpty()) { if (*(mask->upperLeft()) == NumericTraits::zero()) { throw std::runtime_error("Mask is entirely black, but white image was not identified as redundant."); } else { mBB = uBB; cerr << "enblend: the previous images are completely overlapped by the current images" << endl; } } else { mBB.moveBy(uBB.upperLeft()); } if (Verbose > 1) { cout << "Mask transition line bounding box: " << mBB << endl; } } template MaskType *createMask(const ImageType* const white, const ImageType* const black, const AlphaType* const whiteAlpha, const AlphaType* const blackAlpha, const Rect2D& uBB, const Rect2D& iBB, const bool wraparound) { typedef typename ImageType::PixelType ImagePixelType; typedef typename MaskType::PixelType MaskPixelType; typedef typename MaskType::traverser MaskIteratorType; typedef typename MaskType::Accessor MaskAccessor; if (LoadMaskFileName != __null) { MaskType *mask = new MaskType(uBB.size()); ImageImportInfo maskInfo(LoadMaskFileName); if (maskInfo.width() != uBB.width() || maskInfo.height() != uBB.height()) { cerr << "enblend: load-mask warning: mask " << LoadMaskFileName << " has size " << "(" << maskInfo.width() << "x" << maskInfo.height() << ")" << " but image union has size " << uBB.size() << "." << " Make sure this is the right mask for the given images." << endl; } importImage(maskInfo, destImage(*mask)); delete[] LoadMaskFileName; LoadMaskFileName = __null; return mask; } Size2D nftInputSize; Rect2D nftInputBB; int nftStride; if (CoarseMask) { nftInputSize = Size2D(((uBB.width() + 7) >> 3), ((uBB.height() + 7) >> 3)); nftInputBB = Rect2D(Size2D(uBB.width() >> 3, uBB.height() >> 3)); nftStride = 8; } else { nftInputSize = uBB.size(); nftInputBB = Rect2D(nftInputSize); nftStride = 1; } MaskType *nftInputImage = new MaskType(nftInputSize); combineTwoImages(stride(nftStride, nftStride, uBB.apply(srcImageRange(*whiteAlpha))), stride(nftStride, nftStride, uBB.apply(srcImage(*blackAlpha))), nftInputBB.apply(destImage(*nftInputImage)), ifThenElse(Arg1() ^ Arg2(), ifThenElse(Arg1(), Param(NumericTraits::max()), Param(NumericTraits::zero())), Param(NumericTraits::one()))); Size2D nftOutputSize; Diff2D nftOutputOffset; if (!CoarseMask && !OptimizeMask) { nftOutputSize = nftInputSize; nftOutputOffset = Diff2D(0,0); } else { nftOutputSize = nftInputSize + Diff2D(2,2); nftOutputOffset = Diff2D(1,1); } MaskType *nftOutputImage = new MaskType(nftOutputSize); nearestFeatureTransform(wraparound, srcImageRange(*nftInputImage), destIter(nftOutputImage->upperLeft() + nftOutputOffset), NumericTraits::one()); delete nftInputImage; if (!CoarseMask && !OptimizeMask) { return nftOutputImage; } Contour rawSegments; Point2D borderUL(1, 1); Point2D borderLR(nftOutputImage->width() - 1, nftOutputImage->height() - 1); MaskIteratorType my = nftOutputImage->upperLeft() + Diff2D(1, 1); MaskIteratorType mend = nftOutputImage->lowerRight() + Diff2D(-1, -1); for (int y = 1; my.y < mend.y; ++y, ++my.y) { MaskIteratorType mx = my; MaskPixelType lastColor = NumericTraits::zero(); for (int x = 1; mx.x < mend.x; ++x, ++mx.x) { if ((*mx == NumericTraits::max()) && (lastColor == NumericTraits::zero())) { vector excessPoints; Segment *snake = new Segment(); rawSegments.push_back(snake); CrackContourCirculator crack(mx); CrackContourCirculator crackEnd(crack); bool lastPointFrozen = false; int distanceLastPoint = 0; do { Point2D currentPoint = *crack + Diff2D(x, y); crack++; Point2D nextPoint = *crack + Diff2D(x, y); if ((currentPoint.x == borderUL.x) || (currentPoint.x == borderLR.x) || (currentPoint.y == borderUL.y) || (currentPoint.y == borderLR.y)) { if ((currentPoint.x == borderUL.x && currentPoint.y == borderUL.y) || (currentPoint.x == borderUL.x && currentPoint.y == borderLR.y) || (currentPoint.x == borderLR.x && currentPoint.y == borderUL.y) || (currentPoint.x == borderLR.x && currentPoint.y == borderLR.y)) { snake->push_front(make_pair(false, currentPoint)); distanceLastPoint = 0; } else if (!lastPointFrozen || ((nextPoint.x != borderUL.x) && (nextPoint.x != borderLR.x) && (nextPoint.y != borderUL.y) && (nextPoint.y != borderLR.y))) { snake->push_front(make_pair(false, currentPoint)); distanceLastPoint = 0; } else { excessPoints.push_back(currentPoint); } lastPointFrozen = true; } else { if ((distanceLastPoint % MaskVectorizeDistance) == 0) { snake->push_front(make_pair(true, currentPoint)); distanceLastPoint = 0; } else { excessPoints.push_back(currentPoint); } lastPointFrozen = false; } distanceLastPoint++; } while (crack != crackEnd); for (Segment::iterator vertexIterator = snake->begin(); vertexIterator != snake->end(); ++vertexIterator) { (*nftOutputImage)[vertexIterator->second] = NumericTraits::one(); vertexIterator->second = nftStride * (vertexIterator->second + Diff2D(-1, -1)); if (vertexIterator->first && ((*whiteAlpha)[vertexIterator->second + uBB.upperLeft()] == NumericTraits::zero()) && ((*blackAlpha)[vertexIterator->second + uBB.upperLeft()] == NumericTraits::zero())) { vertexIterator->first = false; } } for (vector::iterator vertexIterator = excessPoints.begin(); vertexIterator != excessPoints.end(); ++vertexIterator) { (*nftOutputImage)[*vertexIterator] = NumericTraits::one(); } } lastColor = *mx; } } delete nftOutputImage; if (!OptimizeMask) { MaskType *mask = new MaskType(uBB.size()); fillContour(mask, rawSegments, Diff2D(0,0)); std::for_each(rawSegments.begin(), rawSegments.end(), bind(delete_ptr(), _1)); return mask; } ContourVector contours; for (Contour::iterator segments = rawSegments.begin(); segments != rawSegments.end(); ++segments) { Segment *snake = *segments; Contour *currentContour = new Contour(); contours.push_back(currentContour); bool closedContour = true; Segment::iterator vertexIterator = snake->begin(); for (Segment::iterator vertexIterator = snake->begin(); vertexIterator != snake->end(); ++vertexIterator) { if (!vertexIterator->first) { closedContour = false; break; } } if (closedContour) { currentContour->push_back(snake); continue; } if (snake->front().first) { Segment::iterator firstNonmoveableVertex = snake->begin(); while (firstNonmoveableVertex->first) ++firstNonmoveableVertex; Segment::iterator firstNonmoveablePlusOne = firstNonmoveableVertex; ++firstNonmoveablePlusOne; snake->insert(snake->end(), snake->begin(), firstNonmoveablePlusOne); snake->erase(snake->begin(), firstNonmoveableVertex); } Segment::iterator lastMoveableVertex = snake->begin(); for (Segment::iterator vertexIterator = snake->begin(); vertexIterator != snake->end(); ++vertexIterator) { if (vertexIterator->first) lastMoveableVertex = vertexIterator; } Segment *currentSegment = __null; bool insideMoveableSegment = false; bool passedLastMoveableVertex = false; Segment::iterator lastNonmoveableVertex = snake->begin(); for (Segment::iterator vertexIterator = snake->begin(); vertexIterator != snake->end(); ++vertexIterator) { if (currentSegment == __null) { currentSegment = new Segment(); currentContour->push_back(currentSegment); } if (vertexIterator == lastMoveableVertex) passedLastMoveableVertex = true; if (!vertexIterator->first) lastNonmoveableVertex = vertexIterator; if (vertexIterator->first && currentSegment->empty()) { currentSegment->push_front(*lastNonmoveableVertex); } currentSegment->push_front(*vertexIterator); if (!insideMoveableSegment && vertexIterator->first) { insideMoveableSegment = true; } else if (insideMoveableSegment && !vertexIterator->first && !passedLastMoveableVertex) { insideMoveableSegment = false; currentSegment->reverse(); currentSegment = __null; } } if (currentSegment != __null) currentSegment->reverse(); delete snake; } rawSegments.clear(); int totalSegments = 0; for (ContourVector::iterator currentContour = contours.begin(); currentContour != contours.end(); ++currentContour) { totalSegments += (*currentContour)->size(); } if (Verbose > 0) { if (totalSegments == 1) { cout << "Optimizing 1 distinct seam." << endl; } else { cout << "Optimizing " << totalSegments << " distinct seams." << endl; } } Rect2D vBB; bool initializedVBB = false; for (ContourVector::iterator currentContour = contours.begin(); currentContour != contours.end(); ++currentContour) { for (Contour::iterator currentSegment = (*currentContour)->begin(); currentSegment != (*currentContour)->end(); ++currentSegment) { Segment::iterator lastVertex = (*currentSegment)->begin(); bool foundFirstMoveableVertex = false; for (Segment::iterator vertexIterator = (*currentSegment)->begin(); vertexIterator != (*currentSegment)->end(); ++vertexIterator) { if (vertexIterator->first) { if (!initializedVBB) { vBB = Rect2D(vertexIterator->second, Size2D(1,1)); initializedVBB = true; } else { vBB |= vertexIterator->second; } if (!foundFirstMoveableVertex) vBB |= lastVertex->second; foundFirstMoveableVertex = true; } else if (foundFirstMoveableVertex) { vBB |= vertexIterator->second; break; } lastVertex = vertexIterator; } } } vBB.moveBy(uBB.upperLeft()); Rect2D iBBPlus = iBB; iBBPlus.addBorder(1); vBB |= iBBPlus; Rect2D uvBB = vBB & uBB; Diff2D uvBBOffset = uvBB.upperLeft() - vBB.upperLeft(); Size2D mismatchImageSize; int mismatchImageStride; Diff2D uvBBStrideOffset; if (CoarseMask) { if (uvBBOffset.x % 2) vBB.setUpperLeft(vBB.upperLeft() + Diff2D(-1, 0)); if (uvBBOffset.y % 2) vBB.setUpperLeft(vBB.upperLeft() + Diff2D(0, -1)); uvBBStrideOffset = (uvBB.upperLeft() - vBB.upperLeft()) / 2; mismatchImageStride = 2; mismatchImageSize = (vBB.size() + Diff2D(1, 1)) / 2; } else { uvBBStrideOffset = uvBBOffset; mismatchImageStride = 1; mismatchImageSize = vBB.size(); } typedef UInt8 MismatchImagePixelType; EnblendNumericTraits::ImageType mismatchImage(mismatchImageSize, NumericTraits::max()); EnblendNumericTraits >::ImageType *visualizeImage = __null; if (VisualizeMaskFileName) { visualizeImage = new EnblendNumericTraits >::ImageType(mismatchImageSize); } combineTwoImages(stride(mismatchImageStride, mismatchImageStride, uvBB.apply(srcImageRange(*white))), stride(mismatchImageStride, mismatchImageStride, uvBB.apply(srcImage(*black))), destIter(mismatchImage.upperLeft() + uvBBStrideOffset), PixelDifferenceFunctor()); if (visualizeImage) { copyImage(srcImageRange(mismatchImage), destImage(*visualizeImage)); } combineThreeImages(stride(mismatchImageStride, mismatchImageStride, uvBB.apply(srcImageRange(*whiteAlpha))), stride(mismatchImageStride, mismatchImageStride, uvBB.apply(srcImage(*blackAlpha))), srcIter(mismatchImage.upperLeft() + uvBBStrideOffset), destIter(mismatchImage.upperLeft() + uvBBStrideOffset), ifThenElse(Arg1() & Arg2(), Arg3(), Param(NumericTraits::max()))); int segmentNumber = 0; for (ContourVector::iterator currentContour = contours.begin(); currentContour != contours.end(); ++currentContour) { for (Contour::iterator currentSegment = (*currentContour)->begin(); currentSegment != (*currentContour)->end(); ++currentSegment) { Segment *snake = *currentSegment; if (Verbose > 0) { cout << "Strategy 1, s" << segmentNumber++ << ":"; cout.flush(); } for (Segment::iterator vertexIterator = snake->begin(); vertexIterator != snake->end(); ++vertexIterator) { vertexIterator->second = (vertexIterator->second + uBB.upperLeft() - vBB.upperLeft()) / mismatchImageStride; } annealSnake(&mismatchImage, snake, visualizeImage); Segment::iterator lastVertex = snake->previous(snake->end()); for (Segment::iterator vertexIterator = snake->begin(); vertexIterator != snake->end(); ) { if (vertexIterator->first && (mismatchImage[vertexIterator->second] == NumericTraits::max())) { if (vertexIterator == snake->begin()) { snake->pop_front(); vertexIterator = snake->begin(); } else { vertexIterator = snake->erase_after(lastVertex); } bool needsBreak = false; if (vertexIterator == snake->end()) { vertexIterator = snake->begin(); needsBreak = true; } if (snake->empty()) break; if (!(lastVertex->first || vertexIterator->first)) { if (vertexIterator == snake->begin()) { snake->push_front(make_pair(true, vertexIterator->second)); lastVertex = snake->begin(); } else { lastVertex = snake->insert_after(lastVertex, make_pair(true, vertexIterator->second)); } } if (needsBreak) break; } else { lastVertex = vertexIterator; ++vertexIterator; } } if (Verbose > 0) { cout << endl; } if (snake->empty()) { cerr << endl << "enblend: Seam s" << (segmentNumber-1) << " is a tiny closed contour and was removed." << endl; } } } if (Verbose > 0) { cout << "Strategy 2:"; cout.flush(); } combineThreeImages(stride(mismatchImageStride, mismatchImageStride, uvBB.apply(srcImageRange(*whiteAlpha))), stride(mismatchImageStride, mismatchImageStride, uvBB.apply(srcImage(*blackAlpha))), srcIter(mismatchImage.upperLeft() + uvBBStrideOffset), destIter(mismatchImage.upperLeft() + uvBBStrideOffset), ifThenElse(!(Arg1() || Arg2()), Param(NumericTraits::one()), Arg3())); if (visualizeImage) { combineThreeImages(stride(mismatchImageStride, mismatchImageStride, uvBB.apply(srcImageRange(*whiteAlpha))), stride(mismatchImageStride, mismatchImageStride, uvBB.apply(srcImage(*blackAlpha))), srcIter(visualizeImage->upperLeft() + uvBBStrideOffset), destIter(visualizeImage->upperLeft() + uvBBStrideOffset), ifThenElse(Arg1() ^ Arg2(), Param(RGBValue(128,0,0)), Arg3())); } Rect2D withinMismatchImage(mismatchImageSize); segmentNumber = 0; for (ContourVector::iterator currentContour = contours.begin(); currentContour != contours.end(); ++currentContour) { for (Contour::iterator currentSegment = (*currentContour)->begin(); currentSegment != (*currentContour)->end(); ++currentSegment) { Segment *snake = *currentSegment; if (Verbose > 0) { cout << " s" << segmentNumber++; cout.flush(); } for (Segment::iterator currentVertex = snake->begin(); ; ) { Segment::iterator nextVertex = currentVertex; ++nextVertex; if (nextVertex == snake->end()) nextVertex = snake->begin(); if (currentVertex->first || nextVertex->first) { Point2D currentPoint = currentVertex->second; Point2D nextPoint = nextVertex->second; Rect2D pointSurround(currentPoint, Size2D(1,1)); pointSurround |= Rect2D(nextPoint, Size2D(1,1)); pointSurround.addBorder(DijkstraRadius); pointSurround &= withinMismatchImage; BasicImage mismatchROIImage(pointSurround.size()); copyImage(pointSurround.apply(srcImageRange(mismatchImage)), destImage(mismatchROIImage)); vector *shortPath = minCostPath(srcImageRange(mismatchROIImage), Point2D(nextPoint - pointSurround.upperLeft()), Point2D(currentPoint - pointSurround.upperLeft())); for (vector::iterator shortPathPoint = shortPath->begin(); shortPathPoint != shortPath->end(); ++shortPathPoint) { snake->insert_after(currentVertex, make_pair(false, *shortPathPoint + pointSurround.upperLeft())); if (visualizeImage) { (*visualizeImage)[*shortPathPoint + pointSurround.upperLeft()] = RGBValue(255, 255, 0); } } delete shortPath; if (visualizeImage) { (*visualizeImage)[currentPoint] = RGBValue(0, currentVertex->first ? 200 : 230, 0); (*visualizeImage)[nextPoint] = RGBValue(0, nextVertex->first ? 200 : 230, 0); } } currentVertex = nextVertex; if (nextVertex == snake->begin()) break; } for (Segment::iterator currentVertex = snake->begin(); currentVertex != snake->end(); ++currentVertex) { currentVertex->second = (currentVertex->second * mismatchImageStride) + vBB.upperLeft() - uBB.upperLeft(); } } } if (Verbose > 0) { cout << endl; } if (visualizeImage) { ImageExportInfo visualizeInfo(VisualizeMaskFileName); exportImage(srcImageRange(*visualizeImage), visualizeInfo); delete visualizeImage; } MaskType *mask = new MaskType(uBB.size()); std::for_each(contours.begin(), contours.end(), bind(fillContour, mask, *_1, Diff2D(0,0))); std::for_each(contours.begin(), contours.end(), bind(boost::lambda::ll::for_each(), bind(call_begin(), (*_1)), bind(call_end(), (*_1)), protect(bind(delete_ptr(), _1)))); std::for_each(contours.begin(), contours.end(), bind(delete_ptr(), _1)); return mask; } } # 40 "enblend.h" 2 using std::cout; using std::endl; using std::list; using std::pair; using vigra::BasicImage; using vigra::CachedFileImage; using vigra::CachedFileImageDirector; using vigra::FindMinMax; using vigra::ImageExportInfo; using vigra::ImageImportInfo; using vigra::initImage; using vigra::initImageIf; using vigra::inspectImage; using vigra::NumericTraits; using vigra::VigraFalseType; using vigra::VigraTrueType; namespace enblend { template void enblendMain(list &imageInfoList, ImageExportInfo &outputImageInfo, Rect2D &inputUnion) { typedef typename EnblendNumericTraits::ImagePixelComponentType ImagePixelComponentType; typedef typename EnblendNumericTraits::ImageType ImageType; typedef typename EnblendNumericTraits::AlphaPixelType AlphaPixelType; typedef typename EnblendNumericTraits::AlphaType AlphaType; typedef typename EnblendNumericTraits::MaskPixelType MaskPixelType; typedef typename EnblendNumericTraits::MaskType MaskType; typedef typename EnblendNumericTraits::ImagePyramidPixelType ImagePyramidPixelType; typedef typename EnblendNumericTraits::ImagePyramidType ImagePyramidType; typedef typename EnblendNumericTraits::MaskPyramidPixelType MaskPyramidPixelType; typedef typename EnblendNumericTraits::MaskPyramidType MaskPyramidType; enum {ImagePyramidIntegerBits = EnblendNumericTraits::ImagePyramidIntegerBits}; enum {ImagePyramidFractionBits = EnblendNumericTraits::ImagePyramidFractionBits}; enum {MaskPyramidIntegerBits = EnblendNumericTraits::MaskPyramidIntegerBits}; enum {MaskPyramidFractionBits = EnblendNumericTraits::MaskPyramidFractionBits}; typedef typename EnblendNumericTraits::SKIPSMImagePixelType SKIPSMImagePixelType; typedef typename EnblendNumericTraits::SKIPSMAlphaPixelType SKIPSMAlphaPixelType; typedef typename EnblendNumericTraits::SKIPSMMaskPixelType SKIPSMMaskPixelType; Rect2D blackBB; pair blackPair = assemble(imageInfoList, inputUnion, blackBB); if (Checkpoint) checkpoint(blackPair, outputImageInfo); if (Verbose > 2) { CachedFileImageDirector &v = CachedFileImageDirector::v(); cout << "Image cache statistics after loading black image:" << endl; v.printStats("blackImage", blackPair.first); v.printStats("blackAlpha", blackPair.second); v.printStats(); v.resetCacheMisses(); cout << "--------------------------------------------------------------------------------" << endl; } while (!imageInfoList.empty()) { Rect2D whiteBB; pair whitePair = assemble(imageInfoList, inputUnion, whiteBB); if (Verbose > 2) { CachedFileImageDirector &v = CachedFileImageDirector::v(); cout << "Image cache statistics after loading white image:" << endl; v.printStats("blackImage", blackPair.first); v.printStats("blackAlpha", blackPair.second); v.printStats("whiteImage", whitePair.first); v.printStats("whiteAlpha", whitePair.second); v.printStats(); v.resetCacheMisses(); cout << "--------------------------------------------------------------------------------" << endl; } Rect2D uBB = blackBB | whiteBB; if (Verbose > 1) { cout << "image union bounding box: " << uBB << endl; } Rect2D iBB = blackBB & whiteBB; bool iBBValid = !iBB.isEmpty(); if (Verbose > 1) { if (iBBValid) { cout << "image intersection bounding box: " << iBB << endl; } else { cout << "image intersection bounding box: (no intersection)" << endl; } } Overlap overlap = inspectOverlap(uBB.apply(srcImageRange(*(blackPair.second))), uBB.apply(srcImage(*(whitePair.second)))); if (overlap == CompleteOverlap) { delete whitePair.first; delete whitePair.second; cerr << "enblend: some images are redundant and will not be blended." << endl; continue; } else if (overlap == NoOverlap && ExactLevels == 0) { cerr << "enblend: images do not overlap - they will be combined without blending." << endl; cerr << "enblend: use the -l flag to force blending with a certain number of levels." << endl; copyImageIf(srcImageRange(*(whitePair.first)), maskImage(*(whitePair.second)), destImage(*(blackPair.first))); copyImageIf(srcImageRange(*(whitePair.second)), maskImage(*(whitePair.second)), destImage(*(blackPair.second))); delete whitePair.first; delete whitePair.second; if (Checkpoint) { if (Verbose > 0) { if (imageInfoList.empty()) { cout << "Writing final output..." << endl; } else { cout << "Checkpointing..." << endl; } } checkpoint(blackPair, outputImageInfo); } blackBB = uBB; continue; } if (Verbose > 1) { long long bytes = 0; bytes += 2 * uBB.area() * sizeof(ImagePixelType); bytes += 2 * uBB.area() * sizeof(AlphaPixelType); long long nftBytes = 0; if (LoadMaskFileName) { nftBytes = 0; } else if (CoarseMask) { nftBytes = 2 * 1/8 * uBB.area() * sizeof(MaskPixelType) + 2 * 1/8 * uBB.area() * sizeof(UInt32); } else { nftBytes = 2 * uBB.area() * sizeof(MaskPixelType) + 2 * uBB.area() * sizeof(UInt32); } long long optBytes = 0; if (LoadMaskFileName) { optBytes = 0; } else if (!OptimizeMask) { optBytes = 0; } else if (CoarseMask) { optBytes = 1/2 * iBB.area() * sizeof(UInt8); } else { optBytes = iBB.area() * sizeof(UInt8); } if (VisualizeMaskFileName) optBytes *= 2; long long bytesDuringMask = bytes + std::max(nftBytes, optBytes); long long bytesAfterMask = bytes + uBB.area() * sizeof(MaskPixelType); bytes = std::max(bytesDuringMask, bytesAfterMask); int mbytes = (int)ceil(bytes / 1000000.0); cout << "Estimated space required for mask generation: " << mbytes << "MB" << endl; } bool wraparoundForMask = Wraparound && (uBB.width() == inputUnion.width()); MaskType *mask = createMask( whitePair.first, blackPair.first, whitePair.second, blackPair.second, uBB, iBB, wraparoundForMask); Rect2D mBB; maskBounds(mask, uBB, mBB); if (SaveMaskFileName != __null) { ImageExportInfo maskInfo(SaveMaskFileName); maskInfo.setPosition(uBB.upperLeft()); exportImage(srcImageRange(*mask), maskInfo); } if (Verbose > 2) { CachedFileImageDirector &v = CachedFileImageDirector::v(); cout << "Image cache statistics after mask generation:" << endl; v.printStats("blackImage", blackPair.first); v.printStats("blackAlpha", blackPair.second); v.printStats("whiteImage", whitePair.first); v.printStats("whiteAlpha", whitePair.second); v.printStats("mask", mask); v.printStats(); v.resetCacheMisses(); cout << "--------------------------------------------------------------------------------" << endl; } Rect2D roiBB; unsigned int numLevels = roiBounds(inputUnion, iBB, mBB, uBB, roiBB, wraparoundForMask); bool wraparoundForBlend = Wraparound && (roiBB.width() == inputUnion.width()); if (Verbose > 1) { long long bytes = inputUnion.area() * (sizeof(ImagePixelType) + 2*sizeof(AlphaPixelType)) + (4/3) * roiBB.area() * (sizeof(MaskPyramidPixelType) + 2*sizeof(ImagePyramidPixelType)) + (4 * roiBB.width()) * (sizeof(SKIPSMImagePixelType) + sizeof(SKIPSMAlphaPixelType)); int mbytes = (int)ceil(bytes / 1000000.0); cout << "Estimated space required for this blend step: " << mbytes << "MB" << endl; } Rect2D roiBB_uBB = roiBB; roiBB_uBB.moveBy(-uBB.upperLeft()); vector *maskGP = gaussianPyramid( numLevels, wraparoundForBlend, roiBB_uBB.apply(srcImageRange(*mask))); if (Verbose > 2) { CachedFileImageDirector &v = CachedFileImageDirector::v(); cout << "Image cache statistics after calculating mask pyramid:" << endl; v.printStats("blackImage", blackPair.first); v.printStats("blackAlpha", blackPair.second); v.printStats("whiteImage", whitePair.first); v.printStats("whiteAlpha", whitePair.second); v.printStats("mask", mask); for (unsigned int i = 0; i < maskGP->size(); i++) { v.printStats("maskGP", i, (*maskGP)[i]); } v.printStats(); v.resetCacheMisses(); cout << "--------------------------------------------------------------------------------" << endl; } initImage(roiBB_uBB.apply(destImageRange(*mask)), NumericTraits::zero()); copyImageIf(uBB.apply(srcImageRange(*(whitePair.first))), maskImage(*mask), uBB.apply(destImage(*(blackPair.first)))); delete mask; vector *whiteLP = laplacianPyramid( "whiteGP", numLevels, wraparoundForBlend, roiBB.apply(srcImageRange(*(whitePair.first))), roiBB.apply(maskImage(*(whitePair.second)))); if (Verbose > 2) { CachedFileImageDirector &v = CachedFileImageDirector::v(); cout << "Image cache statistics after calculating white pyramid:" << endl; v.printStats("blackImage", blackPair.first); v.printStats("blackAlpha", blackPair.second); v.printStats("whiteImage", whitePair.first); v.printStats("whiteAlpha", whitePair.second); for (unsigned int i = 0; i < maskGP->size(); i++) { v.printStats("maskGP", i, (*maskGP)[i]); } for (unsigned int i = 0; i < whiteLP->size(); i++) { v.printStats("whiteLP", i, (*whiteLP)[i]); } v.printStats(); v.resetCacheMisses(); cout << "--------------------------------------------------------------------------------" << endl; } delete whitePair.first; vector *blackLP = laplacianPyramid( "blackGP", numLevels, wraparoundForBlend, roiBB.apply(srcImageRange(*(blackPair.first))), roiBB.apply(maskImage(*(blackPair.second)))); if (Verbose > 2) { CachedFileImageDirector &v = CachedFileImageDirector::v(); cout << "Image cache statistics after calculating black pyramid:" << endl; v.printStats("blackImage", blackPair.first); v.printStats("blackAlpha", blackPair.second); v.printStats("whiteAlpha", whitePair.second); for (unsigned int i = 0; i < maskGP->size(); i++) { v.printStats("maskGP", i, (*maskGP)[i]); } for (unsigned int i = 0; i < whiteLP->size(); i++) { v.printStats("whiteLP", i, (*whiteLP)[i]); } for (unsigned int i = 0; i < blackLP->size(); i++) { v.printStats("blackLP", i, (*blackLP)[i]); } v.printStats(); v.resetCacheMisses(); cout << "--------------------------------------------------------------------------------" << endl; } # 453 "enblend.h" initImageIf(whiteBB.apply(destImageRange(*(blackPair.second))), whiteBB.apply(maskImage(*(whitePair.second))), NumericTraits::max()); delete whitePair.second; ConvertScalarToPyramidFunctor whiteMask; blend(maskGP, whiteLP, blackLP, whiteMask(NumericTraits::max())); if (Verbose > 2) { CachedFileImageDirector &v = CachedFileImageDirector::v(); cout << "Image cache statistics after blending pyramids:" << endl; v.printStats("blackImage", blackPair.first); v.printStats("blackAlpha", blackPair.second); for (unsigned int i = 0; i < maskGP->size(); i++) { v.printStats("maskGP", i, (*maskGP)[i]); } for (unsigned int i = 0; i < whiteLP->size(); i++) { v.printStats("whiteLP", i, (*whiteLP)[i]); } for (unsigned int i = 0; i < blackLP->size(); i++) { v.printStats("blackLP", i, (*blackLP)[i]); } v.printStats(); v.resetCacheMisses(); cout << "--------------------------------------------------------------------------------" << endl; } for (unsigned int i = 0; i < maskGP->size(); i++) { delete (*maskGP)[i]; } delete maskGP; for (unsigned int i = 0; i < whiteLP->size(); i++) { delete (*whiteLP)[i]; } delete whiteLP; collapsePyramid(wraparoundForBlend, blackLP); if (Verbose > 2) { CachedFileImageDirector &v = CachedFileImageDirector::v(); cout << "Image cache statistics after collapsing black pyramid:" << endl; v.printStats("blackImage", blackPair.first); v.printStats("blackAlpha", blackPair.second); for (unsigned int i = 0; i < blackLP->size(); i++) { v.printStats("blackLP", i, (*blackLP)[i]); } v.printStats(); v.resetCacheMisses(); cout << "--------------------------------------------------------------------------------" << endl; } copyFromPyramidImageIf( srcImageRange(*((*blackLP)[0])), roiBB.apply(maskImage(*(blackPair.second))), roiBB.apply(destImage(*(blackPair.first)))); for (unsigned int i = 0; i < blackLP->size(); i++) { delete (*blackLP)[i]; } delete blackLP; if (Checkpoint) { if (Verbose > 0) { if (imageInfoList.empty()) { cout << "Writing final output..." << endl; } else { cout << "Checkpointing..." << endl; } } checkpoint(blackPair, outputImageInfo); } if (Verbose > 2) { CachedFileImageDirector &v = CachedFileImageDirector::v(); cout << "Image cache statistics after checkpointing:" << endl; v.printStats("blackImage", blackPair.first); v.printStats("blackAlpha", blackPair.second); v.printStats(); v.resetCacheMisses(); cout << "--------------------------------------------------------------------------------" << endl; } blackBB = uBB; } if (!Checkpoint) { if (Verbose > 0) { cout << "Writing final output..." << endl; } checkpoint(blackPair, outputImageInfo); } delete blackPair.first; delete blackPair.second; }; } # 122 "enblend.cc" 2 # 1 "/usr/include/tiffio.h" 1 3 4 # 33 "/usr/include/tiffio.h" 3 4 # 1 "/usr/include/tiff.h" 1 3 4 # 30 "/usr/include/tiff.h" 3 4 # 1 "/usr/include/tiffconf.h" 1 3 4 # 31 "/usr/include/tiff.h" 2 3 4 # 65 "/usr/include/tiff.h" 3 4 typedef signed char int8; typedef unsigned char uint8; typedef short int16; typedef unsigned short uint16; typedef int int32; typedef unsigned int uint32; # 85 "/usr/include/tiff.h" 3 4 enum TIFFIgnoreSense { TIS_STORE, TIS_EXTRACT, TIS_EMPTY }; typedef struct { uint16 tiff_magic; uint16 tiff_version; uint32 tiff_diroff; } TIFFHeader; # 116 "/usr/include/tiff.h" 3 4 typedef struct { uint16 tdir_tag; uint16 tdir_type; uint32 tdir_count; uint32 tdir_offset; } TIFFDirEntry; # 137 "/usr/include/tiff.h" 3 4 typedef enum { TIFF_NOTYPE = 0, TIFF_BYTE = 1, TIFF_ASCII = 2, TIFF_SHORT = 3, TIFF_LONG = 4, TIFF_RATIONAL = 5, TIFF_SBYTE = 6, TIFF_UNDEFINED = 7, TIFF_SSHORT = 8, TIFF_SLONG = 9, TIFF_SRATIONAL = 10, TIFF_FLOAT = 11, TIFF_DOUBLE = 12, TIFF_IFD = 13 } TIFFDataType; # 34 "/usr/include/tiffio.h" 2 3 4 # 1 "/usr/include/tiffvers.h" 1 3 4 # 35 "/usr/include/tiffio.h" 2 3 4 typedef struct tiff TIFF; # 61 "/usr/include/tiffio.h" 3 4 typedef uint32 ttag_t; typedef uint16 tdir_t; typedef uint16 tsample_t; typedef uint32 tstrip_t; typedef uint32 ttile_t; typedef int32 tsize_t; typedef void* tdata_t; typedef uint32 toff_t; # 96 "/usr/include/tiffio.h" 3 4 typedef void* thandle_t; # 132 "/usr/include/tiffio.h" 3 4 typedef unsigned char TIFFRGBValue; typedef struct { float d_mat[3][3]; float d_YCR; float d_YCG; float d_YCB; uint32 d_Vrwr; uint32 d_Vrwg; uint32 d_Vrwb; float d_Y0R; float d_Y0G; float d_Y0B; float d_gammaR; float d_gammaG; float d_gammaB; } TIFFDisplay; typedef struct { TIFFRGBValue* clamptab; int* Cr_r_tab; int* Cb_b_tab; int32* Cr_g_tab; int32* Cb_g_tab; int32* Y_tab; } TIFFYCbCrToRGB; typedef struct { int range; float rstep, gstep, bstep; float X0, Y0, Z0; TIFFDisplay display; float Yr2r[1500 + 1]; float Yg2g[1500 + 1]; float Yb2b[1500 + 1]; } TIFFCIELabToRGB; typedef struct _TIFFRGBAImage TIFFRGBAImage; # 184 "/usr/include/tiffio.h" 3 4 typedef void (*tileContigRoutine) (TIFFRGBAImage*, uint32*, uint32, uint32, uint32, uint32, int32, int32, unsigned char*); typedef void (*tileSeparateRoutine) (TIFFRGBAImage*, uint32*, uint32, uint32, uint32, uint32, int32, int32, unsigned char*, unsigned char*, unsigned char*, unsigned char*); struct _TIFFRGBAImage { TIFF* tif; int stoponerr; int isContig; int alpha; uint32 width; uint32 height; uint16 bitspersample; uint16 samplesperpixel; uint16 orientation; uint16 req_orientation; uint16 photometric; uint16* redcmap; uint16* greencmap; uint16* bluecmap; int (*get)(TIFFRGBAImage*, uint32*, uint32, uint32); union { void (*any)(TIFFRGBAImage*); tileContigRoutine contig; tileSeparateRoutine separate; } put; TIFFRGBValue* Map; uint32** BWmap; uint32** PALmap; TIFFYCbCrToRGB* ycbcr; TIFFCIELabToRGB* cielab; int row_offset; int col_offset; }; # 241 "/usr/include/tiffio.h" 3 4 typedef int (*TIFFInitMethod)(TIFF*, int); typedef struct { char* name; uint16 scheme; TIFFInitMethod init; } TIFFCodec; # 257 "/usr/include/tiffio.h" 3 4 extern "C" { typedef void (*TIFFErrorHandler)(const char*, const char*, va_list); typedef void (*TIFFErrorHandlerExt)(thandle_t, const char*, const char*, va_list); typedef tsize_t (*TIFFReadWriteProc)(thandle_t, tdata_t, tsize_t); typedef toff_t (*TIFFSeekProc)(thandle_t, toff_t, int); typedef int (*TIFFCloseProc)(thandle_t); typedef toff_t (*TIFFSizeProc)(thandle_t); typedef int (*TIFFMapFileProc)(thandle_t, tdata_t*, toff_t*); typedef void (*TIFFUnmapFileProc)(thandle_t, tdata_t, toff_t); typedef void (*TIFFExtendProc)(TIFF*); extern const char* TIFFGetVersion(void); extern const TIFFCodec* TIFFFindCODEC(uint16); extern TIFFCodec* TIFFRegisterCODEC(uint16, const char*, TIFFInitMethod); extern void TIFFUnRegisterCODEC(TIFFCodec*); extern int TIFFIsCODECConfigured(uint16); extern TIFFCodec* TIFFGetConfiguredCODECs(void); extern tdata_t _TIFFmalloc(tsize_t); extern tdata_t _TIFFrealloc(tdata_t, tsize_t); extern void _TIFFmemset(tdata_t, int, tsize_t); extern void _TIFFmemcpy(tdata_t, const tdata_t, tsize_t); extern int _TIFFmemcmp(const tdata_t, const tdata_t, tsize_t); extern void _TIFFfree(tdata_t); extern int TIFFGetTagListCount( TIFF * ); extern ttag_t TIFFGetTagListEntry( TIFF *, int tag_index ); # 301 "/usr/include/tiffio.h" 3 4 typedef struct { ttag_t field_tag; short field_readcount; short field_writecount; TIFFDataType field_type; unsigned short field_bit; unsigned char field_oktochange; unsigned char field_passcount; char *field_name; } TIFFFieldInfo; typedef struct _TIFFTagValue { const TIFFFieldInfo *info; int count; void *value; } TIFFTagValue; extern void TIFFMergeFieldInfo(TIFF*, const TIFFFieldInfo[], int); extern const TIFFFieldInfo* TIFFFindFieldInfo(TIFF*, ttag_t, TIFFDataType); extern const TIFFFieldInfo* TIFFFindFieldInfoByName(TIFF* , const char *, TIFFDataType); extern const TIFFFieldInfo* TIFFFieldWithTag(TIFF*, ttag_t); extern const TIFFFieldInfo* TIFFFieldWithName(TIFF*, const char *); typedef int (*TIFFVSetMethod)(TIFF*, ttag_t, va_list); typedef int (*TIFFVGetMethod)(TIFF*, ttag_t, va_list); typedef void (*TIFFPrintMethod)(TIFF*, FILE*, long); typedef struct { TIFFVSetMethod vsetfield; TIFFVGetMethod vgetfield; TIFFPrintMethod printdir; } TIFFTagMethods; extern TIFFTagMethods *TIFFAccessTagMethods( TIFF * ); extern void *TIFFGetClientInfo( TIFF *, const char * ); extern void TIFFSetClientInfo( TIFF *, void *, const char * ); extern void TIFFCleanup(TIFF*); extern void TIFFClose(TIFF*); extern int TIFFFlush(TIFF*); extern int TIFFFlushData(TIFF*); extern int TIFFGetField(TIFF*, ttag_t, ...); extern int TIFFVGetField(TIFF*, ttag_t, va_list); extern int TIFFGetFieldDefaulted(TIFF*, ttag_t, ...); extern int TIFFVGetFieldDefaulted(TIFF*, ttag_t, va_list); extern int TIFFReadDirectory(TIFF*); extern int TIFFReadCustomDirectory(TIFF*, toff_t, const TIFFFieldInfo[], size_t); extern int TIFFReadEXIFDirectory(TIFF*, toff_t); extern tsize_t TIFFScanlineSize(TIFF*); extern tsize_t TIFFRasterScanlineSize(TIFF*); extern tsize_t TIFFStripSize(TIFF*); extern tsize_t TIFFRawStripSize(TIFF*, tstrip_t); extern tsize_t TIFFVStripSize(TIFF*, uint32); extern tsize_t TIFFTileRowSize(TIFF*); extern tsize_t TIFFTileSize(TIFF*); extern tsize_t TIFFVTileSize(TIFF*, uint32); extern uint32 TIFFDefaultStripSize(TIFF*, uint32); extern void TIFFDefaultTileSize(TIFF*, uint32*, uint32*); extern int TIFFFileno(TIFF*); extern int TIFFSetFileno(TIFF*, int); extern thandle_t TIFFClientdata(TIFF*); extern thandle_t TIFFSetClientdata(TIFF*, thandle_t); extern int TIFFGetMode(TIFF*); extern int TIFFSetMode(TIFF*, int); extern int TIFFIsTiled(TIFF*); extern int TIFFIsByteSwapped(TIFF*); extern int TIFFIsUpSampled(TIFF*); extern int TIFFIsMSB2LSB(TIFF*); extern int TIFFIsBigEndian(TIFF*); extern TIFFReadWriteProc TIFFGetReadProc(TIFF*); extern TIFFReadWriteProc TIFFGetWriteProc(TIFF*); extern TIFFSeekProc TIFFGetSeekProc(TIFF*); extern TIFFCloseProc TIFFGetCloseProc(TIFF*); extern TIFFSizeProc TIFFGetSizeProc(TIFF*); extern TIFFMapFileProc TIFFGetMapFileProc(TIFF*); extern TIFFUnmapFileProc TIFFGetUnmapFileProc(TIFF*); extern uint32 TIFFCurrentRow(TIFF*); extern tdir_t TIFFCurrentDirectory(TIFF*); extern tdir_t TIFFNumberOfDirectories(TIFF*); extern uint32 TIFFCurrentDirOffset(TIFF*); extern tstrip_t TIFFCurrentStrip(TIFF*); extern ttile_t TIFFCurrentTile(TIFF*); extern int TIFFReadBufferSetup(TIFF*, tdata_t, tsize_t); extern int TIFFWriteBufferSetup(TIFF*, tdata_t, tsize_t); extern int TIFFSetupStrips(TIFF *); extern int TIFFWriteCheck(TIFF*, int, const char *); extern void TIFFFreeDirectory(TIFF*); extern int TIFFCreateDirectory(TIFF*); extern int TIFFLastDirectory(TIFF*); extern int TIFFSetDirectory(TIFF*, tdir_t); extern int TIFFSetSubDirectory(TIFF*, uint32); extern int TIFFUnlinkDirectory(TIFF*, tdir_t); extern int TIFFSetField(TIFF*, ttag_t, ...); extern int TIFFVSetField(TIFF*, ttag_t, va_list); extern int TIFFWriteDirectory(TIFF *); extern int TIFFCheckpointDirectory(TIFF *); extern int TIFFRewriteDirectory(TIFF *); extern int TIFFReassignTagToIgnore(enum TIFFIgnoreSense, int); extern void TIFFPrintDirectory(TIFF*, FILE*, long = 0); extern int TIFFReadScanline(TIFF*, tdata_t, uint32, tsample_t = 0); extern int TIFFWriteScanline(TIFF*, tdata_t, uint32, tsample_t = 0); extern int TIFFReadRGBAImage(TIFF*, uint32, uint32, uint32*, int = 0); extern int TIFFReadRGBAImageOriented(TIFF*, uint32, uint32, uint32*, int = 4, int = 0); # 417 "/usr/include/tiffio.h" 3 4 extern int TIFFReadRGBAStrip(TIFF*, tstrip_t, uint32 * ); extern int TIFFReadRGBATile(TIFF*, uint32, uint32, uint32 * ); extern int TIFFRGBAImageOK(TIFF*, char [1024]); extern int TIFFRGBAImageBegin(TIFFRGBAImage*, TIFF*, int, char [1024]); extern int TIFFRGBAImageGet(TIFFRGBAImage*, uint32*, uint32, uint32); extern void TIFFRGBAImageEnd(TIFFRGBAImage*); extern TIFF* TIFFOpen(const char*, const char*); extern TIFF* TIFFFdOpen(int, const char*, const char*); extern TIFF* TIFFClientOpen(const char*, const char*, thandle_t, TIFFReadWriteProc, TIFFReadWriteProc, TIFFSeekProc, TIFFCloseProc, TIFFSizeProc, TIFFMapFileProc, TIFFUnmapFileProc); extern const char* TIFFFileName(TIFF*); extern const char* TIFFSetFileName(TIFF*, const char *); extern void TIFFError(const char*, const char*, ...); extern void TIFFErrorExt(thandle_t, const char*, const char*, ...); extern void TIFFWarning(const char*, const char*, ...); extern void TIFFWarningExt(thandle_t, const char*, const char*, ...); extern TIFFErrorHandler TIFFSetErrorHandler(TIFFErrorHandler); extern TIFFErrorHandlerExt TIFFSetErrorHandlerExt(TIFFErrorHandlerExt); extern TIFFErrorHandler TIFFSetWarningHandler(TIFFErrorHandler); extern TIFFErrorHandlerExt TIFFSetWarningHandlerExt(TIFFErrorHandlerExt); extern TIFFExtendProc TIFFSetTagExtender(TIFFExtendProc); extern ttile_t TIFFComputeTile(TIFF*, uint32, uint32, uint32, tsample_t); extern int TIFFCheckTile(TIFF*, uint32, uint32, uint32, tsample_t); extern ttile_t TIFFNumberOfTiles(TIFF*); extern tsize_t TIFFReadTile(TIFF*, tdata_t, uint32, uint32, uint32, tsample_t); extern tsize_t TIFFWriteTile(TIFF*, tdata_t, uint32, uint32, uint32, tsample_t); extern tstrip_t TIFFComputeStrip(TIFF*, uint32, tsample_t); extern tstrip_t TIFFNumberOfStrips(TIFF*); extern tsize_t TIFFReadEncodedStrip(TIFF*, tstrip_t, tdata_t, tsize_t); extern tsize_t TIFFReadRawStrip(TIFF*, tstrip_t, tdata_t, tsize_t); extern tsize_t TIFFReadEncodedTile(TIFF*, ttile_t, tdata_t, tsize_t); extern tsize_t TIFFReadRawTile(TIFF*, ttile_t, tdata_t, tsize_t); extern tsize_t TIFFWriteEncodedStrip(TIFF*, tstrip_t, tdata_t, tsize_t); extern tsize_t TIFFWriteRawStrip(TIFF*, tstrip_t, tdata_t, tsize_t); extern tsize_t TIFFWriteEncodedTile(TIFF*, ttile_t, tdata_t, tsize_t); extern tsize_t TIFFWriteRawTile(TIFF*, ttile_t, tdata_t, tsize_t); extern int TIFFDataWidth(TIFFDataType); extern void TIFFSetWriteOffset(TIFF*, toff_t); extern void TIFFSwabShort(uint16*); extern void TIFFSwabLong(uint32*); extern void TIFFSwabDouble(double*); extern void TIFFSwabArrayOfShort(uint16*, unsigned long); extern void TIFFSwabArrayOfTriples(uint8*, unsigned long); extern void TIFFSwabArrayOfLong(uint32*, unsigned long); extern void TIFFSwabArrayOfDouble(double*, unsigned long); extern void TIFFReverseBits(unsigned char *, unsigned long); extern const unsigned char* TIFFGetBitRevTable(int); extern double LogL16toY(int); extern double LogL10toY(int); extern void XYZtoRGB24(float*, uint8*); extern int uv_decode(double*, double*, int); extern void LogLuv24toXYZ(uint32, float*); extern void LogLuv32toXYZ(uint32, float*); extern int LogL16fromY(double, int = 0); extern int LogL10fromY(double, int = 0); extern int uv_encode(double, double, int = 0); extern uint32 LogLuv24fromXYZ(float*, int = 0); extern uint32 LogLuv32fromXYZ(float*, int = 0); # 499 "/usr/include/tiffio.h" 3 4 extern int TIFFCIELabToRGBInit(TIFFCIELabToRGB*, TIFFDisplay *, float*); extern void TIFFCIELabToXYZ(TIFFCIELabToRGB *, uint32, int32, int32, float *, float *, float *); extern void TIFFXYZToRGB(TIFFCIELabToRGB *, float, float, float, uint32 *, uint32 *, uint32 *); extern int TIFFYCbCrToRGBInit(TIFFYCbCrToRGB*, float*, float*); extern void TIFFYCbCrtoRGB(TIFFYCbCrToRGB *, uint32, int32, int32, uint32 *, uint32 *, uint32 *); } # 128 "enblend.cc" 2 using std::cerr; using std::cout; using std::endl; using std::list; using vigra::CachedFileImageDirector; using vigra::Diff2D; using vigra::ImageExportInfo; using vigra::ImageImportInfo; using vigra::Rect2D; using vigra::StdException; using enblend::enblendMain; void printUsageAndExit() { cout << "==== enblend, version " << "3.0" << " ====" << endl; cout << "Usage: enblend [options] -o OUTPUT INPUTS" << endl; cout << endl; cout << "Common options:" << endl; cout << " -a Pre-assemble non-overlapping images" << endl; cout << " -h Print this help message" << endl; cout << " -l number Number of levels to use (1 to 29)" << endl; cout << " -o filename Write output to file" << endl; cout << " -v Verbose" << endl; cout << " -w Blend across -180/+180 boundary" << endl; cout << " -z Use LZW compression" << endl; cout << " -x Checkpoint partial results" << endl; cout << endl << "Extended options:" << endl; cout << " -b kilobytes Image cache block size (default=2MiB)" << endl; cout << " -c Use CIECAM02 to blend colors" << endl; cout << " -g Associated alpha hack for Gimp (ver. < 2) and Cinepaint" << endl; cout << " --gpu Use the graphics card to accelerate some computations." << endl; cout << " -f WIDTHxHEIGHT Manually set the size of the output image." << endl << " Useful for cropped and shifted input TIFF images," << endl << " such as those produced by Nona." << endl; cout << " -m megabytes Use this much memory before going to disk (default=1GiB)" << endl; cout << " --visualize=FILE Save the optimizer's results for debugging." << endl; cout << endl << "Mask generation options:" << endl; cout << " --coarse-mask Use an approximation to speedup mask generation. Default." << endl; cout << " --fine-mask Enables detailed mask generation. Slow. Use this if you" << endl << " have very narrow overlap regions." << endl; cout << " --optimize Turn on mask optimization. This is the default." << endl; cout << " --no-optimize Turn off mask optimization." << endl; cout << " --save-mask=FILE Save the generated mask to the given file." << endl; cout << " --load-mask=FILE Use the mask in the given file instead of generating one." << endl; exit(1); } void sigint_handler(int sig) { cout << endl << "Interrupted." << endl; if (UseGPU) { wrapupGPU(); } struct sigaction action; action.__sigaction_handler.sa_handler = ((__sighandler_t) 0); sigemptyset(&(action.sa_mask)); sigaction(2, &action, __null); raise(2); } int main(int argc, char** argv) { fesetround(FE_TONEAREST); sigemptyset(&SigintMask); sigaddset(&SigintMask, 2); struct sigaction action; action.__sigaction_handler.sa_handler = sigint_handler; sigemptyset(&(action.sa_mask)); sigaction(2, &action, __null); # 241 "enblend.cc" char *outputFileName = __null; list inputFileNameList; list::iterator inputFileNameIterator; static struct option long_options[] = { {"gpu", 0, &UseGPU, 1}, {"coarse-mask", 0, &CoarseMask, 1}, {"fine-mask", 0, &CoarseMask, 0}, {"optimize", 0, &OptimizeMask, 1}, {"no-optimize", 0, &OptimizeMask, 0}, {"save-mask", 1, 0, 0}, {"load-mask", 1, 0, 0}, {"visualize", 1, 0, 0}, {"gda-kmax", 1, 0, 1}, {"dijkstra-radius", 1, 0, 1}, {"mask-vectorize-distance", 1, 0, 1}, {0, 0, 0, 0} }; int option_index = 0; int c; while ((c = getopt_long(argc, argv, "ab:cf:ghl:m:o:svwxz", long_options, &option_index)) != -1) { switch (c) { case 0: { if (long_options[option_index].flag != 0) break; char **optionString = __null; switch (option_index) { case 5: optionString = &SaveMaskFileName; break; case 6: optionString = &LoadMaskFileName; break; case 7: optionString = &VisualizeMaskFileName; break; } if (*optionString != __null) { cerr << "enblend: more than one " << long_options[option_index].name << " output file specified." << endl; printUsageAndExit(); break; } int len = strlen(optarg) + 1; try { *optionString = new char[len]; } catch (std::bad_alloc& e) { cerr << endl << "enblend: out of memory" << endl << e.what() << endl; exit(1); } strncpy(*optionString, optarg, len); break; } case 1: { if (long_options[option_index].flag != 0) break; unsigned int *optionUInt = __null; switch (option_index) { case 8: optionUInt = &GDAKmax; break; case 9: optionUInt = &DijkstraRadius; break; case 10: optionUInt = &MaskVectorizeDistance; break; } int value = atoi(optarg); if (value < 1) { cerr << "enblend: " << long_options[option_index].name << " must be 1 or more." << endl; printUsageAndExit(); } *optionUInt = static_cast(value); break; } case 'a': { OneAtATime = false; break; } case 'b': { int kilobytes = atoi(optarg); if (kilobytes < 1) { cerr << "enblend: cache block size must be 1 or more." << endl; printUsageAndExit(); } CachedFileImageDirector::v().setBlockSize( (long long)kilobytes << 10); break; } case 'c': { UseCIECAM = true; break; } case 'f': { OutputSizeGiven = true; int nP = sscanf(optarg, "%dx%d", &OutputWidthCmdLine, &OutputHeightCmdLine); if (nP != 2) { cerr << "enblend: the -f option requires a parameter of the form WIDTHxHEIGHT" << endl; printUsageAndExit(); } break; } case 'g': { GimpAssociatedAlphaHack = true; break; } case 'h': { printUsageAndExit(); break; } case 'l': { int levels = atoi(optarg); if (levels < 1 || levels > 29) { cerr << "enblend: levels must in the range 1 to 29." << endl; printUsageAndExit(); } ExactLevels = (unsigned int)levels; break; } case 'm': { int megabytes = atoi(optarg); if (megabytes < 1) { cerr << "enblend: memory limit must be 1 or more." << endl; printUsageAndExit(); } CachedFileImageDirector::v().setAllocation( (long long)megabytes << 20); break; } case 'o': { if (outputFileName != __null) { cerr << "enblend: more than one output file specified." << endl; printUsageAndExit(); break; } int len = strlen(optarg) + 1; try { outputFileName = new char[len]; } catch (std::bad_alloc& e) { cerr << endl << "enblend: out of memory" << endl << e.what() << endl; exit(1); } strncpy(outputFileName, optarg, len); break; } case 's': { OneAtATime = true; cerr << "enblend: the -s flag is deprecated." << endl; break; } case 'v': { Verbose++; break; } case 'w': { Wraparound = true; break; } case 'x': { Checkpoint = true; break; } case 'z': { UseLZW = true; break; } default: { printUsageAndExit(); break; } } } if (outputFileName == __null) { cerr << "enblend: no output file specified." << endl; printUsageAndExit(); } if (optind < argc) { while (optind < argc) { # 468 "enblend.cc" inputFileNameList.push_back(argv[optind++]); } } else { cerr << "enblend: no input files specified." << endl; printUsageAndExit(); } if (UseGPU) { initGPU(); } if (MaskVectorizeDistance == 0) { MaskVectorizeDistance = CoarseMask ? 4 : 20; } if (inputFileNameList.size() <= 1) { cerr << "enblend: only one input file given. " << "Enblend needs two or more overlapping input images in order " << "to do blending calculations. The output will be the same as " << "the input." << endl; } list imageInfoList; list::iterator imageInfoIterator; bool isColor = false; const char *pixelType = __null; ImageImportInfo::ICCProfile iccProfile; Rect2D inputUnion; inputFileNameIterator = inputFileNameList.begin(); while (inputFileNameIterator != inputFileNameList.end()) { ImageImportInfo *inputInfo = __null; try { inputInfo = new ImageImportInfo(*inputFileNameIterator); } catch (StdException& e) { cerr << endl << "enblend: error opening input file \"" << *inputFileNameIterator << "\":" << endl << e.what() << endl; exit(1); } imageInfoList.push_back(inputInfo); if (Verbose > 1) { cout << "Input image \"" << *inputFileNameIterator << "\" "; if (inputInfo->isColor()) cout << "RGB "; if (!inputInfo->getICCProfile().empty()) cout << "ICC "; cout << inputInfo->getPixelType() << " " << "position=" << inputInfo->getPosition().x << "x" << inputInfo->getPosition().y << " " << "size=" << inputInfo->width() << "x" << inputInfo->height() << endl; } if (inputInfo->numExtraBands() < 1) { cerr << "enblend: Input image \"" << *inputFileNameIterator << "\" does not have an alpha " << "channel. This is required to determine which pixels " << "contribute to the final image." << endl; exit(1); } Rect2D imageROI(Point2D(inputInfo->getPosition()), Size2D(inputInfo->width(), inputInfo->height())); if (inputFileNameIterator == inputFileNameList.begin()) { inputUnion = imageROI; isColor = inputInfo->isColor(); pixelType = inputInfo->getPixelType(); iccProfile = inputInfo->getICCProfile(); if (!iccProfile.empty()) { InputProfile = cmsOpenProfileFromMem(iccProfile.data(), iccProfile.size()); if (InputProfile == __null) { cerr << endl << "enblend: error parsing ICC profile data from file\"" << *inputFileNameIterator << "\"" << endl; exit(1); } } } else { inputUnion |= imageROI; if (isColor != inputInfo->isColor()) { cerr << "enblend: Input image \"" << *inputFileNameIterator << "\" is " << (inputInfo->isColor() ? "color" : "grayscale") << " but previous images are " << (isColor ? "color" : "grayscale") << "." << endl; exit(1); } if (strcmp(pixelType, inputInfo->getPixelType())) { cerr << "enblend: Input image \"" << *inputFileNameIterator << "\" has pixel type " << inputInfo->getPixelType() << " but previous images have pixel type " << pixelType << "." << endl; exit(1); } if (!std::equal(iccProfile.begin(), iccProfile.end(), inputInfo->getICCProfile().begin())) { ImageImportInfo::ICCProfile mismatchProfile = inputInfo->getICCProfile(); cmsHPROFILE newProfile = __null; if (!mismatchProfile.empty()) { newProfile = cmsOpenProfileFromMem(mismatchProfile.data(), mismatchProfile.size()); if (newProfile == __null) { cerr << endl << "enblend: error parsing ICC profile data from file\"" << *inputFileNameIterator << "\"" << endl; exit(1); } } cerr << endl << "enblend: Input image \"" << *inputFileNameIterator << "\" has "; if (newProfile) { cerr << " ICC profile \"" << cmsTakeProductName(newProfile) << " " << cmsTakeProductDesc(newProfile) << "\""; } else { cerr << " no ICC profile"; } cerr << " but previous images have "; if (InputProfile) { cerr << " ICC profile \"" << cmsTakeProductName(InputProfile) << " " << cmsTakeProductDesc(InputProfile) << "\"." << endl; } else { cerr << " no ICC profile." << endl; } cerr << "enblend: Blending images with different color spaces may have unexpected results." << endl; } } inputFileNameIterator++; } if (OutputSizeGiven) { inputUnion |= Rect2D(Size2D(OutputWidthCmdLine, OutputHeightCmdLine)); } ImageExportInfo outputImageInfo(outputFileName); if (UseLZW) outputImageInfo.setCompression("LZW"); outputImageInfo.setPixelType(pixelType); outputImageInfo.setICCProfile(iccProfile); if (UseCIECAM) { if (InputProfile == __null) { cerr << "enblend: Input images do not have ICC profiles. Assuming sRGB." << endl; InputProfile = cmsCreate_sRGBProfile(); } XYZProfile = cmsCreateXYZProfile(); InputToXYZTransform = cmsCreateTransform(InputProfile, (((4) << 16)|((3) << 3)|(0)), XYZProfile, (((9) << 16)|((3) << 3)|(0)), 0, 0x0100); if (InputToXYZTransform == __null) { cerr << "enblend: Error building color transform from \"" << cmsTakeProductName(InputProfile) << " " << cmsTakeProductDesc(InputProfile) << "\" to XYZ." << endl; exit(1); } XYZToInputTransform = cmsCreateTransform(XYZProfile, (((9) << 16)|((3) << 3)|(0)), InputProfile, (((4) << 16)|((3) << 3)|(0)), 0, 0x0100); if (XYZToInputTransform == __null) { cerr << "enblend: Error building color transform from XYZ to \"" << cmsTakeProductName(InputProfile) << " " << cmsTakeProductDesc(InputProfile) << "\"." << endl; exit(1); } ViewingConditions.whitePoint.X = 96.42; ViewingConditions.whitePoint.Y = 100.0; ViewingConditions.whitePoint.Z = 82.49; ViewingConditions.Yb = 20.0; ViewingConditions.La = 31.83; ViewingConditions.surround = 1; ViewingConditions.D_value = 1.0; CIECAMTransform = cmsCIECAM02Init(&ViewingConditions); if (!CIECAMTransform) { cerr << endl << "enblend: Error initializing CIECAM02 transform." << endl; exit(1); } } if (Verbose > 1) { cout << "Output image size: " << inputUnion << endl; } outputImageInfo.setXResolution(300.0); outputImageInfo.setYResolution(300.0); outputImageInfo.setPosition(inputUnion.upperLeft()); try { encoder(outputImageInfo); } catch (StdException & e) { cerr << endl << "enblend: error opening output file \"" << outputFileName << "\":" << endl << e.what() << endl; exit(1); } if (LoadMaskFileName) try { ImageImportInfo maskInfo(LoadMaskFileName); } catch (StdException& e) { cerr << endl << "enblend: error opening load-mask input file \"" << LoadMaskFileName << "\":" << endl << e.what() << endl; exit(1); } if (SaveMaskFileName) try { ImageExportInfo maskInfo(SaveMaskFileName); encoder(maskInfo); } catch (StdException& e) { cerr << endl << "enblend: error opening save-mask output file \"" << SaveMaskFileName << "\":" << endl << e.what() << endl; exit(1); } if (VisualizeMaskFileName) try { ImageExportInfo maskInfo(VisualizeMaskFileName); encoder(maskInfo); } catch (StdException& e) { cerr << endl << "enblend: error opening visualize output file \"" << VisualizeMaskFileName << "\":" << endl << e.what() << endl; exit(1); } if (VisualizeMaskFileName && !OptimizeMask) { cerr << endl << "enblend: --visualize does nothing without --optimize." << endl; } try { if (isColor) { if (strcmp(pixelType, "UINT8" ) == 0) enblendMain >(imageInfoList, outputImageInfo, inputUnion); else if (strcmp(pixelType, "INT8" ) == 0) enblendMain >(imageInfoList, outputImageInfo, inputUnion); else if (strcmp(pixelType, "UINT16") == 0) enblendMain >(imageInfoList, outputImageInfo, inputUnion); else if (strcmp(pixelType, "INT16" ) == 0) enblendMain >(imageInfoList, outputImageInfo, inputUnion); else if (strcmp(pixelType, "UINT32") == 0) enblendMain >(imageInfoList, outputImageInfo, inputUnion); else if (strcmp(pixelType, "INT32" ) == 0) enblendMain >(imageInfoList, outputImageInfo, inputUnion); else if (strcmp(pixelType, "FLOAT" ) == 0) enblendMain >(imageInfoList, outputImageInfo, inputUnion); else if (strcmp(pixelType, "DOUBLE") == 0) enblendMain >(imageInfoList, outputImageInfo, inputUnion); else { cerr << "enblend: images with pixel type \"" << pixelType << "\" are not supported." << endl; exit(1); } } else { if (strcmp(pixelType, "UINT8" ) == 0) enblendMain(imageInfoList, outputImageInfo, inputUnion); else if (strcmp(pixelType, "INT8" ) == 0) enblendMain(imageInfoList, outputImageInfo, inputUnion); else if (strcmp(pixelType, "UINT16") == 0) enblendMain(imageInfoList, outputImageInfo, inputUnion); else if (strcmp(pixelType, "INT16" ) == 0) enblendMain(imageInfoList, outputImageInfo, inputUnion); else if (strcmp(pixelType, "UINT32") == 0) enblendMain(imageInfoList, outputImageInfo, inputUnion); else if (strcmp(pixelType, "INT32" ) == 0) enblendMain(imageInfoList, outputImageInfo, inputUnion); else if (strcmp(pixelType, "FLOAT" ) == 0) enblendMain(imageInfoList, outputImageInfo, inputUnion); else if (strcmp(pixelType, "DOUBLE") == 0) enblendMain(imageInfoList, outputImageInfo, inputUnion); else { cerr << "enblend: images with pixel type \"" << pixelType << "\" are not supported." << endl; exit(1); } } imageInfoIterator = imageInfoList.begin(); while (imageInfoIterator != imageInfoList.end()) { delete *imageInfoIterator++; } delete[] outputFileName; } catch (std::bad_alloc& e) { cerr << endl << "enblend: out of memory" << endl << e.what() << endl; exit(1); } catch (StdException& e) { cerr << endl << "enblend: an exception occured" << endl << e.what() << endl; exit(1); } if (CIECAMTransform) cmsCIECAM02Done(CIECAMTransform); if (InputToXYZTransform) cmsDeleteTransform(InputToXYZTransform); if (XYZToInputTransform) cmsDeleteTransform(XYZToInputTransform); if (XYZProfile) cmsCloseProfile(XYZProfile); if (InputProfile) cmsCloseProfile(InputProfile); if (UseGPU) { wrapupGPU(); } delete[] SaveMaskFileName; delete[] LoadMaskFileName; delete[] VisualizeMaskFileName; return 0; }