LAPI_Addr_get 子例程

用途

检索先前使用 LAPI_Addr_set注册的函数地址。

可用性库 (liblapi_r.a)

C 语法

#include <lapi.h>
 
int LAPI_Addr_get(hndl, addr, addr_hndl)
lapi_handle_t  hndl;
void         **addr;
int            addr_hndl;

FORTRAN 语法

include 'lapif.h'
 
LAPI_ADDR_GET(hndl, addr, addr_hndl, ierror)
INTEGER hndl
INTEGER (KIND=LAPI_ADDR_TYPE) :: addr
INTEGER addr_hndl
INTEGER ierror
 

描述

Type of call: 本地地址操作

使用此子例程来获取先前已向 LAPI 注册且与索引 addr_hndl相关联的指针。 The value of 地址 (addr_hndl) must be in the range 1 <= 地址 (addr_hndl) < LOC_ADDRTBL_SZ.

参数

INPUT
hndl
指定 LAPI 句柄。
addr_hndl
指定要检索的函数地址的索引。 您应该先前已使用 LAPI_Addr_set在此索引处注册了地址。 The value of this parameter must be in the range 1 <= 地址 (addr_hndl) < LOC_ADDRTBL_SZ.
输出
地址
返回用户向 LAPI 注册的函数地址。
ierror
指定 FORTRAN 返回码。 这始终是最后一个参数。

C 示例

要检索先前使用 LAPI_Addr_set注册的头处理程序地址:

lapi_handle_t   hndl;      /* the LAPI handle                       */
void          **addr;      /* the address to retrieve               */
int             addr_hndl; /* the index returned from LAPI_Addr_set */

⋮            

addr_hndl = 1;
LAPI_Addr_get(hndl, &addr, addr_hndl);
      
/* addr now contains the address that was previously registered */ 
/* using LAPI_Addr_set                                          */

返回值

成功 (LAPI_SUCCESS)
指示函数调用已成功完成。
LAPI_ERR_ADDR_HNDL_RANGE
Indicates that the value of 地址 (addr_hndl) is not in the range 1 <= 地址 (addr_hndl) < LOC_ADDRTBL_SZ.
LAPI_ERR_HNDL_INVALID
指示传入的 hndl 无效 (未初始化或处于终止状态)。
LAPI_ERR_RET_PTR_NULL
指示 addr 指针的值为 NULL (在 C 中) 或 addr 的值为 LAPI_ADDR_NULL (在 FORTRAN 中)。

位置

/usr/lib/liblapi_r.a