Memory.h
Go to the documentation of this file.
00001 // This file is part of Eigen, a lightweight C++ template library
00002 // for linear algebra.
00003 //
00004 // Copyright (C) 2011 Benoit Jacob <jacob.benoit.1@gmail.com>
00005 //
00006 // Eigen is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 3 of the License, or (at your option) any later version.
00010 //
00011 // Alternatively, you can redistribute it and/or
00012 // modify it under the terms of the GNU General Public License as
00013 // published by the Free Software Foundation; either version 2 of
00014 // the License, or (at your option) any later version.
00015 //
00016 // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY
00017 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00018 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the
00019 // GNU General Public License for more details.
00020 //
00021 // You should have received a copy of the GNU Lesser General Public
00022 // License and a copy of the GNU General Public License along with
00023 // Eigen. If not, see <http://www.gnu.org/licenses/>.
00024 
00025 #ifndef EIGEN2_MEMORY_H
00026 #define EIGEN2_MEMORY_H
00027 
00028 inline void* ei_aligned_malloc(size_t size) { return internal::aligned_malloc(size); }
00029 inline void  ei_aligned_free(void *ptr) { internal::aligned_free(ptr); }
00030 inline void* ei_aligned_realloc(void *ptr, size_t new_size, size_t old_size) { return internal::aligned_realloc(ptr, new_size, old_size); }
00031 inline void* ei_handmade_aligned_malloc(size_t size) { return internal::handmade_aligned_malloc(size); }
00032 inline void  ei_handmade_aligned_free(void *ptr) { internal::handmade_aligned_free(ptr); }
00033 
00034 template<bool Align> inline void* ei_conditional_aligned_malloc(size_t size)
00035 {
00036   return internal::conditional_aligned_malloc<Align>(size);
00037 }
00038 template<bool Align> inline void ei_conditional_aligned_free(void *ptr)
00039 {
00040   internal::conditional_aligned_free<Align>(ptr);
00041 }
00042 template<bool Align> inline void* ei_conditional_aligned_realloc(void* ptr, size_t new_size, size_t old_size)
00043 {
00044   return internal::conditional_aligned_realloc<Align>(ptr, new_size, old_size);
00045 }
00046 
00047 template<typename T> inline T* ei_aligned_new(size_t size)
00048 {
00049   return internal::aligned_new<T>(size);
00050 }
00051 template<typename T> inline void ei_aligned_delete(T *ptr, size_t size)
00052 {
00053   return internal::aligned_delete(ptr, size);
00054 }
00055 
00056 
00057 
00058 #endif // EIGEN2_MACROS_H


re_vision
Author(s): Dorian Galvez-Lopez
autogenerated on Sun Jan 5 2014 11:31:59