diff --git a/sw/snRuntime/src/team.c b/sw/snRuntime/src/team.c index 5290e1d28d..e5b83e61c4 100644 --- a/sw/snRuntime/src/team.c +++ b/sw/snRuntime/src/team.c @@ -26,6 +26,8 @@ extern uint32_t snrt_cluster_compute_core_num(); extern int snrt_is_compute_core(); +extern int snrt_cluster_is_last_compute_core(); + extern int snrt_is_dm_core(); extern uint32_t snrt_cluster_dm_core_num(); diff --git a/sw/snRuntime/src/team.h b/sw/snRuntime/src/team.h index 1b49bfaad4..eb06a4488a 100644 --- a/sw/snRuntime/src/team.h +++ b/sw/snRuntime/src/team.h @@ -59,6 +59,10 @@ inline int __attribute__((const)) snrt_is_compute_core() { return snrt_cluster_core_idx() < snrt_cluster_compute_core_num(); } +inline int __attribute__((const)) snrt_cluster_is_last_compute_core() { + return snrt_cluster_core_idx() == (snrt_cluster_compute_core_num() - 1); +} + inline int __attribute__((const)) snrt_is_dm_core() { return !snrt_is_compute_core(); }