Giter VIP home page Giter VIP logo

Comments (3)

denisalevi avatar denisalevi commented on June 4, 2024

thereby I will ensure that other special operators cf. genn are working

from brian2cuda.

denisalevi avatar denisalevi commented on June 4, 2024

From device functions we can only call fmod(float, float) and fmod(double, double). There is no support for long double. If it is used, the compilation will fail with e.g.

error: more than one instance of overloaded function "_brian_mod" matches the argument list:
            function "<unnamed>::_brian_mod(int, double)"
            function "<unnamed>::_brian_mod(int, float)"
            function "<unnamed>::_brian_mod(int, long long)"
            function "<unnamed>::_brian_mod(int, unsigned long long)"
            function "<unnamed>::_brian_mod(int, long)"
            function "<unnamed>::_brian_mod(int, unsigned long)"
            function "<unnamed>::_brian_mod(int, int)"
            function "<unnamed>::_brian_mod(int, unsigned int)"
            function "<unnamed>::_brian_mod(int, short)"
            function "<unnamed>::_brian_mod(int, unsigned short)"
            function "<unnamed>::_brian_mod(int, char)"
            function "<unnamed>::_brian_mod(int, unsigned char)"
            argument types are: (const int32_t, long double)

I couldn't think of a good way to warn the user about this. But when would anybody use modulo on long double anyways?

For all other cases the modulo function should work now.

from brian2cuda.

denisalevi avatar denisalevi commented on June 4, 2024

Since the modulo function is working now, I'm closing this. I opened another issue for the question how to handle long double and int support of cuda math functions (#45).

from brian2cuda.

Related Issues (20)

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.