Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 932780
Collapse All | Expand All

(-)b/universe/Pathfinder.cpp (-5 / +5 lines)
Lines 792-803 Link Here
792
        std::size_t smaller_index = std::min(system1_index, system2_index);
792
        std::size_t smaller_index = std::min(system1_index, system2_index);
793
        std::size_t other_index   = std::max(system1_index, system2_index);
793
        std::size_t other_index   = std::max(system1_index, system2_index);
794
794
795
        using row_ref = distance_matrix_storage<short>::row_ref;
795
        using row_ref = distance_matrix_storage<int16_t>::row_ref;
796
796
797
        // prefer filling the smaller row/column for increased cache locality
797
        // prefer filling the smaller row/column for increased cache locality
798
        int16_t jumps = cache.get_T(
798
        int16_t jumps = cache.get_T(
799
            smaller_index, other_index,
799
            smaller_index, other_index,
800
            [this](size_t ii, row_ref row) { HandleCacheMiss(ii, row); }); // boost::bind(&Pathfinder::PathfinderImpl::HandleCacheMiss, this, ph::_1, ph::_2));
800
            [this](std::size_t ii, row_ref row) { HandleCacheMiss(ii, row); }); // boost::bind(&Pathfinder::PathfinderImpl::HandleCacheMiss, this, ph::_1, ph::_2));
801
        if (jumps == SHRT_MAX)  // value returned for no valid path
801
        if (jumps == SHRT_MAX)  // value returned for no valid path
802
            return -1;
802
            return -1;
803
        return jumps;
803
        return jumps;
Lines 1403-1416 Link Here
1403
        return false;
1403
        return false;
1404
    }
1404
    }
1405
1405
1406
    using row_ref = distance_matrix_storage<short>::row_ref;
1406
    using row_ref = distance_matrix_storage<int16_t>::row_ref;
1407
1407
1408
    // Examine the cache to see if \p system_id is within \p jumps of \p others
1408
    // Examine the cache to see if \p system_id is within \p jumps of \p others
1409
    bool within_jumps(false);
1409
    bool within_jumps(false);
1410
    distance_matrix_cache<distance_matrix_storage<int16_t>> cache(m_system_jumps);
1410
    distance_matrix_cache<distance_matrix_storage<int16_t>> cache(m_system_jumps);
1411
    cache.examine_row(system_index,
1411
    cache.examine_row(system_index,
1412
        [this](size_t ii, row_ref row) { HandleCacheMiss(ii, row); }, // boost::bind(&Pathfinder::PathfinderImpl::HandleCacheMiss, this, ph::_1, ph::_2),
1412
        [this](std::size_t ii, row_ref row) { HandleCacheMiss(ii, row); }, // boost::bind(&Pathfinder::PathfinderImpl::HandleCacheMiss, this, ph::_1, ph::_2),
1413
        [this, &within_jumps, jumps, &objects, &others](size_t ii, row_ref row)
1413
        [this, &within_jumps, jumps, &objects, &others](std::size_t ii, row_ref row)
1414
        { WithinJumpsOfOthersCacheHit(within_jumps, jumps, objects, others, ii, row); }); // boost::bind(&Pathfinder::PathfinderImpl::WithinJumpsOfOthersCacheHit, this,
1414
        { WithinJumpsOfOthersCacheHit(within_jumps, jumps, objects, others, ii, row); }); // boost::bind(&Pathfinder::PathfinderImpl::WithinJumpsOfOthersCacheHit, this,
1415
                                                                                          //             std::ref(within_jumps), jumps, std::ref(objects), std::ref(others), ph::_1, ph::_2));
1415
                                                                                          //             std::ref(within_jumps), jumps, std::ref(objects), std::ref(others), ph::_1, ph::_2));
1416
1416

Return to bug 932780