Merged
废弃asc_get_block_num和asc_get_block_idx #5216
CruiterAdd on Aug 20
废弃asc_get_block_num和asc_get_block_idx #5216
Merged
Merged fromprintfscanfmain/asc-devkitdeprecateintocann/asc-devkitmaster
Total: 3 files changed+37-4
| @@ -39,9 +39,22 @@ | |||
| 39 | 39 | ||
| 40 | __aicore__ inline int64_t asc_get_core_id() { return asc_get_core_id_impl(); } | 40 | __aicore__ inline int64_t asc_get_core_id() { return asc_get_core_id_impl(); } |
| 41 | 41 | ||
| 42 | -__aicore__ inline int64_t asc_get_block_idx() { return asc_get_block_idx_impl(); } | 42 | +[[deprecated("NOTICE: asc_get_block_idx is deprecated. " |
| 43 | + "Please use block_idx for pure Vector, pure Cube, and Mix(1, 1). " | ||
| 44 | + "For Mix(1, 2), please use block_idx on the Cube core and " | ||
| 45 | + "block_idx * asc_get_sub_block_num() + asc_get_sub_block_id() " | ||
| 46 | + "on Vector cores instead.")]] | ||
| 47 | +__aicore__ inline int64_t asc_get_block_idx() | ||
| 48 | +{ | ||
| 49 | + return asc_get_block_idx_impl(); | ||
| 50 | +} | ||
| 43 | 51 | ||
| 44 | -__aicore__ inline int64_t asc_get_block_num() { return asc_get_block_num_impl(); } | 52 | +[[deprecated("NOTICE: asc_get_block_num is deprecated. " |
| 53 | + "Please use block_num instead.")]] | ||
| 54 | +__aicore__ inline int64_t asc_get_block_num() | ||
| 55 | +{ | ||
| 56 | + return asc_get_block_num_impl(); | ||
| 57 | +} | ||
| 45 | 58 | ||
| 46 | __aicore__ inline int64_t asc_get_ctrl() { return asc_get_ctrl_impl(); } | 59 | __aicore__ inline int64_t asc_get_ctrl() { return asc_get_ctrl_impl(); } |
| 47 | 60 | ||
| @@ -54,13 +54,26 @@ __aicore__ inline int64_t asc_get_squeeze_status() { return asc_get_squeeze_stat | |||
| 54 | 54 | ||
| 55 | __aicore__ inline int64_t asc_get_program_counter() { return asc_get_program_counter_impl(); } | 55 | __aicore__ inline int64_t asc_get_program_counter() { return asc_get_program_counter_impl(); } |
| 56 | 56 | ||
| 57 | -__aicore__ inline int64_t asc_get_block_idx() { return asc_get_block_idx_impl(); } | 57 | +[[deprecated("NOTICE: asc_get_block_idx is deprecated. " |
| 58 | + "Please use block_idx for pure Vector, pure Cube, and Mix(1, 1). " | ||
| 59 | + "For Mix(1, 2), please use block_idx on the Cube core and " | ||
| 60 | + "block_idx * asc_get_sub_block_num() + asc_get_sub_block_id() " | ||
| 61 | + "on Vector cores instead.")]] __aicore__ inline int64_t | ||
| 62 | +asc_get_block_idx() | ||
| 63 | +{ | ||
| 64 | + return asc_get_block_idx_impl(); | ||
| 65 | +} | ||
| 58 | 66 | ||
| 59 | __aicore__ inline int64_t asc_get_sub_block_num() { return asc_get_sub_block_num_impl(); } | 67 | __aicore__ inline int64_t asc_get_sub_block_num() { return asc_get_sub_block_num_impl(); } |
| 60 | 68 | ||
| 61 | __aicore__ inline int64_t asc_get_sub_block_id() { return asc_get_sub_block_id_impl(); } | 69 | __aicore__ inline int64_t asc_get_sub_block_id() { return asc_get_sub_block_id_impl(); } |
| 62 | 70 | ||
| 63 | -__aicore__ inline int64_t asc_get_block_num() { return asc_get_block_num_impl(); } | 71 | +[[deprecated("NOTICE: asc_get_block_num is deprecated. " |
| 72 | + "Please use block_num instead.")]] __aicore__ inline int64_t | ||
| 73 | +asc_get_block_num() | ||
| 74 | +{ | ||
| 75 | + return asc_get_block_num_impl(); | ||
| 76 | +} | ||
| 64 | 77 | ||
| 65 | __aicore__ inline int64_t asc_get_system_cycle() { return asc_get_system_cycle_impl(); } | 78 | __aicore__ inline int64_t asc_get_system_cycle() { return asc_get_system_cycle_impl(); } |
| 66 | 79 | ||
| @@ -41,6 +41,8 @@ __aicore__ inline int64_t asc_get_sys_virtual_base(); | |||
| 41 | 41 | ||
| 42 | __aicore__ inline int64_t asc_get_ctrl(); | 42 | __aicore__ inline int64_t asc_get_ctrl(); |
| 43 | 43 | ||
| 44 | +[[deprecated("NOTICE: asc_get_block_num is deprecated. " | ||
| 45 | + "Please use block_num instead.")]] | ||
| 44 | __aicore__ inline int64_t asc_get_block_num(); | 46 | __aicore__ inline int64_t asc_get_block_num(); |
| 45 | 47 | ||
| 46 | /* | 48 | /* |
| @@ -48,6 +50,11 @@ __aicore__ inline int64_t asc_get_block_num(); | |||
| 48 | * @brief:Get the index of the current running block | 50 | * @brief:Get the index of the current running block |
| 49 | * @return:The index of the current running block | 51 | * @return:The index of the current running block |
| 50 | */ | 52 | */ |
| 53 | +[[deprecated("NOTICE: asc_get_block_idx is deprecated. " | ||
| 54 | + "Please use block_idx for pure Vector, pure Cube, and Mix(1, 1). " | ||
| 55 | + "For Mix(1, 2), please use block_idx on the Cube core and " | ||
| 56 | + "block_idx * asc_get_sub_block_num() + asc_get_sub_block_id() " | ||
| 57 | + "on Vector cores instead.")]] | ||
| 51 | __aicore__ inline int64_t asc_get_block_idx(); | 58 | __aicore__ inline int64_t asc_get_block_idx(); |
| 52 | 59 | ||
| 53 | /* | 60 | /* |