CMS 3D CMS Logo

Classes | Typedefs | Functions | Variables
lutNN Namespace Reference

Classes

class  LutNetworkFixedPointRegression2Outputs
 
class  LutNetworkFixedPointRegressionBase
 
class  LutNeuronLayerFixedPoint
 

Typedefs

typedef LutNetworkFixedPointRegression2Outputs< input_I, input_F, networkInputSize, layer1_lut_I, layer1_lut_F, layer1_neurons, layer1_output_I, layer2_input_I, layer2_lut_I, layer2_lut_F, layer2_neurons, layer3_input_I, layer3_0_inputCnt, layer3_0_lut_I, layer3_0_lut_F, output0_I, output0_F, layer3_1_inputCnt, layer3_1_lut_I, layer3_1_lut_F, output1_I, output1_FLutNetworkFP
 

Functions

constexpr size_t ceillog2 (size_t i)
 
constexpr size_t floorlog2 (size_t i)
 
template<int W, int I>
const ap_fixed< W, I > max_ap_fixed ()
 
template<int W, int I>
const ap_ufixed< W, I > max_ap_ufixed ()
 

Variables

static constexpr int input_F = 4
 
static constexpr int input_I = 10
 
static constexpr int layer1_lut_F = 13
 
static constexpr int layer1_lut_I = 3
 
static constexpr int layer1_neurons = 16
 
static constexpr int layer1_output_I = 4
 
static constexpr int layer2_input_I = 8
 
static constexpr int layer2_lut_F = 11
 
static constexpr int layer2_lut_I = 5
 
static constexpr int layer2_neurons = 9
 
static constexpr int layer3_0_inputCnt = 8
 
static constexpr int layer3_0_lut_F = 11
 
static constexpr int layer3_0_lut_I = 5
 
static constexpr int layer3_1_inputCnt = 1
 
static constexpr int layer3_1_lut_F = 11
 
static constexpr int layer3_1_lut_I = 4
 
static constexpr int layer3_input_I = 5
 
static constexpr std::size_t networkInputSize = 18
 
static constexpr int output0_F = 2
 
static constexpr int output0_I = 8
 
static constexpr int output1_F = 0
 
static constexpr int output1_I = 8
 

Typedef Documentation

◆ LutNetworkFP

Definition at line 76 of file PtAssignmentNNRegression.cc.

Function Documentation

◆ ceillog2()

constexpr size_t lutNN::ceillog2 ( size_t  i)

Definition at line 34 of file LutNeuronLayerFixedPoint.h.

References Exception, floorlog2(), and mps_fire::i.

34  {
35  if (!(i > 0))
36  throw cms::Exception("Incorrect input")
37  << "Argument of ceillog2 must be grater than 0, while " << i << " used.\n";
38  return i == 1 ? 0 : floorlog2(i - 1) + 1;
39  }
constexpr size_t floorlog2(size_t i)

◆ floorlog2()

constexpr size_t lutNN::floorlog2 ( size_t  i)

Definition at line 28 of file LutNeuronLayerFixedPoint.h.

References Exception, and mps_fire::i.

Referenced by ceillog2().

28  {
29  if (!(i > 0))
30  throw cms::Exception("Incorrect input")
31  << "Argument of floorlog2 must be grater than 0, while " << i << " used.\n";
32  return i == 1 ? 0 : 1 + floorlog2(i >> 1);
33  }
constexpr size_t floorlog2(size_t i)

◆ max_ap_fixed()

template<int W, int I>
const ap_fixed<W, I> lutNN::max_ap_fixed ( )

Definition at line 29 of file LutNetworkFixedPointCommon.h.

References Exhume::I, and WZElectronSkims53X_cff::max.

29  {
30  static_assert(I < 64, "this max_ap_ufixed works only for I < 64");
31  return ap_fixed<W, I, AP_RND, AP_SAT>(std::numeric_limits<uint64_t>::max());
32  //AP_SAT Saturate the value to the maximum value in case of overflow
33  }
const std::complex< double > I
Definition: I.h:8

◆ max_ap_ufixed()

template<int W, int I>
const ap_ufixed<W, I> lutNN::max_ap_ufixed ( )

Definition at line 22 of file LutNetworkFixedPointCommon.h.

References Exhume::I, and WZElectronSkims53X_cff::max.

22  {
23  static_assert(I < 64, "this max_ap_ufixed works only for I < 64");
24  return ap_ufixed<W, I, AP_RND, AP_SAT>(std::numeric_limits<uint64_t>::max());
25  //AP_SAT Saturate the value to the maximum value in case of overflow
26  }
const std::complex< double > I
Definition: I.h:8

Variable Documentation

◆ input_F

constexpr int lutNN::input_F = 4
static

◆ input_I

constexpr int lutNN::input_I = 10
static

◆ layer1_lut_F

constexpr int lutNN::layer1_lut_F = 13
static

Definition at line 30 of file PtAssignmentNNRegression.cc.

◆ layer1_lut_I

constexpr int lutNN::layer1_lut_I = 3
static

Definition at line 29 of file PtAssignmentNNRegression.cc.

◆ layer1_neurons

constexpr int lutNN::layer1_neurons = 16
static

◆ layer1_output_I

constexpr int lutNN::layer1_output_I = 4
static

Definition at line 32 of file PtAssignmentNNRegression.cc.

◆ layer2_input_I

constexpr int lutNN::layer2_input_I = 8
static

Definition at line 34 of file PtAssignmentNNRegression.cc.

◆ layer2_lut_F

constexpr int lutNN::layer2_lut_F = 11
static

Definition at line 38 of file PtAssignmentNNRegression.cc.

◆ layer2_lut_I

constexpr int lutNN::layer2_lut_I = 5
static

Definition at line 37 of file PtAssignmentNNRegression.cc.

◆ layer2_neurons

constexpr int lutNN::layer2_neurons = 9
static

◆ layer3_0_inputCnt

constexpr int lutNN::layer3_0_inputCnt = 8
static

◆ layer3_0_lut_F

constexpr int lutNN::layer3_0_lut_F = 11
static

Definition at line 44 of file PtAssignmentNNRegression.cc.

◆ layer3_0_lut_I

constexpr int lutNN::layer3_0_lut_I = 5
static

Definition at line 43 of file PtAssignmentNNRegression.cc.

◆ layer3_1_inputCnt

constexpr int lutNN::layer3_1_inputCnt = 1
static

◆ layer3_1_lut_F

constexpr int lutNN::layer3_1_lut_F = 11
static

Definition at line 50 of file PtAssignmentNNRegression.cc.

◆ layer3_1_lut_I

constexpr int lutNN::layer3_1_lut_I = 4
static

Definition at line 49 of file PtAssignmentNNRegression.cc.

◆ layer3_input_I

constexpr int lutNN::layer3_input_I = 5
static

Definition at line 40 of file PtAssignmentNNRegression.cc.

◆ networkInputSize

constexpr std::size_t lutNN::networkInputSize = 18
static

Definition at line 26 of file PtAssignmentNNRegression.cc.

◆ output0_F

constexpr int lutNN::output0_F = 2
static

◆ output0_I

constexpr int lutNN::output0_I = 8
static

◆ output1_F

constexpr int lutNN::output1_F = 0
static

◆ output1_I

constexpr int lutNN::output1_I = 8
static