|
LMMC
Lamina Mathematic core
|
LMMC 当前线程生命周期与 LMMP 临时栈桥接实现. 更多...
函数 | |
| lmmc_status_t | lmmc_init (void) |
| 获取当前线程的 LMMC 生命周期租约. | |
| lmmc_status_t | lmmc_deinit (void) |
| Release one lifecycle lease owned by the current thread. | |
| lmmc_status_t | lmmc_stack_reset (size_t size) |
| Reset the current thread's LMMP temporary-stack capacity. | |
LMMC 当前线程生命周期与 LMMP 临时栈桥接实现.
在文件 init.c 中定义.
| lmmc_status_t lmmc_init | ( | void | ) |
获取当前线程的 LMMC 生命周期租约.
调用支持嵌套;首次获取时初始化当前线程的 LMMP 资源. LMMP temporary-stack allocation follows LMMP's fail-fast contract and therefore cannot be translated into LMMC_STATUS_ALLOCATION_FAILED.
LMMC_STATUS_OK on success or LMMC_STATUS_REFERENCE_LIMIT when the current thread's lease count cannot be incremented. 引用了 lmmc_init(), LMMC_STATUS_OK , 以及 LMMC_STATUS_REFERENCE_LIMIT.
被这些函数引用 lmmc_init().
| lmmc_status_t lmmc_deinit | ( | void | ) |
Release one lifecycle lease owned by the current thread.
A final matching call releases only the current thread's LMMP temporary stack state. Persistent LMMC objects use the recoverable heap bridge and may outlive deinitialization; concurrent mutation still requires external synchronization.
LMMC_STATUS_OK on success or LMMC_STATUS_NOT_INITIALIZED when no lease is active. 引用了 lmmc_deinit(), LMMC_STATUS_NOT_INITIALIZED , 以及 LMMC_STATUS_OK.
被这些函数引用 lmmc_deinit().
| lmmc_status_t lmmc_stack_reset | ( | size_t | pool_size | ) |
Reset the current thread's LMMP temporary-stack capacity.
The reset is rejected only while this thread holds nested lifecycle leases. Persistent vectors, matrices, tensors, interpolation objects, and RNG handles do not block a temporary-stack reset.
| pool_size | Requested LMMP temporary-pool size in bytes. |
LMMC_STATUS_OK on success, LMMC_STATUS_NOT_INITIALIZED without an active lease or when the lower-level stack cannot be reinitialized, or LMMC_STATUS_BUSY for a nested lease. 引用了 lmmc_stack_reset(), LMMC_STATUS_BUSY, LMMC_STATUS_NOT_INITIALIZED , 以及 LMMC_STATUS_OK.
被这些函数引用 lmmc_stack_reset().