[refactor] TornadoVMContextPlugins
@@ -263,14 +263,14 @@ public class OCLGraphBuilderPlugins {
});
}
- private static void registerTornadoVMContextPlugins(InvocationPlugins plugins) {
- Registration r = new Registration(plugins, TornadoVMContext.class);
- registerLocalBarrier(r);
- registerGlobalBarrier(r);
-
- registerLocalWorkGroup(r, JavaKind.Int);
+ private static void localWorkGroupPlugin(Registration r) {
+ JavaKind returnedJavaKind = JavaKind.Int;
+ registerLocalWorkGroup(r, returnedJavaKind);
+ }
+ private static void localArraysPlugins(Registration r) {
JavaKind returnedJavaKind = JavaKind.Object;
+
JavaKind elementType = OCLKind.INT.asJavaKind();
registerIntLocalArray(r, returnedJavaKind, elementType);
@@ -284,6 +284,15 @@ public class OCLGraphBuilderPlugins {
registerDoubleLocalArray(r, returnedJavaKind, elementType);
}
+ private static void registerTornadoVMContextPlugins(InvocationPlugins plugins) {
+ Registration r = new Registration(plugins, TornadoVMContext.class);
+
+ registerLocalBarrier(r);
+ registerGlobalBarrier(r);
+ localWorkGroupPlugin(r);
+ localArraysPlugins(r);
+ }
+
private static void registerTornadoVMIntrinsicsPlugins(InvocationPlugins plugins) {
final InvocationPlugin tprintfPlugin = new InvocationPlugin() {
