File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
plutus-core/src/PlutusCore/Evaluation/Machine/CostingFun Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 633633 "intercept" : 352998 ,
634634 "slope" : 19410
635635 },
636- "type" : " linear_in_w "
636+ "type" : " linear_in_x "
637637 },
638638 "memory" : {
639639 "arguments" : 1 ,
11971197 "unionValue" : {
11981198 "cpu" : {
11991199 "arguments" : {
1200- "square_of_sum_coefficient00 " : 3128363791 ,
1201- "square_of_sum_coefficient11 " : 5
1200+ "intercept " : 1163050 ,
1201+ "slope " : 1470
12021202 },
1203- "type" : " square_of_sum "
1203+ "type" : " multiplied_sizes "
12041204 },
12051205 "memory" : {
12061206 "arguments" : 1 ,
12991299 "type" : " linear_in_max_yz"
13001300 }
13011301 }
1302- }
1302+ }
Original file line number Diff line number Diff line change @@ -635,7 +635,7 @@ runTwoArgumentModel
635635 let ! size1 = sumCostStream costs1
636636 ! size2 = sumCostStream costs2
637637 in CostLast $ evaluateTwoVariableQuadraticFunction f size1 size2
638- runTwoArgumentModel (ModelTwoArgumentsSquareOfSum f ) = undefined
638+ runTwoArgumentModel (ModelTwoArgumentsSquareOfSum _ ) = \ _ _ -> CostLast 10000
639639{-# OPAQUE runTwoArgumentModel #-}
640640
641641
@@ -750,6 +750,7 @@ runCostingFunThreeArguments (CostingFun cpu mem) =
750750data ModelFourArguments
751751 = ModelFourArgumentsConstantCost CostingInteger
752752 | ModelFourArgumentsLinearInW OneVariableLinearFunction
753+ | ModelFourArgumentsLinearInX OneVariableLinearFunction
753754 deriving stock (Show , Eq , Generic , Lift )
754755 deriving anyclass (NFData )
755756
@@ -771,6 +772,10 @@ runFourArgumentModel
771772 (ModelFourArgumentsLinearInW (OneVariableLinearFunction intercept slope)) =
772773 lazy $ \ _ _ _ costs4 ->
773774 scaleLinearly intercept slope costs4
775+ runFourArgumentModel
776+ (ModelFourArgumentsLinearInX (OneVariableLinearFunction intercept slope)) =
777+ lazy $ \ costs1 _ _ _ ->
778+ scaleLinearly intercept slope costs1
774779{-# OPAQUE runFourArgumentModel #-}
775780
776781-- See Note [runCostingFun* API].
You can’t perform that action at this time.
0 commit comments