You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

common_func_fp16.h 1.7 kB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /**
  2. * Copyright 2020 Huawei Technologies Co., Ltd
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef MINDSPORE_LITE_NNACL_FP16_COMMON_FUNC_FP16_H_
  17. #define MINDSPORE_LITE_NNACL_FP16_COMMON_FUNC_FP16_H_
  18. #include <arm_neon.h>
  19. #include "nnacl/op_base.h"
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. /* deconv common */
  24. void PostConvFuncFp16C8(const float16_t *c8_out_ptr, float16_t *out_ptr, const float16_t *bias_ptr,
  25. size_t output_channel, size_t plane_size, size_t stride, ActType act_type);
  26. void PostFuncBiasReluC8Fp16(float16_t *dst, const float16_t *src, const float16_t *bias, size_t oc8div, size_t oc8mod,
  27. size_t plane_size, size_t stride, size_t relu_type);
  28. /* deconv winograd */
  29. void PostConvFuncFp16C4(const float16_t *c4_out, float16_t *nhwc_out, const float16_t *bias, size_t output_channel,
  30. size_t plane_size, size_t plane_stride, ActType act_type);
  31. void PostFuncBiasReluC4Fp16(float16_t *dst, const float16_t *src, const float16_t *bias, size_t oc4div, size_t oc4mod,
  32. size_t plane_size, size_t plane_stride, size_t relu_type);
  33. #ifdef __cplusplus
  34. }
  35. #endif
  36. #endif // MINDSPORE_LITE_NNACL_FP16_COMMON_FUNC_FP16_H_