Beispiel #1
0
        private static Int64 GetInfo(Event e, CLProfilingInfo info)
        {
            Byte[] bytes = new Byte[8];

            SizeT paramValueSizeRet = SizeT.Zero;

            GCHandle bytesHandle = GCHandle.Alloc(bytes, GCHandleType.Pinned);
            {
                OpenCLError.Validate(OpenCLDriver.clGetEventProfilingInfo(e.CLEvent, info, new SizeT(bytes.LongLength), bytesHandle.AddrOfPinnedObject(), ref paramValueSizeRet));
            }
            bytesHandle.Free();

            return BitConverter.ToInt64(bytes, 0);
        }
Beispiel #2
0
        private static Int64 GetInfo(Event e, CLProfilingInfo info)
        {
            Byte[] bytes = new Byte[8];

            SizeT paramValueSizeRet = SizeT.Zero;

            GCHandle bytesHandle = GCHandle.Alloc(bytes, GCHandleType.Pinned);

            {
                OpenCLError.Validate(OpenCLDriver.clGetEventProfilingInfo(e.CLEvent, info, new SizeT(bytes.LongLength), bytesHandle.AddrOfPinnedObject(), ref paramValueSizeRet));
            }
            bytesHandle.Free();

            return(BitConverter.ToInt64(bytes, 0));
        }
Beispiel #3
0
 public static extern CLError clGetEventProfilingInfo(
     CLEvent e,
     CLProfilingInfo param_name,
     SizeT param_value_size,
     IntPtr param_value,
     ref SizeT param_value_size_ret);
Beispiel #4
0
 internal static extern CLError clGetEventProfilingInfo(CLEvent e, CLProfilingInfo param_name, SizeT param_value_size, IntPtr param_value, ref SizeT param_value_size_ret);