LMMC
Lamina Mathematic core
载入中...
搜索中...
未找到
init.c 文件参考

LMMC 当前线程生命周期与 LMMP 临时栈桥接实现. 更多...

#include "lmmc/init.h"
#include <lmmp.h>
init.c 的引用(Include)关系图:

浏览该文件的源代码.

函数

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_init()

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.

在文件 init.c 第 11 行定义.

引用了 lmmc_init(), LMMC_STATUS_OK , 以及 LMMC_STATUS_REFERENCE_LIMIT.

被这些函数引用 lmmc_init().

函数调用图:
这是这个函数的调用关系图:

◆ lmmc_deinit()

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.

在文件 init.c 第 22 行定义.

引用了 lmmc_deinit(), LMMC_STATUS_NOT_INITIALIZED , 以及 LMMC_STATUS_OK.

被这些函数引用 lmmc_deinit().

函数调用图:
这是这个函数的调用关系图:

◆ lmmc_stack_reset()

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_sizeRequested 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.
注解
LMMP allocation failure remains fail-fast and does not return a recoverable LMMC status.

在文件 init.c 第 33 行定义.

引用了 lmmc_stack_reset(), LMMC_STATUS_BUSY, LMMC_STATUS_NOT_INITIALIZED , 以及 LMMC_STATUS_OK.

被这些函数引用 lmmc_stack_reset().

函数调用图:
这是这个函数的调用关系图: