Example #1
0
  static {
    if (enableInstructionDecodeViewer
        && ((instructionListenerClassName == null) || instructionListenerClassName.equals(""))) {
      instructionListenerClassName = InstructionViewer.class.getName();
    }

    if ((instructionListenerClassName != null) && !instructionListenerClassName.equals("")) {
      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) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
    }

    if (dumpFlags) {
      System.out.println(propPkgName + ".executionMode{GPU|ACC|CPU|JTP|SEQ}=" + executionMode);
      System.out.println(
          propPkgName + ".logLevel{OFF|FINEST|FINER|FINE|WARNING|SEVERE|ALL}=" + logger.getLevel());
      System.out.println(propPkgName + ".enableProfiling{true|false}=" + enableProfiling);
      System.out.println(propPkgName + ".enableProfilingCSV{true|false}=" + enableProfilingCSV);
      System.out.println(propPkgName + ".enableVerboseJNI{true|false}=" + enableVerboseJNI);
      System.out.println(
          propPkgName
              + ".enableVerboseJNIOpenCLResourceTracking{true|false}="
              + enableVerboseJNIOpenCLResourceTracking);
      System.out.println(
          propPkgName + ".enableShowGeneratedOpenCL{true|false}=" + enableShowGeneratedOpenCL);
      System.out.println(
          propPkgName
              + ".enableExecutionModeReporting{true|false}="
              + enableExecutionModeReporting);
      System.out.println(
          propPkgName
              + ".enableInstructionDecodeViewer{true|false}="
              + enableInstructionDecodeViewer);
      System.out.println(
          propPkgName
              + ".instructionListenerClassName{<class name which extends com.amd.aparapi.Config.InstructionListener>}="
              + instructionListenerClassName);
    }
  }