// 0 and 1
Standard_Integer dimension, min_degree, max_degree;
Standard_Real new_parameter[2], inverse;
- MEMALIGN(Standard_Real *PArray) = (Standard_Real *) &(PolesWeightsArray(PolesWeightsArray.LowerCol(), PolesWeightsArray.LowerRow()));
+ MEMALIGN(Standard_Real, *PArray) = (Standard_Real *) &(PolesWeightsArray(PolesWeightsArray.LowerCol(), PolesWeightsArray.LowerRow()));
Standard_Real *myPoint = (Standard_Real *) &aPoint;
- MEMALIGN(Standard_Real local_pole_and_weight[4]);
+ MEMALIGN(Standard_Real, local_pole_and_weight[4]);
if (UDegree <= VDegree)
{
// 0 and 1
Standard_Integer dimension, min_degree, max_degree, ii;
Standard_Real inverse_min, inverse_max, new_parameter[2];
- MEMALIGN(Standard_Real *PArray) = (Standard_Real *) &(PolesWeightsArray(PolesWeightsArray.LowerCol(), PolesWeightsArray.LowerRow()));
- MEMALIGN(Standard_Real local_poles_array[4][3]);
- MEMALIGN(Standard_Real local_poles_and_weights_array[4][4]);
+ MEMALIGN(Standard_Real, *PArray) = (Standard_Real *) &(PolesWeightsArray(PolesWeightsArray.LowerCol(), PolesWeightsArray.LowerRow()));
+ MEMALIGN(Standard_Real, local_poles_array[4][3]);
+ MEMALIGN(Standard_Real, local_poles_and_weights_array[4][4]);
Standard_Real *my_vec_min, *my_vec_max, *my_point;
my_point = (Standard_Real *) &aPoint;
// 0 and 1
Standard_Integer ii, kk, index, dimension, min_degree, max_degree;
Standard_Real inverse_min, inverse_max, new_parameter[2];
- MEMALIGN(Standard_Real *PArray) = (Standard_Real *) &(PolesWeightsArray(PolesWeightsArray.LowerCol(), PolesWeightsArray.LowerRow()));
- MEMALIGN(Standard_Real local_poles_array[9][3]);
- MEMALIGN(Standard_Real local_poles_and_weights_array[9][4]);
+ MEMALIGN(Standard_Real, *PArray) = (Standard_Real *) &(PolesWeightsArray(PolesWeightsArray.LowerCol(), PolesWeightsArray.LowerRow()));
+ MEMALIGN(Standard_Real, local_poles_array[9][3]);
+ MEMALIGN(Standard_Real, local_poles_and_weights_array[9][4]);
Standard_Real *my_vec_min, *my_vec_max, *my_vec_min_min, *my_vec_max_max, *my_vec_min_max, *my_point;
my_point = (Standard_Real *) &aPoint ;
#endif
-Geom_BSplineCache::Geom_BSplineCache(const Standard_Integer theRowLower, const Standard_Integer theRowUpper,
- const Standard_Integer theColumnLower, const Standard_Integer theColumnUpper)
- : myCacheArray(
- *(Standard_Real*)NCollection_AlignAllocator::Allocate(
- (theRowUpper-theRowLower+1)*(theColumnUpper-theColumnLower+1)*sizeof(Standard_Real),
- DATA_ALIGNMENT),
- theRowLower, theRowUpper, theColumnLower, theColumnUpper)
- {}
-
-void Geom_BSplineCache::Destroy()
-{
- Standard_Real* aPtr = (Standard_Real*) &(myCacheArray(myCacheArray.LowerCol(), myCacheArray.LowerRow()));
- if (aPtr)
- NCollection_AlignAllocator::Free(aPtr);
-}
-
inline const TColStd_Array2OfReal& Geom_BSplineCache::Array2() const
{
return myCacheArray;
+++ /dev/null
-#ifndef _Handle_Geom_BSplineCache_HeaderFile
-#define _Handle_Geom_BSplineCache_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_DefineHandle_HeaderFile
-#include <Standard_DefineHandle.hxx>
-#endif
-#ifndef _Handle_MMgt_TShared_HeaderFile
-#include <Handle_MMgt_TShared.hxx>
-#endif
-
-class Standard_Transient;
-class Handle(Standard_Type);
-class Handle(MMgt_TShared);
-class Geom_BSplineCache;
-
-DEFINE_STANDARD_HANDLE(Geom_BSplineCache,MMgt_TShared)
-
-#endif // _Handle_Geom_BSplineCache_HeaderFile
// The macro for array (pointer) alignment according DATA_ALIGNMENT
#ifdef NEED_DATA_ALIGN
# ifdef _MSC_VER
-# define MEMALIGN(thePtrDef) __declspec(align(DATA_ALIGNMENT)) thePtrDef
+ // MEMALIGN macro should be used for declaration of alignment of pointer or array
+ // <theType> is an array type (example: Standard_Real)
+ // <thePtrDef> is a pointer or array variable definition (example: *aPtr or anArray[2])
+# define MEMALIGN(theType, thePtrDef) __declspec(align(DATA_ALIGNMENT)) theType thePtrDef
# else
-# define MEMALIGN(thePtrDef) thePtrDef__attribute__((aligned(DATA_ALIGNMENT)))
+# define MEMALIGN(theType, thePtrDef) theType thePtrDef __attribute__((aligned(DATA_ALIGNMENT)))
# endif
#else
-# define MEMALIGN(thePtrDef) thePtrDef
+# define MEMALIGN(theType, thePtrDef) theType thePtrDef
#endif
//======================================================