File tree 1 file changed +11
-6
lines changed
1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 1
1
#include " sampling.h"
2
2
3
3
#include " common.h"
4
+ #include " log.h"
4
5
5
6
#include < cmath>
6
7
#include < unordered_map>
@@ -534,14 +535,16 @@ std::vector<common_sampler_type> common_sampler_types_from_names(const std::vect
534
535
auto sampler = sampler_canonical_name_map.find (name);
535
536
if (sampler != sampler_canonical_name_map.end ()) {
536
537
samplers.push_back (sampler->second );
537
- } else {
538
- if (allow_alt_names) {
539
- sampler = sampler_alt_name_map.find (name);
540
- if (sampler != sampler_alt_name_map.end ()) {
541
- samplers.push_back (sampler->second );
542
- }
538
+ continue ;
539
+ }
540
+ if (allow_alt_names) {
541
+ sampler = sampler_alt_name_map.find (name);
542
+ if (sampler != sampler_alt_name_map.end ()) {
543
+ samplers.push_back (sampler->second );
544
+ continue ;
543
545
}
544
546
}
547
+ LOG_WRN (" %s: unable to match sampler by name '%s'\n " , __func__, name.c_str ());
545
548
}
546
549
547
550
return samplers;
@@ -568,6 +571,8 @@ std::vector<common_sampler_type> common_sampler_types_from_chars(const std::stri
568
571
const auto sampler = sampler_name_map.find (c);
569
572
if (sampler != sampler_name_map.end ()) {
570
573
samplers.push_back (sampler->second );
574
+ } else {
575
+ LOG_WRN (" %s: unable to match sampler by char '%c'\n " , __func__, c);
571
576
}
572
577
}
573
578
You can’t perform that action at this time.
0 commit comments