diff --git a/L1Trigger/L1TMuonOverlapPhase2/interface/LutNetworkFixedPointRegression2Outputs.h b/L1Trigger/L1TMuonOverlapPhase2/interface/LutNetworkFixedPointRegression2Outputs.h index 2b8af4c021806..a205fd888066b 100644 --- a/L1Trigger/L1TMuonOverlapPhase2/interface/LutNetworkFixedPointRegression2Outputs.h +++ b/L1Trigger/L1TMuonOverlapPhase2/interface/LutNetworkFixedPointRegression2Outputs.h @@ -63,9 +63,9 @@ namespace lutNN { LutLayer1; LutLayer1 lutLayer1; - static const unsigned int noHitCntShift = layer1_output_I; //FIXME should be layer1_output_I ??? + static constexpr unsigned int noHitCntShift = layer1_output_I; //FIXME should be layer1_output_I ??? - static const int layer2_input_F = layer1_lut_F; + static constexpr int layer2_input_F = layer1_lut_F; typedef LutNeuronLayerFixedPoint class LutNeuronLayerFixedPoint { public: - static const int input_W = input_I + input_F; - static const int lut_W = lut_I + lut_F; + static constexpr int input_W = input_I + input_F; + static constexpr int lut_W = lut_I + lut_F; //the lut out values sum //static const int lutOutSum_I = lut_I + ceil(log2(inputSize)); //MB: ceil(log2(inputSize)) is not constexpr which makes issue for code-checks - static const int lutOutSum_I = lut_I + ceillog2(inputSize); - static const int lutOutSum_W = lutOutSum_I + lut_F; + static constexpr int lutOutSum_I = lut_I + ceillog2(inputSize); + static constexpr int lutOutSum_W = lutOutSum_I + lut_F; - static const int output_W = output_I + lut_F; + static constexpr int output_W = output_I + lut_F; //static_assert( (1<, inputSize> inputArrayType; diff --git a/L1Trigger/L1TMuonOverlapPhase2/src/PtAssignmentNNRegression.cc b/L1Trigger/L1TMuonOverlapPhase2/src/PtAssignmentNNRegression.cc index 2cc74c4e51b18..ce3cdb6972343 100644 --- a/L1Trigger/L1TMuonOverlapPhase2/src/PtAssignmentNNRegression.cc +++ b/L1Trigger/L1TMuonOverlapPhase2/src/PtAssignmentNNRegression.cc @@ -21,35 +21,35 @@ #include namespace lutNN { - static const int input_I = 10; - static const int input_F = 4; - static const std::size_t networkInputSize = 18; + static constexpr int input_I = 10; + static constexpr int input_F = 4; + static constexpr std::size_t networkInputSize = 18; - static const int layer1_neurons = 16; - static const int layer1_lut_I = 3; - static const int layer1_lut_F = 13; + static constexpr int layer1_neurons = 16; + static constexpr int layer1_lut_I = 3; + static constexpr int layer1_lut_F = 13; - static const int layer1_output_I = 4; + static constexpr int layer1_output_I = 4; //4 bits are for the count of the noHit layers which goes to the input of the layer2 - static const int layer2_input_I = 8; + static constexpr int layer2_input_I = 8; - static const int layer2_neurons = 9; - static const int layer2_lut_I = 5; - static const int layer2_lut_F = 11; + static constexpr int layer2_neurons = 9; + static constexpr int layer2_lut_I = 5; + static constexpr int layer2_lut_F = 11; - static const int layer3_input_I = 5; + static constexpr int layer3_input_I = 5; - static const int layer3_0_inputCnt = 8; - static const int layer3_0_lut_I = 5; - static const int layer3_0_lut_F = 11; - static const int output0_I = 8; - static const int output0_F = 2; + static constexpr int layer3_0_inputCnt = 8; + static constexpr int layer3_0_lut_I = 5; + static constexpr int layer3_0_lut_F = 11; + static constexpr int output0_I = 8; + static constexpr int output0_F = 2; - static const int layer3_1_inputCnt = 1; - static const int layer3_1_lut_I = 4; - static const int layer3_1_lut_F = 11; - static const int output1_I = 8; - static const int output1_F = 0; //Does not matter in principle - it is not used + static constexpr int layer3_1_inputCnt = 1; + static constexpr int layer3_1_lut_I = 4; + static constexpr int layer3_1_lut_F = 11; + static constexpr int output1_I = 8; + static constexpr int output1_F = 0; //Does not matter in principle - it is not used typedef LutNetworkFixedPointRegression2Outputs