本文整理汇总了Java中org.bridj.Pointer类的典型用法代码示例。如果您正苦于以下问题:Java Pointer类的具体用法?Java Pointer怎么用?Java Pointer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Pointer类属于org.bridj包,在下文中一共展示了Pointer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: kernel_14740318
import org.bridj.Pointer; //导入依赖的package包/类
public static void kernel_14740318(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int[] paramArrayOfInt)
{
CLDevice.QueueProperties[] arrayOfQueueProperties = { CLDevice.QueueProperties.ProfilingEnable };
CLQueue localCLQueue = context.createDefaultQueue(arrayOfQueueProperties);
String[] arrayOfString = { kernel_14740318 };
CLKernel[] arrayOfCLKernel = context.createProgram(arrayOfString).createKernels();
CLKernel localCLKernel = arrayOfCLKernel[0];
int i = paramInt2;
int j = paramInt3;
int k = paramInt4;
CLBuffer localCLBuffer = context.createBuffer(CLMem.Usage.InputOutput, Pointer.pointerToInts(paramArrayOfInt), true);
localCLKernel.setArgs(new Object[] { paramInt1, i, j, k, localCLBuffer });
int m = paramInt1 - paramInt4 / 1;
CLEvent[] arrayOfCLEvent = { null };
CLEvent localCLEvent = localCLKernel.enqueueNDRange(localCLQueue, new int[] { m }, arrayOfCLEvent);
localCLQueue.finish();
localCLBuffer.read(localCLQueue, new CLEvent[] { localCLEvent }).getInts(paramArrayOfInt);
}
示例2: kernel_112397371
import org.bridj.Pointer; //导入依赖的package包/类
public static void kernel_112397371(int paramInt1, int paramInt2, int paramInt3, float paramFloat, int paramInt4, int paramInt5, int paramInt6, short[] paramArrayOfShort)
{
CLDevice.QueueProperties[] arrayOfQueueProperties = { CLDevice.QueueProperties.ProfilingEnable };
CLQueue localCLQueue = context.createDefaultQueue(arrayOfQueueProperties);
String[] arrayOfString = { kernel_112397371 };
CLKernel[] arrayOfCLKernel = context.createProgram(arrayOfString).createKernels();
CLKernel localCLKernel = arrayOfCLKernel[0];
int i = paramInt3;
float f = paramFloat;
int j = paramInt4;
int k = paramInt5;
int m = paramInt6;
CLBuffer localCLBuffer = context.createBuffer(CLMem.Usage.InputOutput, Pointer.pointerToShorts(paramArrayOfShort), true);
localCLKernel.setArgs(new Object[] { paramInt1, paramInt2, i, f, j, k, m, localCLBuffer });
int n = paramInt1 - paramInt4 / 1;
int i1 = paramInt2 - paramInt5 / 1;
CLEvent[] arrayOfCLEvent = { null };
CLEvent localCLEvent = localCLKernel.enqueueNDRange(localCLQueue, new int[] { n, i1 }, arrayOfCLEvent);
localCLQueue.finish();
localCLBuffer.read(localCLQueue, new CLEvent[] { localCLEvent }).getShorts(paramArrayOfShort);
}
示例3: kernel_1672197010
import org.bridj.Pointer; //导入依赖的package包/类
public static void kernel_1672197010(int paramInt1, float paramFloat1, float paramFloat2, float paramFloat3, float[] paramArrayOfFloat1, float paramFloat4, float paramFloat5, float[] paramArrayOfFloat2, float paramFloat6, float paramFloat7, float paramFloat8, float paramFloat9, int paramInt2, float[] paramArrayOfFloat3, float paramFloat10)
{
CLDevice.QueueProperties[] arrayOfQueueProperties = { CLDevice.QueueProperties.ProfilingEnable };
CLQueue localCLQueue = context.createDefaultQueue(arrayOfQueueProperties);
String[] arrayOfString = { kernel_1672197010 };
CLKernel[] arrayOfCLKernel = context.createProgram(arrayOfString).createKernels();
CLKernel localCLKernel = arrayOfCLKernel[0];
float f1 = paramFloat1;
float f2 = paramFloat2;
float f3 = paramFloat3;
CLBuffer localCLBuffer1 = context.createBuffer(CLMem.Usage.InputOutput, Pointer.pointerToFloats(paramArrayOfFloat1), true);
float f4 = paramFloat4;
float f5 = paramFloat5;
CLBuffer localCLBuffer2 = context.createBuffer(CLMem.Usage.Input, Pointer.pointerToFloats(paramArrayOfFloat2), true);
float f6 = paramFloat6;
float f7 = paramFloat7;
float f8 = paramFloat8;
float f9 = paramFloat9;
int i = paramInt2;
CLBuffer localCLBuffer3 = context.createBuffer(CLMem.Usage.InputOutput, Pointer.pointerToFloats(paramArrayOfFloat3), true);
float f10 = paramFloat10;
localCLKernel.setArgs(new Object[] { paramInt1, f1, f2, f3, localCLBuffer1, f4, f5, localCLBuffer2, f6, f7, f8, f9, i, localCLBuffer3, f10 });
int j = paramInt1 - paramInt2 / 1;
CLEvent[] arrayOfCLEvent = { null };
CLEvent localCLEvent = localCLKernel.enqueueNDRange(localCLQueue, new int[] { j }, arrayOfCLEvent);
localCLQueue.finish();
localCLBuffer1.read(localCLQueue, new CLEvent[] { localCLEvent }).getFloats(paramArrayOfFloat1);
localCLBuffer3.read(localCLQueue, new CLEvent[] { localCLEvent }).getFloats(paramArrayOfFloat3);
}
示例4: getValue
import org.bridj.Pointer; //导入依赖的package包/类
public String getValue() throws ClingoException {
Pointer<SizeT> size = Pointer.allocateSizeT();
handleError(LIB.clingo_configuration_value_get_size(pointer, key, size), "Error reading the configuration value size!");
Pointer<Byte> value = Pointer.allocateBytes(size.getInt());
handleError(LIB.clingo_configuration_value_get(pointer, key, value, size.getInt()), "Error reading the configuration value!");
return value.getCString();
}
示例5: list
import org.bridj.Pointer; //导入依赖的package包/类
public static List<TheoryTerm> list(final Pointer<clingo_theory_atoms> atoms, Pointer<Integer> pointer, long size) {
if (pointer == null) {
return null;
}
return new PointerList<TheoryTerm, Integer>(pointer, size) {
@Override
protected TheoryTerm getItem(Integer p) {
return new TheoryTerm(atoms, p);
}
};
}
示例6: array
import org.bridj.Pointer; //导入依赖的package包/类
public static <T extends NativeObject, E extends ASTObject<T>> Pointer<T> array(List<E> data) {
if (data != null && !data.isEmpty()) {
E tmp = data.get(0);
return ASTObject.array(data, tmp.getNativeClass());
}
return null;
}
示例7: find
import org.bridj.Pointer; //导入依赖的package包/类
public SymbolicAtom find(Symbol atom) throws ClingoException {
Pointer<Long> iter = Pointer.allocateLong();
handleError(LIB.clingo_symbolic_atoms_find(pointer, atom.getStructObject(), iter), "Error reading the symbolic atoms by symbol");
SymbolicAtomIterator iterator = new SymbolicAtomIterator(pointer, iter.get(), 0);
if (iterator.isValidIterator()) {
return iterator.get();
}
return null;
}
示例8: __iplCreateAmbisonicsBinauralEffect
import org.bridj.Pointer; //导入依赖的package包/类
public static IPLerror __iplCreateAmbisonicsBinauralEffect(BinauralRenderer renderer,
IPLAudioFormat inputFormat,
IPLAudioFormat outputFormat,
Pointer<Pointer<?>> effect) {
return IPLerror.fromValue(__iplCreateAmbisonicsBinauralEffect(getPeer(PointerHandle.reference(renderer)),
getPeer(getPointer(inputFormat)), getPeer(getPointer(outputFormat)), getPeer(effect)));
}
示例9: create
import org.bridj.Pointer; //导入依赖的package包/类
@Override
public clingo_ast_theory_guard create() {
clingo_ast_theory_guard g = new clingo_ast_theory_guard();
g.operator_name(Pointer.pointerToCString(operatorName));
g.term(term.create());
return g;
}
示例10: create
import org.bridj.Pointer; //导入依赖的package包/类
@Override
public clingo_ast_theory_function create() {
clingo_ast_theory_function fun = new clingo_ast_theory_function();
fun.name(Pointer.pointerToCString(name));
fun.arguments(ASTObject.array(arguments));
fun.size(ASTObject.size(arguments));
return fun;
}
示例11: getConfiguration
import org.bridj.Pointer; //导入依赖的package包/类
public Configuration getConfiguration() throws ClingoException {
Pointer<Pointer<clingo_configuration>> config = Pointer.allocatePointer(clingo_configuration.class);
handleError(LIB.clingo_control_configuration(pointer, config), "Error reading the configuration!");
Pointer<Integer> key = Pointer.allocateInt();
handleError(LIB.clingo_configuration_root(config.get(), key), "Error reading the configuration root key!");
return new Configuration(config.get(), key.getInt());
}
示例12: kernel_1711690764
import org.bridj.Pointer; //导入依赖的package包/类
public static void kernel_1711690764(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int[][] paramArrayOfInt1, int[][] paramArrayOfInt2, int[][] paramArrayOfInt3)
{
CLDevice.QueueProperties[] arrayOfQueueProperties = { CLDevice.QueueProperties.ProfilingEnable };
CLQueue localCLQueue = context.createDefaultQueue(arrayOfQueueProperties);
String[] arrayOfString = { kernel_1711690764 };
CLKernel[] arrayOfCLKernel = context.createProgram(arrayOfString).createKernels();
CLKernel localCLKernel = arrayOfCLKernel[0];
int i = paramInt3;
int j = paramInt4;
int k = paramInt5;
CLBuffer localCLBuffer1 = context.createBuffer(CLMem.Usage.Input, Pointer.pointerToInts(paramArrayOfInt1), true);
CLBuffer localCLBuffer2 = context.createBuffer(CLMem.Usage.InputOutput, Pointer.pointerToInts(paramArrayOfInt2), true);
CLBuffer localCLBuffer3 = context.createBuffer(CLMem.Usage.Input, Pointer.pointerToInts(paramArrayOfInt3), true);
localCLKernel.setArgs(new Object[] { paramInt1, paramInt2, i, j, k, localCLBuffer1, localCLBuffer2, localCLBuffer3 });
int m = paramInt1 - paramInt5 / 1;
int n = paramInt2 - paramInt3 / 1;
CLEvent[] arrayOfCLEvent = { null };
CLEvent localCLEvent = localCLKernel.enqueueNDRange(localCLQueue, new int[] { m, n }, arrayOfCLEvent);
localCLQueue.finish();
Pointer localPointer1 = localCLBuffer2.read(localCLQueue, new CLEvent[] { localCLEvent });
long l = localPointer1.getValidElements();
for (int i1 = 0; i1 < l; i1++)
{
Pointer localPointer2 = (Pointer)localPointer1.get(i1);
localPointer2.getInts(paramArrayOfInt2[i1]);
}
}
示例13: clingo_ast_minimize
import org.bridj.Pointer; //导入依赖的package包/类
public clingo_ast_minimize(Pointer pointer) {
super(pointer);
}
示例14: addAtom
import org.bridj.Pointer; //导入依赖的package包/类
public int addAtom() throws ClingoException {
Pointer<Integer> ret = Pointer.allocateInt();
handleError(LIB.clingo_backend_add_atom(pointer, ret), "Error add the atom to the backend!");
return ret.getInt();
}
示例15: getImageBytes
import org.bridj.Pointer; //导入依赖的package包/类
@Override
public ByteBuffer getImageBytes()
{
if (this.disposed.get())
{
LOG.debug("Webcam is disposed, image will be null");
return null;
}
if (!this.open.get())
{
LOG.debug("Webcam is closed, image will be null");
return null;
}
// if image is not fresh, update it
if (this.fresh.compareAndSet(false, true))
{
this.updateFrameBuffer();
}
// get image buffer
LOG.trace("Webcam grabber get image pointer");
Pointer<Byte> image = this.grabber.getImage();
this.fresh.set(false);
if (image == null)
{
LOG.warn("Null array pointer found instead of image");
return null;
}
int length = this.size.width * this.size.height * 3;
LOG.trace("Webcam device get buffer, read {} bytes", length);
return image.getByteBuffer(length);
}