diff --git a/src/nvcore/Array.h b/src/nvcore/Array.h index e01e322..7e239bc 100644 --- a/src/nvcore/Array.h +++ b/src/nvcore/Array.h @@ -332,7 +332,7 @@ namespace nv /// Resize the vector preserving existing elements. - void resize(uint new_size) + NV_NOINLINE void resize(uint new_size) { uint i; uint old_size = m_size; @@ -372,7 +372,7 @@ namespace nv /// Resize the vector preserving existing elements and initializing the /// new ones with the given value. - void resize( uint new_size, const T &elem ) + NV_NOINLINE void resize( uint new_size, const T &elem ) { uint i; uint old_size = m_size; @@ -496,7 +496,7 @@ namespace nv private: /// Change buffer size. - void allocate( uint rsize ) + NV_NOINLINE void allocate( uint rsize ) { m_buffer_size = rsize; diff --git a/src/nvcore/DefsGnucDarwin.h b/src/nvcore/DefsGnucDarwin.h index 13061fc..df72580 100644 --- a/src/nvcore/DefsGnucDarwin.h +++ b/src/nvcore/DefsGnucDarwin.h @@ -36,6 +36,8 @@ #define NV_CONST #endif +#define NV_NOINLINE __attribute__((noinline)) + // Define __FUNC__ properly. #if __STDC_VERSION__ < 199901L # if __GNUC__ >= 2 diff --git a/src/nvcore/DefsGnucLinux.h b/src/nvcore/DefsGnucLinux.h index 099abba..f2ddab5 100644 --- a/src/nvcore/DefsGnucLinux.h +++ b/src/nvcore/DefsGnucLinux.h @@ -36,6 +36,8 @@ #define NV_CONST #endif +#define NV_NOINLINE __attribute__((noinline)) + // Define __FUNC__ properly. #if __STDC_VERSION__ < 199901L # if __GNUC__ >= 2 diff --git a/src/nvcore/DefsGnucWin32.h b/src/nvcore/DefsGnucWin32.h index 11a3e75..8968166 100644 --- a/src/nvcore/DefsGnucWin32.h +++ b/src/nvcore/DefsGnucWin32.h @@ -30,6 +30,8 @@ #define NV_CONST #endif +#define NV_NOINLINE __attribute__((noinline)) + // Define __FUNC__ properly. #if __STDC_VERSION__ < 199901L # if __GNUC__ >= 2 diff --git a/src/nvcore/DefsVcWin32.h b/src/nvcore/DefsVcWin32.h index c0e224e..b0b894d 100644 --- a/src/nvcore/DefsVcWin32.h +++ b/src/nvcore/DefsVcWin32.h @@ -42,6 +42,7 @@ #define __FUNC__ __FUNCTION__ #endif +#define NV_NOINLINE __declspec(noinline) // Type definitions typedef unsigned char uint8;