Git Product home page Git Product logo

Comments (2)

ingowald avatar ingowald commented on August 26, 2024

have never tried, i think, but see no reason why not. let me know if you run into any issues

from cudakdtree.

ahadji05 avatar ahadji05 commented on August 26, 2024

I tried the following:


template<typename T, class Mem>
void kdtreeSearch<T,Mem>::find_closet_host( int numQueryData, int *traceIndex, T const* x, T const* y, T const* z, T const* w ){

    for( size_t queryIndex = 0; queryIndex < numQueryData; ++queryIndex ){
        PointPlusIndex queryPoint;
        queryPoint.pos.x = (float) x[queryIndex];
        queryPoint.pos.y = (float) y[queryIndex];
        queryPoint.pos.z = (float) z[queryIndex];
        queryPoint.pos.w = (float) w[queryIndex];

        int closestID = cukd::stackFree::fcp<PointPlusIndex,PointPlusIndex_traits>(queryPoint.pos, m_data, m_numSearchData);

        traceIndex[queryIndex] = m_data[closestID].index;
    }
}

but it looks like cukd::stackFree::fcp cannot compile inside a host function!


error: calling a __device__ function("int cukd::stackFree::fcp<    ::PointPlusIndex,     ::PointPlusIndex_traits> ( ::T2::point_t, const T1 *, int,  ::cukd::FcpSearchParams)") from a __host__ function("find_closet_host") is not allowed
          int closestID = cukd::stackFree::fcp<PointPlusIndex,PointPlusIndex_traits>(queryPoint.pos, m_data, m_numSearchData);

from cudakdtree.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.