Exemple #1
0
        /// <summary>
        ///
        /// This method is used to check the opencl return values
        ///
        /// </summary>
        /// <param name="err"></param>
        /// <param name="name"></param>

        private void CheckErr(ComputeErrorCode err, string name)
        {
            if (err != ComputeErrorCode.Success)
            {
                Debug.WriteLine(err.ToString() + " Text: " + name + " from : ");
                if (DEBUG_CONSOLE_OUTPUT)
                {
                    Console.WriteLine(err.ToString() + " Text: " + name + " from : ");
                }
//                if(DEBUG_CONSOLE_OUTPUT) Console.WriteLine("error: " + name + " (" + err + ")");
                using (StreamWriter sw = File.AppendText(debugLog))
                {
                    sw.WriteLine("error: " + name + " (" + err + ")");
                }
            }
            //Guid id;
            //id.
        }
 /// <summary>
 /// Creates a new <see cref="ComputeException"/> with a specified <see cref="ComputeErrorCode"/>.
 /// </summary>
 /// <param name="code"> A <see cref="ComputeErrorCode"/>. </param>
 public ComputeException(ComputeErrorCode code)
     : base("OpenCL error code detected: " + code.ToString() + ".")
 {
     this.code = code;
 }
Exemple #3
0
 /// <summary>
 /// Creates a new <see cref="ComputeException"/> with a specified <see cref="ComputeErrorCode"/>.
 /// </summary>
 /// <param name="code"> A <see cref="ComputeErrorCode"/>. </param>
 public ComputeException(ComputeErrorCode code)
     : base("OpenCL error code detected: " + code.ToString() + ".")
 {
     this.code = code;
 }