public CLArgumentInfo SetArgumentDirect <T>(int index, CLArgument <T> arg) where T : struct { MethodInfo.Arguments[index].CopyBack = arg.CopyBack; MethodInfo.Arguments[index].ComputeMemory = arg.GenerateComputeMemory(context); MethodInfo.Arguments[index].ComputeValue = arg.ComputeValue; return(MethodInfo.Arguments[index]); }
public static CLArgument <T> CreateValue(T Value) { CLArgument <T> arg = new CLArgument <T>(); arg.ComputeValue = Value; return(arg); }
public static CLArgument <T> CreateArray(T[] Data) { CLArgument <T> arg = new CLArgument <T>(); arg.Data = Data; arg.memoryflags = MemoryFlags.ReadWrite | MemoryFlags.UseHostPointer; return(arg); }
public static CLArgument <T> CreateReturn(T[] Data) { CLArgument <T> arg = new CLArgument <T>(); arg.Data = Data; arg.CopyBack = true; arg.memoryflags = MemoryFlags.WriteOnly | MemoryFlags.AllocateHostPointer; return(arg); }