5package com.jogamp.opencl.llb.impl;
8import java.nio.charset.Charset;
9import java.nio.charset.StandardCharsets;
11import com.jogamp.gluegen.runtime.*;
12import com.jogamp.common.os.*;
13import com.jogamp.common.nio.*;
14import jogamp.common.os.MachineDataInfoRuntime;
16import com.jogamp.opencl.llb.impl.CLImageFormatImpl;
17import com.jogamp.opencl.llb.impl.CLImageDescImpl;
18import com.jogamp.opencl.llb.CL20;
19import java.security.AccessController;
20import java.security.PrivilegedAction;
21import com.jogamp.common.nio.PointerBuffer;
22import com.jogamp.common.util.LongLongHashMap;
23import com.jogamp.opencl.CLErrorHandler;
24import com.jogamp.opencl.CLException;
25import java.nio.ByteBuffer;
26import java.nio.IntBuffer;
27import com.jogamp.common.nio.Buffers;
35 StructAccessor accessor;
37 private static final int mdIdx = MachineDataInfoRuntime.getStatic().ordinal();
38 private final MachineDataInfo md;
40 private static final int[] CLImageFormatImpl_size =
new int[] { 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 };
41 private static final int[] imageChannelOrder_offset =
new int[] { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 };
43 private static final int[] imageChannelDataType_offset =
new int[] { 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 };
53 return CLImageFormatImpl_size[mdIdx];
58 return create(Buffers.newDirectByteBuffer(
size()));
68 return create( ElementBuffer.derefPointer(
size(), addr, 1).getByteBuffer() );
72 md = MachineDataInfo.StaticConfig.values()[mdIdx].md;
73 accessor =
new StructAccessor(buf);
78 return accessor.getBuffer();
83 return accessor.getDirectBufferAddress();
93 accessor.setIntAt(imageChannelOrder_offset[mdIdx], src);
104 return accessor.getIntAt(imageChannelOrder_offset[mdIdx]);
114 accessor.setIntAt(imageChannelDataType_offset[mdIdx], src);
125 return accessor.getIntAt(imageChannelDataType_offset[mdIdx]);