#pragma once #include #include #include #include #include enum eWaifu2xError { eWaifu2xError_OK = 0, eWaifu2xError_Cancel, eWaifu2xError_InvalidParameter, eWaifu2xError_FailedOpenInputFile, eWaifu2xError_FailedOpenOutputFile, eWaifu2xError_FailedOpenModelFile, eWaifu2xError_FailedParseModelFile, eWaifu2xError_FailedConstructModel, eWaifu2xError_FailedProcessCaffe, }; typedef std::pair InputOutputPathPair; typedef std::pair PathAndErrorPair; typedef std::function waifu2xCancelFunc; typedef std::function waifu2xProgressFunc; typedef std::function waifu2xTimeFunc; bool can_use_cuDNN(); // mode: noise or scale or noise_scale or auto_scale // process: cpu or gpu or cudnn eWaifu2xError waifu2x(int argc, char** argv, const std::vector &file_paths, const std::string &mode, const int noise_level, const double scale_ratio, const std::string &model_dir, const std::string &process, std::vector &errors, const waifu2xCancelFunc cancel_func = nullptr, const waifu2xProgressFunc progress_func = nullptr, const waifu2xTimeFunc time_func = nullptr);