| arma_version.hpp | | arma_version.hpp | |
| | | | |
| skipping to change at line 13 | | skipping to change at line 13 | |
| // | | // | |
| // This Source Code Form is subject to the terms of the Mozilla Public | | // This Source Code Form is subject to the terms of the Mozilla Public | |
| // License, v. 2.0. If a copy of the MPL was not distributed with this | | // License, v. 2.0. If a copy of the MPL was not distributed with this | |
| // file, You can obtain one at http://mozilla.org/MPL/2.0/. | | // file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
| | | | |
| //! \addtogroup arma_version | | //! \addtogroup arma_version | |
| //! @{ | | //! @{ | |
| | | | |
| #define ARMA_VERSION_MAJOR 3 | | #define ARMA_VERSION_MAJOR 3 | |
| #define ARMA_VERSION_MINOR 900 | | #define ARMA_VERSION_MINOR 900 | |
|
| #define ARMA_VERSION_PATCH 4 | | #define ARMA_VERSION_PATCH 5 | |
| #define ARMA_VERSION_NAME "Bavarian Sunflower" | | #define ARMA_VERSION_NAME "Bavarian Sunflower" | |
| | | | |
| struct arma_version | | struct arma_version | |
| { | | { | |
| static const unsigned int major = ARMA_VERSION_MAJOR; | | static const unsigned int major = ARMA_VERSION_MAJOR; | |
| static const unsigned int minor = ARMA_VERSION_MINOR; | | static const unsigned int minor = ARMA_VERSION_MINOR; | |
| static const unsigned int patch = ARMA_VERSION_PATCH; | | static const unsigned int patch = ARMA_VERSION_PATCH; | |
| | | | |
| static | | static | |
| inline | | inline | |
| | | | |
End of changes. 1 change blocks. |
| 1 lines changed or deleted | | 1 lines changed or added | |
|
| arrayops_bones.hpp | | arrayops_bones.hpp | |
| | | | |
| skipping to change at line 20 | | skipping to change at line 20 | |
| | | | |
| class arrayops | | class arrayops | |
| { | | { | |
| public: | | public: | |
| | | | |
| template<typename eT> | | template<typename eT> | |
| arma_hot arma_inline static void | | arma_hot arma_inline static void | |
| copy(eT* dest, const eT* src, const uword n_elem); | | copy(eT* dest, const eT* src, const uword n_elem); | |
| | | | |
| template<typename eT> | | template<typename eT> | |
|
| static inline void | | arma_hot inline static void | |
| copy_big(eT* dest, const eT* src, const uword n_elem); | | copy_small(eT* dest, const eT* src, const uword n_elem); | |
| | | | |
| template<typename eT> | | template<typename eT> | |
| arma_hot inline static void | | arma_hot inline static void | |
| copy_forwards(eT* dest, const eT* src, const uword n_elem); | | copy_forwards(eT* dest, const eT* src, const uword n_elem); | |
| | | | |
| template<typename eT> | | template<typename eT> | |
| arma_hot inline static void | | arma_hot inline static void | |
| copy_backwards(eT* dest, const eT* src, const uword n_elem); | | copy_backwards(eT* dest, const eT* src, const uword n_elem); | |
| | | | |
| // | | // | |
| | | | |
End of changes. 1 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| arrayops_meat.hpp | | arrayops_meat.hpp | |
| | | | |
| skipping to change at line 17 | | skipping to change at line 17 | |
| | | | |
| //! \addtogroup arrayops | | //! \addtogroup arrayops | |
| //! @{ | | //! @{ | |
| | | | |
| template<typename eT> | | template<typename eT> | |
| arma_hot | | arma_hot | |
| arma_inline | | arma_inline | |
| void | | void | |
| arrayops::copy(eT* dest, const eT* src, const uword n_elem) | | arrayops::copy(eT* dest, const eT* src, const uword n_elem) | |
| { | | { | |
|
| switch(n_elem) | | if(n_elem <= 16) | |
| | | { | |
| | | arrayops::copy_small(dest, src, n_elem); | |
| | | } | |
| | | else | |
| { | | { | |
|
| default: | | std::memcpy(dest, src, n_elem*sizeof(eT)); | |
| arrayops::copy_big(dest, src, n_elem); | | | |
| break; | | | |
| case 8: | | | |
| dest[7] = src[7]; | | | |
| case 7: | | | |
| dest[6] = src[6]; | | | |
| case 6: | | | |
| dest[5] = src[5]; | | | |
| case 5: | | | |
| dest[4] = src[4]; | | | |
| case 4: | | | |
| dest[3] = src[3]; | | | |
| case 3: | | | |
| dest[2] = src[2]; | | | |
| case 2: | | | |
| dest[1] = src[1]; | | | |
| case 1: | | | |
| dest[0] = src[0]; | | | |
| } | | } | |
| } | | } | |
| | | | |
| template<typename eT> | | template<typename eT> | |
|
| | | arma_hot | |
| inline | | inline | |
| void | | void | |
|
| arrayops::copy_big(eT* dest, const eT* src, const uword n_elem) | | arrayops::copy_small(eT* dest, const eT* src, const uword n_elem) | |
| { | | { | |
| switch(n_elem) | | switch(n_elem) | |
| { | | { | |
|
| default: | | case 16: dest[15] = src[15]; | |
| std::memcpy(dest, src, n_elem*sizeof(eT)); | | case 15: dest[14] = src[14]; | |
| break; | | case 14: dest[13] = src[13]; | |
| case 32: | | case 13: dest[12] = src[12]; | |
| dest[31] = src[31]; | | case 12: dest[11] = src[11]; | |
| case 31: | | case 11: dest[10] = src[10]; | |
| dest[30] = src[30]; | | case 10: dest[ 9] = src[ 9]; | |
| case 30: | | case 9: dest[ 8] = src[ 8]; | |
| dest[29] = src[29]; | | case 8: dest[ 7] = src[ 7]; | |
| case 29: | | case 7: dest[ 6] = src[ 6]; | |
| dest[28] = src[28]; | | case 6: dest[ 5] = src[ 5]; | |
| case 28: | | case 5: dest[ 4] = src[ 4]; | |
| dest[27] = src[27]; | | case 4: dest[ 3] = src[ 3]; | |
| case 27: | | case 3: dest[ 2] = src[ 2]; | |
| dest[26] = src[26]; | | case 2: dest[ 1] = src[ 1]; | |
| case 26: | | case 1: dest[ 0] = src[ 0]; | |
| dest[25] = src[25]; | | default: ; | |
| case 25: | | | |
| dest[24] = src[24]; | | | |
| case 24: | | | |
| dest[23] = src[23]; | | | |
| case 23: | | | |
| dest[22] = src[22]; | | | |
| case 22: | | | |
| dest[21] = src[21]; | | | |
| case 21: | | | |
| dest[20] = src[20]; | | | |
| case 20: | | | |
| dest[19] = src[19]; | | | |
| case 19: | | | |
| dest[18] = src[18]; | | | |
| case 18: | | | |
| dest[17] = src[17]; | | | |
| case 17: | | | |
| dest[16] = src[16]; | | | |
| case 16: | | | |
| dest[15] = src[15]; | | | |
| case 15: | | | |
| dest[14] = src[14]; | | | |
| case 14: | | | |
| dest[13] = src[13]; | | | |
| case 13: | | | |
| dest[12] = src[12]; | | | |
| case 12: | | | |
| dest[11] = src[11]; | | | |
| case 11: | | | |
| dest[10] = src[10]; | | | |
| case 10: | | | |
| dest[9] = src[9]; | | | |
| case 9: | | | |
| dest[8] = src[8]; | | | |
| case 8: | | | |
| dest[7] = src[7]; | | | |
| case 7: | | | |
| dest[6] = src[6]; | | | |
| case 6: | | | |
| dest[5] = src[5]; | | | |
| case 5: | | | |
| dest[4] = src[4]; | | | |
| case 4: | | | |
| dest[3] = src[3]; | | | |
| case 3: | | | |
| dest[2] = src[2]; | | | |
| case 2: | | | |
| dest[1] = src[1]; | | | |
| case 1: | | | |
| dest[0] = src[0]; | | | |
| } | | } | |
| } | | } | |
| | | | |
| template<typename eT> | | template<typename eT> | |
| arma_hot | | arma_hot | |
| inline | | inline | |
| void | | void | |
| arrayops::copy_forwards(eT* dest, const eT* src, const uword n_elem) | | arrayops::copy_forwards(eT* dest, const eT* src, const uword n_elem) | |
| { | | { | |
| // can't use std::memcpy(), as we don't know how it copies data | | // can't use std::memcpy(), as we don't know how it copies data | |
| | | | |
End of changes. 5 change blocks. |
| 88 lines changed or deleted | | 25 lines changed or added | |
|
| field_bones.hpp | | field_bones.hpp | |
| | | | |
| skipping to change at line 17 | | skipping to change at line 17 | |
| // file, You can obtain one at http://mozilla.org/MPL/2.0/. | | // file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
| | | | |
| //! \addtogroup field | | //! \addtogroup field | |
| //! @{ | | //! @{ | |
| | | | |
| struct field_prealloc_n_elem | | struct field_prealloc_n_elem | |
| { | | { | |
| static const uword val = 16; | | static const uword val = 16; | |
| }; | | }; | |
| | | | |
|
| //! A lightweight 2D container for abitrary objects | | //! A lightweight 2D container for arbitrary objects | |
| //! (the objects must have a copy constructor) | | //! (the objects must have a copy constructor) | |
| | | | |
| template<typename oT> | | template<typename oT> | |
| class field | | class field | |
| { | | { | |
| public: | | public: | |
| | | | |
| typedef oT object_type; | | typedef oT object_type; | |
| | | | |
| const uword n_rows; //!< number of rows in the field (read-only) | | const uword n_rows; //!< number of rows in the field (read-only) | |
| | | | |
End of changes. 1 change blocks. |
| 1 lines changed or deleted | | 1 lines changed or added | |
|