array.h Source File (original) (raw)

00001 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 #ifndef _GAN_ARRAY_H 00030 #define _GAN_ARRAY_H 00031 00032 #include <gandalf/common/misc_defs.h> 00033 00034 #ifdef cplusplus 00035 extern "C" { 00036 #endif 00037 00048 00049 #define GAN_FILL_DEC(t,f)
00050 void gan_fill_array
## f ( t *arr, unsigned long size, long stride, t val ) 00051 00052 GAN_FILL_DEC(unsigned char,uc); 00053 GAN_FILL_DEC(short,s); 00054 GAN_FILL_DEC(unsigned short,us); 00055 GAN_FILL_DEC(int,i); 00056 GAN_FILL_DEC(unsigned int,ui); 00057 GAN_FILL_DEC(long,l); 00058 GAN_FILL_DEC(unsigned long,ul); 00059 GAN_FILL_DEC(double,d); 00060 GAN_FILL_DEC(float,f); 00061 GAN_FILL_DEC(void *,p); 00062 00063 00064 #define GAN_COPY_DEC(c,t)
00065 void
00066 gan_copy_array
## c ( const t *source, long s_stride, unsigned long size,
00067 t *dest, long d_stride ) 00068 00069 GAN_COPY_DEC(c,char); 00070 GAN_COPY_DEC(uc,unsigned char); 00071 GAN_COPY_DEC(s,short); 00072 GAN_COPY_DEC(us,unsigned short); 00073 GAN_COPY_DEC(i,int); 00074 GAN_COPY_DEC(ui,unsigned int); 00075 GAN_COPY_DEC(l,long); 00076 GAN_COPY_DEC(ul,unsigned long); 00077 GAN_COPY_DEC(f,float); 00078 GAN_COPY_DEC(d,double); 00079 GAN_COPY_DEC(p,void *); 00080 00081 00082 00083 00084 00092 GAN_FILL_DEC(gan_uint8,ui8); 00093 00102 GAN_COPY_DEC(ui8,gan_uint8); 00103 00104 00105 00106 00114 GAN_FILL_DEC(gan_uint16,ui16); 00115 00124 GAN_COPY_DEC(ui16,gan_uint16); 00125 00126 00127 00128 00136 GAN_FILL_DEC(gan_uint32,ui32); 00137 00146 GAN_COPY_DEC(ui32,gan_uint32); 00147 00148 00149 00150 00158 GAN_FILL_DEC(gan_int32,i32); 00159 00168 GAN_COPY_DEC(i32,gan_int32); 00169 00170 00171 00172 00180 GAN_FILL_DEC(gan_ui64,ui64); 00181 00190 GAN_COPY_DEC(ui64,gan_ui64); 00191 00192 00193 00194 00202 GAN_FILL_DEC(gan_float32,f32); 00203 00212 GAN_COPY_DEC(f32,gan_float32); 00213 00214 00215 00216 00224 GAN_FILL_DEC(gan_float64,f64); 00225 00234 GAN_COPY_DEC(f64,gan_float64); 00235 00236 00245 #ifdef __cplusplus 00246 } 00247 #endif 00248 00249 #endif