(id solver.HintID, nbOutputs int, inputs []frontend.Variable)
| 206 | } |
| 207 | |
| 208 | func (builder *builder) newHintForId(id solver.HintID, nbOutputs int, inputs []frontend.Variable) ([]frontend.Variable, error) { |
| 209 | hintInputs := builder.toVariableIds(inputs...) |
| 210 | |
| 211 | builder.instructions = append(builder.instructions, |
| 212 | irsource.Instruction{ |
| 213 | Type: irsource.Hint, |
| 214 | ExtraId: uint64(id), |
| 215 | Inputs: hintInputs, |
| 216 | NumOutputs: nbOutputs, |
| 217 | }, |
| 218 | ) |
| 219 | |
| 220 | res := make([]frontend.Variable, nbOutputs) |
| 221 | for i := 0; i < nbOutputs; i++ { |
| 222 | res[i] = builder.addVar() |
| 223 | } |
| 224 | return res, nil |
| 225 | } |
| 226 | |
| 227 | func (builder *builder) CustomGate(gateType uint64, inputs ...frontend.Variable) frontend.Variable { |
| 228 | hintInputs := builder.toVariableIds(inputs...) |
no test coverage detected