Skip to content

Handle boolean values if possible as function arguments/return #7

Open

Description

@ryanorendorff

Currently if we have a program like the following

#include <stdbool.h>

[[clang::fhe_program]] bool boolean_and(
    bool a,
    bool b
) {
    return a && b;
}

the inputs are read off the stack as 8 bit values. In other places we are able to use the fact that a comparison returns a i1 to reduce the amount of computation, but if we pass in bools then extra operations are performed due to the zero extension to 8 bits.

Ideally we can avoid this extra computation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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