Interface LogicalCompute
access this type via: io.compute.LogicalCompute (provides, requires or uses)
Interface that provides a high level abstraction available to the caller to enable them to use compute devices on the system that are not the host device
Functions
LogicalCompute()
void createIntArray(char name[], int length)
void createIntMatrix(char name[], int rows, int cols)
void writeIntArray(char name[], int values[])
int[] readIntArray(char name[])
void writeIntMatrix(char name[], int values[][])
int[][] readIntMatrix(char name[])
void createDecArray(char name[], int length)
void createDecMatrix(char name[], int rows, int cols)
void writeDecArray(char name[], dec values[])
dec[] readDecArray(char name[])
void writeDecMatrix(char name[], dec values[][])
dec[][] readDecMatrix(char name[])
void destroyMemoryArea(char name[])
void loadProgram(char path[], char name[])
String[] getPrograms()
void runProgram(char program[], String params[])
LogicalCompute()
Constructor, allows the implementing component to initialise the LogicalCompute with programs and data it will need to operate
void createIntArray(char name[], int length)
Creates a 1-D buffer with 'length' cells on some compute device available to the system. The user of this interface will use the given 'name' parameter to access this buffer so they should track the name appropriately
void createIntMatrix(char name[], int rows, int cols)
Creates a 2-D buffer on some compute device available to the system. The user of this interface will use the given 'name' parameter to access this buffer so they should track the name appropriately
void writeIntArray(char name[], int values[])
Writes the values to the 1-D buffer refered to by 'name'
int[] readIntArray(char name[])
Reads the values from the 1-D buffer referred to by 'name'
void writeIntMatrix(char name[], int values[][])
Writes the values to the 2-D buffer referred to by 'name'
int[][] readIntMatrix(char name[])
Reads the values from the 2-D buffer referred to by 'name'
void createDecArray(char name[], int length)
Creates a 1-D buffer with 'length' cells on some compute device available to the system. The user of this interface will use the given 'name' parameter to access this buffer so they should track the name appropriately
void createDecMatrix(char name[], int rows, int cols)
Creates a 2-D buffer on some compute device available to the system. The user of this interface will use the given 'name' parameter to access this buffer so they should track the name appropriately
void writeDecArray(char name[], dec values[])
Writes the values to the 1-D buffer referred to by 'name'
dec[] readDecArray(char name[])
Reads the values to the 1-D buffer referred to by 'name'
void writeDecMatrix(char name[], dec values[][])
Writes the values 2-D buffer referred to by 'name'
dec[][] readDecMatrix(char name[])
Reads the values 2-D buffer referred to by 'name'
void destroyMemoryArea(char name[])
Deallocates the buffer referred to by 'name' on the external compute device
void loadProgram(char path[], char name[])
Gives this LogicalCompute the ability to execute the source code in the file given by 'path'. The 'name' parameter will be used as the first parameter of the 'runProgram' function of this interface
String[] getPrograms()
Returns the names of all programs loaded onto this LogicalCompute
void runProgram(char program[], String params[])
Attempts to run the program referred to by the first parameter, using the values 'params' as arguments for the program being run. 'params' should be a set of strings that match names of buffers that have been created on the LogicalCompute