Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Add return value accessor to assigner #217

@aleasims

Description

@aleasims

After successful evaluation assigner has a return value of circuit function, which now can be printed to stdout (see print_format). However we cannot access this value from API now. It will be nice for users and really helpful for testing assigner.

I suggest we add public method get_return_value:

std::vector<typename BlueprintFieldType::integral_type> get_return_value();
  • If the return value is primitive (integer, field), this returns vector of a single element - the value itself;
  • Using BlueprintFieldType::integral_type here allows to return single value for non-native fields (at least as I understood it);
  • If the return value is LLVM vector of curve, this returns vector of values of corresponding size;
  • Other cases (pointers, structs and etc.) are not defined yet.

If the function is called not after successful evaluation, result must be undefined (probably empty).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions