00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef _MATRIX_galloc_h_
00028 #define _MATRIX_galloc_h_
00029
00030
00031
00032
00033
00034 template <class T>
00035 void resizeBasicArray(BasicArray<T>& a, int nsize) ;
00036
00037 template <class T, const int D>
00038 void resizeBasicArrayHPoint(BasicArray<HPoint_nD<T,D> >&, int) ;
00039
00040
00041 template<> void resizeBasicArray(BasicArray<HPoint_nD<float,2> >& a, int);
00042 template<> void resizeBasicArray(BasicArray<HPoint_nD<double,2> >& a, int);
00043 template<> void resizeBasicArray(BasicArray<HPoint_nD<float,3> >& a, int );
00044 template<> void resizeBasicArray(BasicArray<HPoint_nD<double,3> >& a, int);
00045
00046
00047
00048 #ifdef HAVE_ISO_FRIEND_DECL
00049
00050 #define FRIEND_ARRAY_ALLOCATOR \
00051 friend void resizeBasicArray<>(BasicArray<T>&, int) ; \
00052 friend void resizeBasicArrayHPoint<>(BasicArray<HPoint_nD<float,2> >&,int); \
00053 friend void resizeBasicArrayHPoint<>(BasicArray<HPoint_nD<double,2> >&,int);\
00054 friend void resizeBasicArrayHPoint<>(BasicArray<HPoint_nD<float,3> >&,int); \
00055 friend void resizeBasicArrayHPoint<>(BasicArray<HPoint_nD<double,3> >&,int);
00056
00057 #else
00058
00059
00060 template void resizeBasicArrayHPoint(BasicArray<HPoint_nD<float,2> >&,int);
00061 template void resizeBasicArrayHPoint(BasicArray<HPoint_nD<double,2> >&,int);
00062 template void resizeBasicArrayHPoint(BasicArray<HPoint_nD<float,3> >&,int);
00063 template void resizeBasicArrayHPoint(BasicArray<HPoint_nD<double,3> >&,int);
00064
00065
00066 #define FRIEND_ARRAY_ALLOCATOR \
00067 friend void resizeBasicArray(BasicArray<T>&, int) ; \
00068 friend void resizeBasicArrayHPoint(BasicArray<HPoint_nD<float,2> >&,int); \
00069 friend void resizeBasicArrayHPoint(BasicArray<HPoint_nD<double,2> >&,int);\
00070 friend void resizeBasicArrayHPoint(BasicArray<HPoint_nD<float,3> >&,int); \
00071 friend void resizeBasicArrayHPoint(BasicArray<HPoint_nD<double,3> >&,int);
00072
00073 #endif
00074
00075
00076 #endif