示例#1
0
文件: Kernel.cs 项目: xgalv/Cryptool2
        public void SetArg(int argIndex, Short2 c)
        {
            ErrorCode result;

            result = OpenCL.SetKernelArg(KernelID, (uint)argIndex, (IntPtr)sizeof(Short2), &c);
            if (result != ErrorCode.SUCCESS)
            {
                throw new OpenCLException("SetArg failed with error code " + result, result);
            }
        }
示例#2
0
        public void SetArg(int argIndex, Short2 c)
        {
            ErrorCode result;

            result = OpenCL.SetKernelArg(KernelID, (uint)argIndex, (IntPtr)sizeof(Short2), &c);
            if (result != ErrorCode.SUCCESS)
                throw new OpenCLException("SetArg failed with error code " + result, result);
        }