- All Known Implementing Classes:
TaskGraph
public interface TaskGraphInterface
Base interface of the Tornado API.
-
Method Summary
Modifier and TypeMethodDescriptionaddTask(TaskPackage taskPackage) It adds a task by using aTaskPackage.consumeFromDevice(Object... objects) consumeFromDevice(String uniqueTaskGraphName, Object... objects) Obtains the task-schedule name that was assigned.persistOnDevice(Object... objects) prebuiltTask(String id, String entryPoint, String filename, AccessorParameters accessorParameters) prebuiltTask(String id, String entryPoint, String filename, AccessorParameters accessorParameters, int[] atomics) Add a pre-built OpenCL task into a task-schedule with atomics region.snapshot()Function that closes a task-graph definition and creates an immutable task-graph ready for execution.task(String id, TornadoFunctions.Task code) Adds task with no parameter.<T1> TaskGraphInterfacetask(String id, TornadoFunctions.Task1<T1> code, T1 arg) Adds task with one parameter.<T1,T2, T3, T4, T5, T6, T7, T8, T9, T10>
TaskGraphInterfacetask(String id, TornadoFunctions.Task10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> code, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10) Adds task with 10 parameters.<T1,T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>
TaskGraphInterfacetask(String id, TornadoFunctions.Task11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> code, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11) It creates a task with 11 parameters.<T1,T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>
TaskGraphInterfacetask(String id, TornadoFunctions.Task12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> code, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12) It creates a task with 12 parameters.<T1,T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>
TaskGraphInterfacetask(String id, TornadoFunctions.Task13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> code, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13) It creates a task with 13 parameters.<T1,T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>
TaskGraphInterfacetask(String id, TornadoFunctions.Task14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> code, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14) It creates a task with 14 parameters.<T1,T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>
TaskGraphInterfacetask(String id, TornadoFunctions.Task15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> code, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15) It creates a task with 15 parameters.<T1,T2> TaskGraphInterface task(String id, TornadoFunctions.Task2<T1, T2> code, T1 arg1, T2 arg2) Adds task with two parameters.<T1,T2, T3>
TaskGraphInterfacetask(String id, TornadoFunctions.Task3<T1, T2, T3> code, T1 arg1, T2 arg2, T3 arg3) Add task with three parameters.<T1,T2, T3, T4>
TaskGraphInterfacetask(String id, TornadoFunctions.Task4<T1, T2, T3, T4> code, T1 arg1, T2 arg2, T3 arg3, T4 arg4) Adds task with four parameters.<T1,T2, T3, T4, T5>
TaskGraphInterfacetask(String id, TornadoFunctions.Task5<T1, T2, T3, T4, T5> code, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) Adds task with five parameters.<T1,T2, T3, T4, T5, T6>
TaskGraphInterfacetask(String id, TornadoFunctions.Task6<T1, T2, T3, T4, T5, T6> code, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) Adds task with six parameters.<T1,T2, T3, T4, T5, T6, T7>
TaskGraphInterfacetask(String id, TornadoFunctions.Task7<T1, T2, T3, T4, T5, T6, T7> code, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7) Adds task with seven parameters.<T1,T2, T3, T4, T5, T6, T7, T8>
TaskGraphInterfacetask(String id, TornadoFunctions.Task8<T1, T2, T3, T4, T5, T6, T7, T8> code, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8) Adds task with eight parameters.<T1,T2, T3, T4, T5, T6, T7, T8, T9>
TaskGraphInterfacetask(String id, TornadoFunctions.Task9<T1, T2, T3, T4, T5, T6, T7, T8, T9> code, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9) Adds task with nine parameters.transferToDevice(int mode, Object... objects) Tag a set of objects (Java objects) to be transferred to the device.transferToHost(int mode, Object... objects) Tag a set of objects (Java objects) to be transferred from the device to the host after the execution completes.
-
Method Details
-
addTask
It adds a task by using aTaskPackage.- Parameters:
taskPackage-TaskPackage- Returns:
-
}
invalid @link
{@link @TornadoAPI
-
task
Adds task with no parameter.- Parameters:
id- Task-idcode- Reference to an existing Java method with one argument- Returns:
TaskGraphInterface
-
task
Adds task with one parameter.- Parameters:
id- Task-idcode- Reference to an existing Java method with one argumentarg- Argument to the method- Returns:
TaskGraphInterface
-
task
Adds task with two parameters.- Parameters:
id- Task-idcode- Reference to an existing Java method with two argumentsarg1- Argument 1 to the methodarg2- Argument 2 to the method- Returns:
TaskGraphInterface
-
task
<T1,T2, TaskGraphInterface taskT3> (String id, TornadoFunctions.Task3<T1, T2, T3> code, T1 arg1, T2 arg2, T3 arg3) Add task with three parameters.- Parameters:
id- Task-idcode- Reference to an existing Java method with three argumentsarg1- Argument 1 to the methodarg2- Argument 2 to the methodarg3- Argument 3 to the method- Returns:
TaskGraphInterface
-
task
<T1,T2, TaskGraphInterface taskT3, T4> (String id, TornadoFunctions.Task4<T1, T2, T3, T4> code, T1 arg1, T2 arg2, T3 arg3, T4 arg4) Adds task with four parameters.- Parameters:
id- Task-idcode- Reference to an existing Java method with four argumentsarg1- Argument 1 to the methodarg2- Argument 2 to the methodarg3- Argument 3 to the methodarg4- Argument 4 to the method- Returns:
TaskGraphInterface
-
task
<T1,T2, TaskGraphInterface taskT3, T4, T5> (String id, TornadoFunctions.Task5<T1, T2, T3, T4, T5> code, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) Adds task with five parameters.- Parameters:
id- Task-idcode- Reference to an existing Java method with five argumentsarg1- Argument 1 to the methodarg2- Argument 2 to the methodarg3- Argument 3 to the methodarg4- Argument 4 to the methodarg5- Argument 5 to the method- Returns:
TaskGraphInterface
-
task
<T1,T2, TaskGraphInterface taskT3, T4, T5, T6> (String id, TornadoFunctions.Task6<T1, T2, T3, T4, T5, T6> code, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) Adds task with six parameters.- Parameters:
id- Task-idcode- Reference to an existing Java method with six argumentsarg1- Argument 1 to the methodarg2- Argument 2 to the methodarg3- Argument 3 to the methodarg4- Argument 4 to the methodarg5- Argument 5 to the methodarg6- Argument 6 to the method- Returns:
TaskGraphInterface
-
task
<T1,T2, TaskGraphInterface taskT3, T4, T5, T6, T7> (String id, TornadoFunctions.Task7<T1, T2, T3, T4, T5, T6, T7> code, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7) Adds task with seven parameters.- Parameters:
id- Task-idcode- Reference to an existing Java method with seven argumentsarg1- Argument 1 to the methodarg2- Argument 2 to the methodarg3- Argument 3 to the methodarg4- Argument 4 to the methodarg5- Argument 5 to the methodarg6- Argument 6 to the methodarg7- Argument 7 to the method- Returns:
TaskGraphInterface
-
task
<T1,T2, TaskGraphInterface taskT3, T4, T5, T6, T7, T8> (String id, TornadoFunctions.Task8<T1, T2, T3, T4, T5, T6, T7, T8> code, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8) Adds task with eight parameters.- Parameters:
id- Task-idcode- Reference to an existing Java method with eight argumentsarg1- Argument 1 to the methodarg2- Argument 2 to the methodarg3- Argument 3 to the methodarg4- Argument 4 to the methodarg5- Argument 5 to the methodarg6- Argument 6 to the methodarg7- Argument 7 to the methodarg8- Argument 8 to the method- Returns:
TaskGraphInterface
-
task
<T1,T2, TaskGraphInterface taskT3, T4, T5, T6, T7, T8, T9> (String id, TornadoFunctions.Task9<T1, T2, T3, T4, T5, T6, T7, T8, T9> code, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9) Adds task with nine parameters.- Parameters:
id- Task-idcode- Reference to an existing Java method with nine argumentsarg1- Argument 1 to the methodarg2- Argument 2 to the methodarg3- Argument 3 to the methodarg4- Argument 4 to the methodarg5- Argument 5 to the methodarg6- Argument 6 to the methodarg7- Argument 7 to the methodarg8- Argument 8 to the methodarg9- Argument 9 to the method- Returns:
TaskGraphInterface
-
task
<T1,T2, TaskGraphInterface taskT3, T4, T5, T6, T7, T8, T9, T10> (String id, TornadoFunctions.Task10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> code, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10) Adds task with 10 parameters.- Parameters:
id- Task-idcode- Reference to an existing Java method with 10 argumentsarg1- Argument 1 to the methodarg2- Argument 2 to the methodarg3- Argument 3 to the methodarg4- Argument 4 to the methodarg5- Argument 5 to the methodarg6- Argument 6 to the methodarg7- Argument 7 to the methodarg8- Argument 8 to the methodarg9- Argument 9 to the methodarg10- Argument 10 to the method- Returns:
TaskGraphInterface
-
task
<T1,T2, TaskGraphInterface taskT3, T4, T5, T6, T7, T8, T9, T10, T11> (String id, TornadoFunctions.Task11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> code, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11) It creates a task with 11 parameters.- Parameters:
id- Task-idcode- Reference to an existing Java method with 10 argumentsarg1- Argument 1 to the methodarg2- Argument 2 to the methodarg3- Argument 3 to the methodarg4- Argument 4 to the methodarg5- Argument 5 to the methodarg6- Argument 6 to the methodarg7- Argument 7 to the methodarg8- Argument 8 to the methodarg9- Argument 9 to the methodarg10- Argument 10 to the methodarg11- Argument 11 to the method- Returns:
TaskGraphInterface
-
task
<T1,T2, TaskGraphInterface taskT3, T4, T5, T6, T7, T8, T9, T10, T11, T12> (String id, TornadoFunctions.Task12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> code, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12) It creates a task with 12 parameters.- Parameters:
id- Task-idcode- Reference to an existing Java method with 10 argumentsarg1- Argument 1 to the methodarg2- Argument 2 to the methodarg3- Argument 3 to the methodarg4- Argument 4 to the methodarg5- Argument 5 to the methodarg6- Argument 6 to the methodarg7- Argument 7 to the methodarg8- Argument 8 to the methodarg9- Argument 9 to the methodarg10- Argument 10 to the methodarg11- Argument 11 to the methodarg12- Argument 12 to the method- Returns:
TaskGraphInterface
-
task
<T1,T2, TaskGraphInterface taskT3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> (String id, TornadoFunctions.Task13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> code, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13) It creates a task with 13 parameters.- Parameters:
id- Task-idcode- Reference to an existing Java method with 10 argumentsarg1- Argument 1 to the methodarg2- Argument 2 to the methodarg3- Argument 3 to the methodarg4- Argument 4 to the methodarg5- Argument 5 to the methodarg6- Argument 6 to the methodarg7- Argument 7 to the methodarg8- Argument 8 to the methodarg9- Argument 9 to the methodarg10- Argument 10 to the methodarg11- Argument 11 to the methodarg12- Argument 12 to the methodarg13- Argument 13 to the method- Returns:
TaskGraphInterface
-
task
<T1,T2, TaskGraphInterface taskT3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> (String id, TornadoFunctions.Task14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> code, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14) It creates a task with 14 parameters.- Parameters:
id- Task-idcode- Reference to an existing Java method with 10 argumentsarg1- Argument 1 to the methodarg2- Argument 2 to the methodarg3- Argument 3 to the methodarg4- Argument 4 to the methodarg5- Argument 5 to the methodarg6- Argument 6 to the methodarg7- Argument 7 to the methodarg8- Argument 8 to the methodarg9- Argument 9 to the methodarg10- Argument 10 to the methodarg11- Argument 11 to the methodarg12- Argument 12 to the methodarg13- Argument 13 to the methodarg14- Argument 14 to the method- Returns:
TaskGraphInterface
-
task
<T1,T2, TaskGraphInterface taskT3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> (String id, TornadoFunctions.Task15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> code, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15) It creates a task with 15 parameters.- Parameters:
id- Task-idcode- Reference to an existing Java method with 15 argumentsarg1- Argument 1 to the methodarg2- Argument 2 to the methodarg3- Argument 3 to the methodarg4- Argument 4 to the methodarg5- Argument 5 to the methodarg6- Argument 6 to the methodarg7- Argument 7 to the methodarg8- Argument 8 to the methodarg9- Argument 9 to the methodarg10- Argument 10 to the methodarg11- Argument 11 to the methodarg12- Argument 12 to the methodarg13- Argument 13 to the methodarg14- Argument 14 to the methodarg15- Argument 15 to the method- Returns:
TaskGraphInterface
-
prebuiltTask
TaskGraphInterface prebuiltTask(String id, String entryPoint, String filename, AccessorParameters accessorParameters) -
prebuiltTask
TaskGraphInterface prebuiltTask(String id, String entryPoint, String filename, AccessorParameters accessorParameters, int[] atomics) Add a pre-built OpenCL task into a task-schedule with atomics region.- Parameters:
id- Task-identryPoint- Kernel's name of the entry pointfilename- Input OpenCL C Kernelatomics- Atomics region.- Returns:
TaskGraphInterface
-
getTaskGraphName
String getTaskGraphName()Obtains the task-schedule name that was assigned.- Returns:
String
-
transferToDevice
Tag a set of objects (Java objects) to be transferred to the device. There are three modes:DataTransferMode.FIRST_EXECUTION: it transfers data only the first execution of the task-graph (READ ONLY)DataTransferMode.EVERY_EXECUTION: it transfers data for every execution of the task-graph (READ/WRITE)- Parameters:
mode- A mode fromDataTransferModeobjects- List of Java objects (usually arrays) to be transferred to the device.- Returns:
TaskGraphInterface
-
consumeFromDevice
-
consumeFromDevice
-
transferToHost
Tag a set of objects (Java objects) to be transferred from the device to the host after the execution completes. There are two modes:DataTransferMode.EVERY_EXECUTION: transfers data for every execution of the task-graph (WRITE only)DataTransferMode.UNDER_DEMAND: it transfers data only under demand. Data are not transferred unless the execution-plan, anTornadoExecutionPlanobject, invokes the `transferToHost` function. This is used for optimization of data transfers.- Parameters:
mode- A mode fromDataTransferModeobjects- List of Java objects (usually arrays) to be transferred to the device.- Returns:
TaskGraphInterface
-
persistOnDevice
-
snapshot
ImmutableTaskGraph snapshot()Function that closes a task-graph definition and creates an immutable task-graph ready for execution.- Returns:
ImmutableTaskGraph
-