Filter: optimize hot parts of notch filter updates

This commit is contained in:
Andy Piper 2021-11-29 20:15:49 +00:00 committed by Andrew Tridgell
parent 6e3b502110
commit fbdeea2d03
4 changed files with 18 additions and 1 deletions

View File

@ -13,6 +13,11 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef HAL_DEBUG_BUILD
#define AP_INLINE_VECTOR_OPS
#pragma GCC optimize("O2")
#endif
#include "HarmonicNotchFilter.h"
#include <GCS_MAVLink/GCS.h>

View File

@ -4,7 +4,10 @@
/// the downside being that it's a little slower as it internally uses a float
/// and it consumes an extra 4 bytes of memory to hold the constant gain
#ifndef HAL_DEBUG_BUILD
#define AP_INLINE_VECTOR_OPS
#pragma GCC optimize("O2")
#endif
#include "LowPassFilter.h"
////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -1,3 +1,7 @@
#ifndef HAL_DEBUG_BUILD
#define AP_INLINE_VECTOR_OPS
#pragma GCC optimize("O2")
#endif
#include "LowPassFilter2p.h"

View File

@ -13,6 +13,11 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef HAL_DEBUG_BUILD
#define AP_INLINE_VECTOR_OPS
#pragma GCC optimize("O2")
#endif
#include "NotchFilter.h"
/*