Browse Source

fix build on armv7 without neon

tags/20191113
nihuini 6 years ago
parent
commit
bffb2af2ff
2 changed files with 5 additions and 1 deletions
  1. +1
    -1
      src/layer/arm/innerproduct_arm.cpp
  2. +4
    -0
      src/layer/arm/neon_activation.h

+ 1
- 1
src/layer/arm/innerproduct_arm.cpp View File

@@ -19,8 +19,8 @@
#if __ARM_NEON
#include <arm_neon.h>
#include "neon_mathfun.h"
#include "neon_activation.h"
#endif // __ARM_NEON
#include "neon_activation.h"

namespace ncnn {



+ 4
- 0
src/layer/arm/neon_activation.h View File

@@ -12,7 +12,9 @@
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.

#if __ARM_NEON
#include <arm_neon.h>
#endif // __ARM_NEON

static inline float activation_ss(float v, int activation_type, const ncnn::Mat& activation_params)
{
@@ -42,6 +44,7 @@ static inline float activation_ss(float v, int activation_type, const ncnn::Mat&
return v;
}

#if __ARM_NEON
static inline float32x4_t activation_ps(float32x4_t _v, int activation_type, const ncnn::Mat& activation_params)
{
if (activation_type == 1)
@@ -78,3 +81,4 @@ static inline float32x4_t activation_ps(float32x4_t _v, int activation_type, con

return _v;
}
#endif // __ARM_NEON

Loading…
Cancel
Save