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

trivial mixed expression throw bad_function call #63

Open
DerThorsten opened this issue Jun 29, 2021 · 1 comment
Open

trivial mixed expression throw bad_function call #63

DerThorsten opened this issue Jun 29, 2021 · 1 comment

Comments

@DerThorsten
Copy link
Contributor

DerThorsten commented Jun 29, 2021

this throws a bad_function_call and gdb says "no stack" =/.
Failing test is in #62

    TEST_CASE("bad_function_call")
    {

        zdispatcher_t<detail::plus, 2>::init();


        auto x0 = xarray<int>::from_shape({2,2});
        auto x1 = xarray<int>::from_shape({2,2});

        zarray z0(x0);
        zarray z1(x1);

        auto res = xarray<double>::from_shape({2,2});
        zarray zres(res);

        zres =  x0 + x1;

    }

without the explicit init I get a "callback not found" exception as expected

@DerThorsten
Copy link
Contributor Author

DerThorsten commented Jun 29, 2021

mhh...just realized that the code above does not add the zarrays but the normal xarrays. Still interesting.
when I add some more dispatcher-inits I get some other error:

this give a callback not found

    TEST_CASE("bad_function_call")
    {

        zdispatcher_t<detail::plus, 2>::init();
        zdispatcher_t<detail::xassign_dummy_functor, 1>::init();
    
        auto x0 = xarray<int>::from_shape({2,2});
        auto x1 = xarray<int>::from_shape({2,2});

        zarray z0(x0);
        zarray z1(x1);

        auto res = xarray<double>::from_shape({2,2});
        zarray zres(res);

        zres =  x0 + x1;

    }

this also give a callback not found (this time we actually add the zarrays)

    TEST_CASE("bad_function_call")
    {

        zdispatcher_t<detail::plus, 2>::init();
        zdispatcher_t<detail::xassign_dummy_functor, 1>::init();
    
        auto x0 = xarray<int>::from_shape({2,2});
        auto x1 = xarray<int>::from_shape({2,2});

        zarray z0(x0);
        zarray z1(x1);

        auto res = xarray<double>::from_shape({2,2});
        zarray zres(res);

        zres =  z0 + z1;

    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant