示例#1
0
        /// <summary>
        /// Public constructor
        /// </summary>
        /// <param name="instance">CLAPI Instance for the current thread</param>
        /// <param name="folderName">Folder name where the kernels are located</param>
        /// <param name="genDataType">The DataTypes used to compile the FL Database</param>
        public KernelDatabase(CLAPI instance, string folderName, TypeEnums.DataTypes genDataType)
        {
            GenDataType = KernelParameter.GetDataString(genDataType);
            if (!CLAPI.DirectoryExists(folderName))
            {
                throw new Exception(folderName);
            }

            this.folderName = folderName;
            LoadedKernels   = new Dictionary <string, CLKernel>();
            Initialize(instance);
        }
示例#2
0
        /// <summary>
        /// Public constructor
        /// </summary>
        /// <param name="instance">CLAPI Instance for the current thread</param>
        /// <param name="folderName">Folder name where the kernels are located</param>
        /// <param name="genDataVectorType">The DataVectorTypes used to compile the FL Database</param>
        public KernelDatabase(CLAPI instance, string folderName, TypeEnums.DataVectorTypes genDataVectorType) : base(
                OpenCLDebugConfig.Settings)
        {
            GenDataType = KernelParameter.GetDataString(genDataVectorType);
            if (!IOManager.DirectoryExists(folderName))
            {
                throw new OpenClException("Can not find directory: " + folderName);
            }

            this.folderName = folderName;
            loadedPrograms  = new List <CLProgram>();
            loadedKernels   = new Dictionary <string, CLKernel>();
            Initialize(instance);
        }