use arguments of storage to generate accumulator default value
- Langage dominant
- C++
- Étoiles
- 334
- Forks
- 76
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
The storage is passed as a value to the histogram, because it allows the storage to be configured at run-time.
```
auto h = make_histogram_with(dense_storage(), ...);
```
So far we have not made use of this feature, but I propose to extend the `storage_adaptor` so that it accepts arguments in its ctor which are used to initialize the default value for its accumulator.
```
auto h = make_histogram_with(dense_storage(3), ...);
```
Internally, the storage creates a value `int default_value{3}` with the arguments passed to it. Then, whenever the histogram resets the storage, the accumulators are initialized to this value.
This feature allows one to pass run-time configuration to the accumulators, which is currently not possible.
@henryiii @jpivarski any thoughts?
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.