Exemplo n.º 1
0
 /// <summary>
 /// Compile the program
 /// </summary>
 /// <param name="prog">The program source</param>
 /// <param name="buildOpt">The build option</param>
 /// <param name="errMsg">Error message</param>
 /// <returns>The compiled program</returns>
 public Program GetProgram(ProgramSource prog, String buildOpt, CvString errMsg)
 {
     using (CvString csBuildOpt = new CvString(buildOpt))
     {
         return(new Program(OclInvoke.oclContextGetProg(_ptr, prog, csBuildOpt, errMsg)));
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Create an opencl kernel
 /// </summary>
 /// <param name="kernelName">The name of the kernel</param>
 /// <param name="programSource">The program source code</param>
 /// <param name="buildOps">The build options</param>
 /// <param name="errMsg">Option error message container that can be passed to this function</param>
 /// <returns>True if the kernel can be created</returns>
 public bool Create(String kernelName, ProgramSource programSource, String buildOps = null, CvString errMsg = null)
 {
    using (CvString cs = new CvString(kernelName))
    using (CvString buildOptStr = new CvString(buildOps))
    {
       return OclInvoke.oclKernelCreate(_ptr, cs, programSource, buildOptStr, errMsg);
    }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Create an opencl kernel
 /// </summary>
 /// <param name="kernelName">The name of the kernel</param>
 /// <param name="programSource">The program source code</param>
 /// <param name="buildOps">The build options</param>
 /// <param name="errMsg">Option error message container that can be passed to this function</param>
 /// <returns>True if the kernel can be created</returns>
 public bool Create(String kernelName, ProgramSource programSource, String buildOps = null, CvString errMsg = null)
 {
     using (CvString cs = new CvString(kernelName))
         using (CvString buildOptStr = new CvString(buildOps))
         {
             return(OclInvoke.oclKernelCreate(_ptr, cs, programSource, buildOptStr, errMsg));
         }
 }