mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-26 21:00:34 +05:00
fix some typos and add placement new operator to AlignedAlloc
This commit is contained in:
parent
abde483216
commit
399d370463
@ -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); }));
|
||||
|
||||
|
@ -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); }
|
||||
|
Loading…
Reference in New Issue
Block a user