예제 #1
0
        /// <summary>
        /// returns program build information
        /// </summary>
        /// <returns></returns>
        public static string GetBuildInformation(this Program inProgram, Device inDevice, ProgramBuildInfo inInfo)
        {
            OpenCLErrorCode tmpError;
            var MemoryBuffer = OpenCL_ProgramInformation.GetProgramBuildInfo(inProgram.Handle, inDevice.Handle, inInfo, out tmpError);

            if (tmpError != OpenCLErrorCode.Success)
            {
                Log.Warning($"Could not resolce Program build Information '{inInfo.ToString()}'");
                return "";
            }
            return MemoryBuffer.ToString();
        }
예제 #2
0
        public static CommandQueue CreateCommandQueue(this Context inContext, Device inDevices)
        {
            OpenCLErrorCode tmpError;
            var tmpConnamdnHandle = OpenCL_CommandQueue.CreateCommandQueue(inContext.Handle, inDevices.Handle, 0, out tmpError);

            if (tmpError != OpenCLErrorCode.Success)
            {
                Log.Error($"Could not create CommandQueue. {tmpError}");
            }

            return new CommandQueue
            {
                Handle = tmpConnamdnHandle,
            };
        }