API Overview

This chapter provides an overview of APIs. For details about the APIs, see Ascend C API.

Ascend C provides a group of class library APIs, and you can use the standard C++ syntax and class library APIs for programming. Ascend C programming class library APIs are classified into the following types:

Header file directory of Ascend C APIs:

  • Basic APIs: ${INSTALL_DIR}/include/ascendc/basic_api/interface
  • High-level APIs: (Note that if the APIs contained in the following header file directories are not declared in the documentation, they are called indirectly, and developers do not need to pay attention to them.)
    • ${INSTALL_DIR}/include/ascendc/highlevel_api/lib
    • ${INSTALL_DIR}/include/tiling

Replace ${INSTALL_DIR} with the CANN component directory. For example, if the installation is performed by the root user, the default file storage path is /usr/local/Ascend/cann.

The library files required for using Ascend C APIs are described as follows:

  • Basic APIs: N/A
  • High-level APIs: High-level APIs are used with the host tiling API. Therefore, libtiling_api.a needs to be linked.