Esempio n. 1
0
        public void Build(Device[] devices, String options, ProgramNotify notify, IntPtr userData)
        {
            var deviceLength = 0;

            if (devices != null)
            {
                deviceLength = devices.Length;
            }

            var deviceIDs = InteropTools.ConvertDevicesToDeviceIDs(devices);
            var result    = OpenCL.BuildProgram(this.ProgramID,
                                                (UInt32)deviceLength,
                                                deviceIDs,
                                                options,
                                                notify,
                                                userData);

            if (result != ErrorCode.SUCCESS)
            {
                throw new OpenCLBuildException(this, result);
            }
        }
Esempio n. 2
0
        public void Build(Device[] devices, string options, ProgramNotify notify, IntPtr userData)
        {
            ErrorCode result;

            IntPtr[] deviceIDs;
            int      deviceLength = 0;

            if (devices != null)
            {
                deviceLength = devices.Length;
            }

            deviceIDs = InteropTools.ConvertDevicesToDeviceIDs(devices);
            result    = (ErrorCode)OpenCL.BuildProgram(ProgramID,
                                                       (uint)deviceLength,
                                                       deviceIDs,
                                                       options,
                                                       notify,
                                                       userData);
            if (result != ErrorCode.SUCCESS)
            {
                throw new OpenCLBuildException(this, result);
            }
        }