private LongBuffer getInfoLongs(int flag) {
CL cl = CLPlatform.getLowLevelCLInterface();
NativeSizeBuffer nsb = NativeSizeBuffer.allocateDirect(1);
int ret = cl.clGetDeviceInfo(ID, flag, 0, null, nsb);
CLException.checkForError(ret, "clGetDeviceInfo failed");
LongBuffer types = Buffers.newDirectByteBuffer((int)nsb.get(0)).asLongBuffer();
ret = cl.clGetDeviceInfo(ID, flag, types.capacity()*Buffers.SIZEOF_LONG, types, null);
CLException.checkForError(ret, "clGetDeviceInfo failed");