5 Commits

Author SHA1 Message Date
Allison Piper
3440855dbd Formatting updates. 2025-04-14 17:26:12 +00:00
Georgii Evtushenko
42d99a5753 Fix MSVC (#158)
* Fix MSVC

* Revert change of source list name
2024-04-04 09:53:30 -07:00
Allison Vacanti
94bf208701 Formatting and doc update. 2021-03-18 10:46:28 -04:00
Allison Vacanti
ab8fc13aac Simplify enum_type_list usage.
Using C++17 auto template parameters enables two improvements:

1. Enum type no longer needed in `enum_type_list`:

```
// Old:
nvbench::enum_type_list<my_enum, my_enum::value1, my_enum::value2, ...>
// New:
nvbench::enum_type_list<my_enum::value1, my_enum::value2, ...>
```

2. New `nvbench::enum_type` helper cuts down on verbosity when writing
benchmarks

```
// Old
template <typename T, my_enum_a MyEnumA, my_enum_b MyEnumB>
void my_bench(nvbench::state &state,
              nvbench::type_list<T,
                                 std::integral_constant<my_enum_a,
                                                        MyEnumA>,
                                 std::integral_constant<my_enum_b,
                                                        MyEnumB>>)
{ ... }

// New
template <typename T, my_enum_a MyEnumA, my_enum_b MyEnumB>
void my_bench(nvbench::state &state,
              nvbench::type_list<T,
                                 nvbench::enum_type<MyEnumA>,
                                 nvbench::enum_type<MyEnumB>>)
{ ... }
```
2021-03-18 02:59:51 -04:00
Allison Vacanti
60c94d9ed6 Add enum_type_axis and examples/enums.cu.
- `enum_type_axis` simplifies using integral_constants with type axes.
- `examples/enums.cu` demonstrates various ways of implementing parameter
  sweeps with enum types.
2021-03-16 13:57:52 -04:00