Skip to content

[BOUNTY $25] Allows multiple kernels to run at the same time #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<name>Aparapi</name>
Expand Down Expand Up @@ -100,6 +100,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
27 changes: 11 additions & 16 deletions src/main/java/com/aparapi/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ to national security controls as identified on the Commerce Control List (curren
import com.aparapi.internal.jni.*;
import com.aparapi.internal.tool.*;

import java.lang.reflect.InvocationTargetException;
import java.util.logging.*;

/**
Expand Down Expand Up @@ -141,7 +142,7 @@ public class Config extends ConfigJNI{
// Debugging related flags
public static final boolean verboseComparitor = Boolean.getBoolean(propPkgName + ".verboseComparitor");

public static final boolean dumpFlags = Boolean.getBoolean(propPkgName + ".dumpFlags");
private static final boolean dumpFlags = Boolean.getBoolean(propPkgName + ".dumpFlags");

// Individual bytecode support related flags
public static final boolean enablePUTFIELD = Boolean.getBoolean(propPkgName + ".enable.PUTFIELD");
Expand Down Expand Up @@ -169,11 +170,11 @@ public class Config extends ConfigJNI{

public static final boolean enableSWITCH = Boolean.getBoolean(propPkgName + ".enable.SWITCH");

public static boolean enableShowFakeLocalVariableTable = Boolean.getBoolean(propPkgName + ".enableShowFakeLocalVariableTable");
public static final boolean enableShowFakeLocalVariableTable = Boolean.getBoolean(propPkgName + ".enableShowFakeLocalVariableTable");

public static final boolean enableInstructionDecodeViewer = Boolean.getBoolean(propPkgName + ".enableInstructionDecodeViewer");
private static final boolean enableInstructionDecodeViewer = Boolean.getBoolean(propPkgName + ".enableInstructionDecodeViewer");

public static String instructionListenerClassName = System.getProperty(propPkgName + ".instructionListenerClass");
private static String instructionListenerClassName = System.getProperty(propPkgName + ".instructionListenerClass");

public static InstructionListener instructionListener = null;

Expand All @@ -195,24 +196,18 @@ public interface InstructionListener{
System.out.println("Exception " + e + " in Aparapi logging setup");
e.printStackTrace();
}
};
}

static {
if (enableInstructionDecodeViewer && ((instructionListenerClassName == null) || instructionListenerClassName.equals(""))) {
static {
if (enableInstructionDecodeViewer && ((instructionListenerClassName == null) || instructionListenerClassName.isEmpty())) {
instructionListenerClassName = InstructionViewer.class.getName();
}

if ((instructionListenerClassName != null) && !instructionListenerClassName.equals("")) {
if ((instructionListenerClassName != null) && !instructionListenerClassName.isEmpty()) {
try {
final Class<?> instructionListenerClass = Class.forName(instructionListenerClassName);
instructionListener = (InstructionListener) instructionListenerClass.newInstance();
} catch (final ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (final InstantiationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (final IllegalAccessException e) {
instructionListener = (InstructionListener) instructionListenerClass.getConstructor().newInstance();
} catch (final ClassNotFoundException | IllegalAccessException | InstantiationException | InvocationTargetException | NoSuchMethodException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Expand Down
Loading