Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

matrix class does not work with field elements #90

Open
hgedia opened this issue Nov 8, 2022 · 0 comments
Open

matrix class does not work with field elements #90

hgedia opened this issue Nov 8, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@hgedia
Copy link

hgedia commented Nov 8, 2022

UPDATE: Unrelated to field , also fails with double type.

typedef bls12_fq<381>::value_type bls12_base_f;

int main() {
    constexpr auto f1 = bls12_base_f(0x1);
    constexpr auto f2 = bls12_base_f(0x2);

    constexpr matrix<bls12_base_f,2,2> m1 = {{{f1, f2}, {f1, f2}}};
    constexpr matrix<bls12_base_f,2,2> m2 = {{{f2, f1}, {f2, f1}}};

    auto m3 = m1 + m2;
    return 0;
}

The above snippet fails with the below error

/home/hgedia/Development/nil/crypto3-scaffold/src/bls/src/main.cpp:18:18: error: invalid operands to binary expression ('const matrix<bls12_base_f, 2, 2>' (aka 'const matrix<element_fp<params<bls12_base_field<381>>>, 2, 2>') and 'const matrix<bls12_base_f, 2, 2>' (aka 'const matrix<element_fp<params<bls12_base_field<381>>>, 2, 2>'))
    auto m3 = m1 + m2;
@hgedia hgedia added the bug Something isn't working label Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant