Main Page | Modules | Class List | File List | Class Members | File Members

array.h

Go to the documentation of this file.
00001 
00014 /* This library is free software; you can redistribute it and/or
00015    modify it under the terms of the GNU Lesser General Public
00016    License as published by the Free Software Foundation; either
00017    version 2.1 of the License, or (at your option) any later version.
00018 
00019    This library is distributed in the hope that it will be useful,
00020    but WITHOUT ANY WARRANTY; without even the implied warranty of
00021    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00022    Lesser General Public License for more details.
00023 
00024    You should have received a copy of the GNU Lesser General Public
00025    License along with this library; if not, write to the Free Software
00026    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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 /* array fill declarations */
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 /* array copy declarations */
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 /* macros for arrays of objects with specific bit size */
00082 
00083 /* 8-bit integer types */
00084 
00092 GAN_FILL_DEC(gan_uint8,ui8);
00093 
00102 GAN_COPY_DEC(ui8,gan_uint8);
00103 
00104 
00105 /* 16-bit integer types */
00106 
00114 GAN_FILL_DEC(gan_uint16,ui16);
00115 
00124 GAN_COPY_DEC(ui16,gan_uint16);
00125 
00126 
00127 /* 32-bit integer types */
00128 
00136 GAN_FILL_DEC(gan_uint32,ui32);
00137 
00146 GAN_COPY_DEC(ui32,gan_uint32);
00147 
00148 
00149 /* 32-bit signed integer types */
00150 
00158 GAN_FILL_DEC(gan_int32,i32);
00159 
00168 GAN_COPY_DEC(i32,gan_int32);
00169 
00170 
00171 /* 64-bit integer types */
00172 
00180 GAN_FILL_DEC(gan_ui64,ui64);
00181 
00190 GAN_COPY_DEC(ui64,gan_ui64);
00191 
00192 
00193 /* 32-bit float types */
00194 
00202 GAN_FILL_DEC(gan_float32,f32);
00203 
00212 GAN_COPY_DEC(f32,gan_float32);
00213 
00214 
00215 /* 64-bit float types */
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 /* #ifndef _GAN_ARRAY_H */

Generated on Fri Mar 17 12:44:47 2006 by  doxygen 1.3.9.1