esp_nn_generic_opt.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // Copyright 2020-2021 Espressif Systems (Shanghai) PTE LTD
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. /**
  15. * @file Header definitions to include for esp_nn generic optimisations
  16. * For functions which not having optimisations, _ansi versions are picked.
  17. */
  18. #pragma once
  19. #include "esp_nn_defs.h"
  20. #include "esp_nn_ansi_headers.h"
  21. #define esp_nn_add_elementwise_s8 esp_nn_add_elementwise_s8_ansi
  22. #define esp_nn_mul_elementwise_s8 esp_nn_mul_elementwise_s8_ansi
  23. #define esp_nn_depthwise_conv_s8 esp_nn_depthwise_conv_s8_opt
  24. #define esp_nn_conv_s8 esp_nn_conv_s8_opt
  25. #define esp_nn_get_conv_scratch_size esp_nn_get_conv_scratch_size_opt
  26. #define esp_nn_set_conv_scratch_buf esp_nn_set_conv_scratch_buf_opt
  27. #define esp_nn_get_depthwise_conv_scratch_size esp_nn_get_depthwise_conv_scratch_size_opt
  28. #define esp_nn_set_depthwise_conv_scratch_buf esp_nn_set_depthwise_conv_scratch_buf_opt
  29. #define esp_nn_relu6_s8 esp_nn_relu6_s8_ansi
  30. #define esp_nn_avg_pool_s8 esp_nn_avg_pool_s8_ansi
  31. #define esp_nn_max_pool_s8 esp_nn_max_pool_s8_ansi
  32. #define esp_nn_fully_connected_s8 esp_nn_fully_connected_s8_ansi
  33. #define esp_nn_get_softmax_scratch_size esp_nn_get_softmax_scratch_size_opt
  34. #define esp_nn_set_softmax_scratch_buf esp_nn_set_softmax_scratch_buf_opt
  35. #define esp_nn_softmax_s8 esp_nn_softmax_s8_opt