Example #1
0
        public static int set_log_level(int log_level)
        {
            switch (PlatformHelper.get_library_environment())
            {
            case LibraryEnvironment.x64:
                return(MLModuleLibrary64.set_log_level(log_level));

            case LibraryEnvironment.x86:
                return(MLModuleLibrary32.set_log_level(log_level));

            case LibraryEnvironment.Linux:
                return(MLModuleLibraryLinux.set_log_level(log_level));

            case LibraryEnvironment.MacOS:
                return(MLModuleLibraryMac.set_log_level(log_level));
            }

            return((int)CustomExitCodes.GENERAL_ERROR);
        }
Example #2
0
        public static int release(string input_json)
        {
            switch (PlatformHelper.get_library_environment())
            {
            case LibraryEnvironment.x64:
                return(MLModuleLibrary64.release(input_json));

            case LibraryEnvironment.x86:
                return(MLModuleLibrary32.release(input_json));

            case LibraryEnvironment.Linux:
                return(MLModuleLibraryLinux.release(input_json));

            case LibraryEnvironment.MacOS:
                return(MLModuleLibraryMac.release(input_json));
            }

            return((int)CustomExitCodes.GENERAL_ERROR);
        }
Example #3
0
        public static int predict(double[] data, int data_len, double[] output, string input_json)
        {
            switch (PlatformHelper.get_library_environment())
            {
            case LibraryEnvironment.x64:
                return(MLModuleLibrary64.predict(data, data_len, output, input_json));

            case LibraryEnvironment.x86:
                return(MLModuleLibrary32.predict(data, data_len, output, input_json));

            case LibraryEnvironment.Linux:
                return(MLModuleLibraryLinux.predict(data, data_len, output, input_json));

            case LibraryEnvironment.MacOS:
                return(MLModuleLibraryMac.predict(data, data_len, output, input_json));
            }

            return((int)CustomExitCodes.GENERAL_ERROR);
        }
Example #4
0
        public static int get_version_ml_module(byte[] version, int[] len, int max_len)
        {
            switch (PlatformHelper.get_library_environment())
            {
            case LibraryEnvironment.x64:
                return(MLModuleLibrary64.get_version_ml_module(version, len, max_len));

            case LibraryEnvironment.x86:
                return(MLModuleLibrary32.get_version_ml_module(version, len, max_len));

            case LibraryEnvironment.Linux:
                return(MLModuleLibraryLinux.get_version_ml_module(version, len, max_len));

            case LibraryEnvironment.MacOS:
                return(MLModuleLibraryMac.get_version_ml_module(version, len, max_len));
            }

            return((int)CustomExitCodes.GENERAL_ERROR);
        }