Topologies

Overview

These APIs are for More…

// global functions

XPUM_API xpum_result_t xpumGetTopology(
    xpum_device_id_t deviceId,
    xpum_topology_t* topology,
    long unsigned int* memSize
    );

XPUM_API xpum_result_t xpumExportTopology2XML(char xmlBuffer[], int* memSize);

XPUM_API xpum_result_t xpumGetXelinkTopology(
    xpum_xelink_topo_info xelink_topo[],
    int* count
    );

Detailed Documentation

These APIs are for

Global Functions

XPUM_API xpum_result_t xpumGetTopology(
    xpum_device_id_t deviceId,
    xpum_topology_t* topology,
    long unsigned int* memSize
    )

Get topology by device.

Support Platform: Linux

Parameters:

deviceId

IN: The device id to query policy

topology

OUT: The topology on device with deviceId

memSize

IN/OUT: When topology is NULL, memSize will be filled with the size of needed by topology data struct, and return. When topology is not NULL, memSize denotes the size of topology, memsize should be equal to or large than the size of topology data struct, when return, the memSize will store real size of xpum_topology_t data struct returned by topology

Returns:

XPUM_API xpum_result_t xpumExportTopology2XML(char xmlBuffer[], int* memSize)

Export topology by node.

Support Platform: Linux

Parameters:

xmlBuffer

OUT: The topology on node

memSize

IN/OUT: When xmlBuffer is NULL, memSize will be filled with the size of needed by XML, and return. When xmlBuffer is not NULL, memSize denotes the size of xmlBuffer, memsize should be equal to or large than the size of XML, when return, the memSize will store real size of XML returned by xmlBuffer

Returns:

XPUM_API xpum_result_t xpumGetXelinkTopology(
    xpum_xelink_topo_info xelink_topo[],
    int* count
    )

Get xelink topology.

Support Platform: Linux

Parameters:

xelink_topo

OUT: The xelink topology

count

IN/OUT: When xelink_topo is NULL, count will be filled with the needed size of xelink_topo, and return. When xelink_topo is not NULL, count denotes the size of xelink_topo, count should be equal to or large than the size of xelink_topo, when return, the count will store real size of xelink_topo.

Returns:

xpum_result_t