我要评分
获取效率
正确性
完整性
易理解

Function Description

Table 1 lists interfaces provided by KUAF.

Table 1 KUAF interfaces

Interface

Description

kuaf_ctx_scheduler_create

Creates a ctx structure according to the algorithm type and algorithm ID.

kuaf_ctx_scheduler

Acts as a unified interface at the decision-making layer. It obtains information about the algorithm required by the service and invokes the configuration file module to read configuration files. Then, according to the configured scheduling policy, it invokes bandwidth-based scheduling or ratio-based scheduling, and records scheduling decision-making information in the ctx structure.

kuaf_ctx_scheduler_free

Releases the structure resource.

kuaf_ctx_process_sync

Acts as a unified interface of the execution module. It distributes execution code downwards and calls the hardware or software computing interfaces of the algorithm based on information in the ctx structure.

kuaf_ctx_end_process

Performs post-processing after kuaf_ctx_process_sync.

  • KUAF is available on the Kunpeng platform only. To achieve better performance, complete input parameter verification is not performed in KUAF interfaces. Use valid input parameters, and invalid input parameters may cause errors.
  • When writing a user-defined function, you are advised to avoid using "kuaf" as the naming prefix to prevent link conflicts caused by name collision with the global symbol.
  • In decompression scenarios where the size of raw data is unknown, you are advised to use the streaming decompression mode. If block-based decompression is required, you need to estimate the data size and allocate a target buffer with sufficient space. Otherwise, decompression operations will trigger undefined behavior when the target buffer space is insufficient, resulting in unpredictable program execution results.