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.

acl.h 2.0 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /**
  2. * @file acl.h
  3. *
  4. * Copyright (C) Huawei Technologies Co., Ltd. 2019-2020. All Rights Reserved.
  5. *
  6. * This program is distributed in the hope that it will be useful,
  7. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  9. */
  10. #ifndef INC_EXTERNAL_ACL_ACL_H_
  11. #define INC_EXTERNAL_ACL_ACL_H_
  12. #include "acl_rt.h"
  13. #include "acl_op.h"
  14. #include "acl_mdl.h"
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. // Current version is 1.1.0
  19. #define ACL_MAJOR_VERSION 1
  20. #define ACL_MINOR_VERSION 1
  21. #define ACL_PATCH_VERSION 0
  22. /**
  23. * @ingroup AscendCL
  24. * @brief acl initialize
  25. *
  26. * @par Restriction
  27. * The aclInit interface can be called only once in a process
  28. * @param configPath [IN] the config path,it can be NULL
  29. * @retval ACL_SUCCESS The function is successfully executed.
  30. * @retval OtherValues Failure
  31. */
  32. ACL_FUNC_VISIBILITY aclError aclInit(const char *configPath);
  33. /**
  34. * @ingroup AscendCL
  35. * @brief acl finalize
  36. *
  37. * @par Restriction
  38. * Need to call aclFinalize before the process exits.
  39. * After calling aclFinalize,the services cannot continue to be used normally.
  40. * @retval ACL_SUCCESS The function is successfully executed.
  41. * @retval OtherValues Failure
  42. */
  43. ACL_FUNC_VISIBILITY aclError aclFinalize();
  44. /**
  45. * @ingroup AscendCL
  46. * @brief query ACL interface version
  47. *
  48. * @param majorVersion[OUT] ACL interface major version
  49. * @param minorVersion[OUT] ACL interface minor version
  50. * @param patchVersion[OUT] ACL interface patch version
  51. * @retval ACL_SUCCESS The function is successfully executed.
  52. * @retval OtherValues Failure
  53. */
  54. ACL_FUNC_VISIBILITY aclError aclrtGetVersion(int32_t *majorVersion, int32_t *minorVersion, int32_t *patchVersion);
  55. /**
  56. * @ingroup AscendCL
  57. * @brief get recent error message
  58. *
  59. * @retval null for failed
  60. * @retval OtherValues success
  61. */
  62. ACL_FUNC_VISIBILITY const char *aclGetRecentErrMsg();
  63. #ifdef __cplusplus
  64. }
  65. #endif
  66. #endif // INC_EXTERNAL_ACL_ACL_H_