Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7c947f9

Browse filesBrowse files
committed
Add pounddefine hack for uPAL optimized ops
1 parent 84f63d7 commit 7c947f9
Copy full SHA for 7c947f9

File tree

3 files changed

+7
-3
lines changed
Filter options

3 files changed

+7
-3
lines changed

‎src/uTensor/core/uPAL.hpp

Copy file name to clipboardExpand all lines: src/uTensor/core/uPAL.hpp
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
#define UTENSOR_UPAL_H
33
#include "uTensor/core/uTensor_util.hpp"
44

5+
#ifndef USE_OPTIMIZED
6+
#define USE_OPTIMIZED 0
7+
#endif
8+
59
// TODO: use macros to register platforms and bit operators to combine flags
610
// TODO: use bitwise operators for multi-target check, e.g. `#if (UTENSOR_PLATFORM_ARDUINO & __AVR__) == UTENSOR_PLATFORM`
711

‎src/uTensor/ops/optimized/arm/FFT.cpp

Copy file name to clipboardExpand all lines: src/uTensor/ops/optimized/arm/FFT.cpp
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "uTensor/core/uPAL.hpp"
2-
#if UT_ARCH(UT_ARCH_ARM)
2+
#if UT_ARCH(UT_ARCH_ARM) && USE_OPTIMIZED
33

44
#include "FFT.hpp"
55
#include "uTensor/core/context.hpp"

‎src/uTensor/ops/optimized/arm/FFT.hpp

Copy file name to clipboardExpand all lines: src/uTensor/ops/optimized/arm/FFT.hpp
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "uTensor/core/uPAL.hpp"
2-
#if UT_ARCH(UT_ARCH_ARM)
2+
#if UT_ARCH(UT_ARCH_ARM) && USE_OPTIMIZED
33

44
#ifndef UTENSOR_FFT_HPP
55
#define UTENSOR_FFT_HPP
@@ -27,4 +27,4 @@ class PowerSpectrum : public OperatorInterface<1, 1>, FastOperator {
2727
};
2828
} // namespace uTensor
2929
#endif
30-
#endif //platform guard
30+
#endif //platform guard

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.