Esempio n. 1
0
 public bool TryGetKernelSubGroupInfo <T>(
     IntPtr kernel,
     IntPtr device,
     CLKernelSubGroupInfoType type,
     IntPtr[] inputs,
     out T value)
     where T : struct
 {
     fixed(IntPtr *basePtr = &inputs[0])
     {
         return(TryGetKernelSubGroupInfo(
                    kernel,
                    device,
                    type,
                    inputs.Length,
                    basePtr,
                    out value));
     }
 }
Esempio n. 2
0
 public bool TryGetKernelSubGroupInfo <T>(
     IntPtr kernel,
     IntPtr device,
     CLKernelSubGroupInfoType type,
     int numInputs,
     IntPtr *inputs,
     out T value)
     where T : struct
 {
     value = default;
     return(getKernelSubGroupInfo?.Invoke(
                kernel,
                device,
                type,
                new IntPtr(numInputs * IntPtr.Size),
                inputs,
                new IntPtr(Interop.SizeOf <T>()),
                Unsafe.AsPointer(ref value),
                IntPtr.Zero) == CLError.CL_SUCCESS);
 }