IoSpecificationHasher Struct Reference

#include <nnet-computation.h>

Public Member Functions

size_t operator() (const IoSpecification &io_spec) const noexcept
 

Detailed Description

Definition at line 102 of file nnet-computation.h.

Member Function Documentation

◆ operator()()

size_t operator() ( const IoSpecification io_spec) const
noexcept

Definition at line 1192 of file nnet-computation.cc.

1193  {
1194  StringHasher string_hasher;
1195  IndexVectorHasher indexes_hasher;
1196  // 4261 was chosen at random from a list of primes.
1197  return string_hasher(io_spec.name) +
1198  indexes_hasher(io_spec.indexes) +
1199  (io_spec.has_deriv ? 4261 : 0);
1200 }

The documentation for this struct was generated from the following files: