mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
make these functions inline, thanks to Mek
This commit is contained in:
parent
670de11dca
commit
2776a3197b
@ -6,17 +6,17 @@
|
|||||||
|
|
||||||
#if (!EIGEN_MALLOC_ALREADY_ALIGNED)
|
#if (!EIGEN_MALLOC_ALREADY_ALIGNED)
|
||||||
|
|
||||||
void *qMalloc(size_t size)
|
inline void *qMalloc(size_t size)
|
||||||
{
|
{
|
||||||
return Eigen::ei_aligned_malloc(size);
|
return Eigen::ei_aligned_malloc(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void qFree(void *ptr)
|
inline void qFree(void *ptr)
|
||||||
{
|
{
|
||||||
Eigen::ei_aligned_free(ptr);
|
Eigen::ei_aligned_free(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void *qRealloc(void *ptr, size_t size)
|
inline void *qRealloc(void *ptr, size_t size)
|
||||||
{
|
{
|
||||||
void* newPtr = Eigen::ei_aligned_malloc(size);
|
void* newPtr = Eigen::ei_aligned_malloc(size);
|
||||||
memcpy(newPtr, ptr, size);
|
memcpy(newPtr, ptr, size);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user