镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

trivial mixed expression throw bad_function call #63

Open

Description

@DerThorsten

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

Activity

  1. DerThorsten commented on Jun 29, 2021

    @DerThorsten
    ContributorAuthor

    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

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