MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / get_map_key_opt

Function get_map_key_opt

subprojects/llama.cpp/common/preset.cpp:270–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268}
269
270static std::map<std::string, common_arg> get_map_key_opt(common_params_context & ctx_params) {
271 std::map<std::string, common_arg> mapping;
272 for (const auto & opt : ctx_params.options) {
273 for (const auto & env : opt.get_env()) {
274 mapping[env] = opt;
275 }
276 for (const auto & arg : opt.get_args()) {
277 mapping[rm_leading_dashes(arg)] = opt;
278 }
279 }
280 return mapping;
281}
282
283static bool is_bool_arg(const common_arg & arg) {
284 return !arg.args_neg.empty();

Callers 1

common_preset_contextMethod · 0.85

Calls 3

rm_leading_dashesFunction · 0.85
get_envMethod · 0.80
get_argsMethod · 0.80

Tested by

no test coverage detected