Пример #1
0
 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]);
 }
Пример #2
0
        public static CLArgument <T> CreateValue(T Value)
        {
            CLArgument <T> arg = new CLArgument <T>();

            arg.ComputeValue = Value;
            return(arg);
        }
Пример #3
0
        public static CLArgument <T> CreateArray(T[] Data)
        {
            CLArgument <T> arg = new CLArgument <T>();

            arg.Data        = Data;
            arg.memoryflags = MemoryFlags.ReadWrite | MemoryFlags.UseHostPointer;
            return(arg);
        }
Пример #4
0
        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);
        }