From 399d37046385ae138319d0fe2ef9254205df9d7a Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Fri, 4 Nov 2016 12:48:23 +0100 Subject: [PATCH] fix some typos and add placement new operator to AlignedAlloc --- libsrc/csg/python_csg.cpp | 6 +++--- libsrc/general/mysimd.hpp | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libsrc/csg/python_csg.cpp b/libsrc/csg/python_csg.cpp index e30671ec..ec2a46f3 100644 --- a/libsrc/csg/python_csg.cpp +++ b/libsrc/csg/python_csg.cpp @@ -187,9 +187,9 @@ DLL_HEADER void ExportCSG(py::module &m) .def(py::self-Vec<3>()) ; - py::def ("Pnt", FunctionPointer + m.def ("Pnt", FunctionPointer ([](double x, double y, double z) { return global_trafo(Point<3>(x,y,z)); })); - py::def ("Pnt", FunctionPointer + m.def ("Pnt", FunctionPointer ([](double x, double y) { return Point<2>(x,y); })); @@ -229,7 +229,7 @@ DLL_HEADER void ExportCSG(py::module &m) ; m.def ("Vec", FunctionPointer - ([] (double x, double y, double z) { return global_trafo<3>(x,y,z); })); + ([] (double x, double y, double z) { return global_trafo(Vec<3>(x,y,z)); })); m.def ("Vec", FunctionPointer ([] (double x, double y) { return Vec<2>(x,y); })); diff --git a/libsrc/general/mysimd.hpp b/libsrc/general/mysimd.hpp index 801f625c..bc00adae 100644 --- a/libsrc/general/mysimd.hpp +++ b/libsrc/general/mysimd.hpp @@ -58,6 +58,7 @@ namespace netgen class AlignedAlloc { public: + void * operator new (size_t s, void *p) { return p; } void * operator new (size_t s) { return _mm_malloc(s, alignof(T)); } void * operator new[] (size_t s) { return _mm_malloc(s, alignof(T)); } void operator delete (void * p) { _mm_free(p); }