Context assert not null added
@@ -110,7 +110,7 @@ public final class OCLDriver extends TornadoLogger implements TornadoAccelerator
private void installDevices(int platformIndex, OCLPlatform platform, final OptionValues options, final HotSpotJVMCIRuntime vmRuntime, TornadoVMConfig vmConfig) {
info("OpenCL[%d]: Platform %s", platformIndex, platform.getName());
final OCLContext context = platform.createContext();
- if (context != null) {
+ assert context != null : "OpenCL context is null";
contexts.add(context);
final int numDevices = context.getNumDevices();
info("OpenCL[%d]: Has %d devices...", platformIndex, numDevices);
@@ -122,7 +122,6 @@ public final class OCLDriver extends TornadoLogger implements TornadoAccelerator
backends[platformIndex][j] = createOCLBackend(options, vmRuntime, vmConfig, context, j);
}
}
- }
protected void discoverDevices(final OptionValues options, final HotSpotJVMCIRuntime vmRuntime, TornadoVMConfig vmConfig) {
final int numPlatforms = OpenCL.getNumPlatforms();
