Added a new function for the legacy Astaroth layer: acGetNode(). This functions returns a Node, which can be used to access acNode layer functions
This commit is contained in:
@@ -34,8 +34,10 @@ const char* scalararray_names[] = {AC_FOR_SCALARARRAY_HANDLES(AC_GEN_STR)};
|
||||
const char* vtxbuf_names[] = {AC_FOR_VTXBUF_HANDLES(AC_GEN_STR)};
|
||||
#undef AC_GEN_STR
|
||||
|
||||
static const int num_nodes = 1;
|
||||
static Node nodes[num_nodes];
|
||||
static const int max_num_nodes = 1;
|
||||
static Node nodes[max_num_nodes] = {0};
|
||||
|
||||
static int num_nodes = 0;
|
||||
|
||||
void
|
||||
acPrintMeshInfo(const AcMeshInfo config)
|
||||
@@ -55,12 +57,14 @@ acPrintMeshInfo(const AcMeshInfo config)
|
||||
AcResult
|
||||
acInit(const AcMeshInfo mesh_info)
|
||||
{
|
||||
num_nodes = 1;
|
||||
return acNodeCreate(0, mesh_info, &nodes[0]);
|
||||
}
|
||||
|
||||
AcResult
|
||||
acQuit(void)
|
||||
{
|
||||
num_nodes = 0;
|
||||
return acNodeDestroy(nodes[0]);
|
||||
}
|
||||
|
||||
@@ -176,3 +180,10 @@ acGetNumDevicesPerNode(void)
|
||||
ERRCHK_CUDA_ALWAYS(cudaGetDeviceCount(&num_devices));
|
||||
return num_devices;
|
||||
}
|
||||
|
||||
Node
|
||||
acGetNode(void)
|
||||
{
|
||||
ERRCHK_ALWAYS(num_nodes > 0);
|
||||
return nodes[0];
|
||||
}
|
||||
|
Reference in New Issue
Block a user