Git Product home page Git Product logo

fmath's People

Contributors

gpmueller avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fmath's Issues

Improve Documentation

Also, more of the potential use cases should be exemplified and thoroughly explained. Especially:

  • lambdas, with and without capture
  • place advanced indexing/slicing in its own page with some more complicated usage examples

Improve coverage of template functions

The baseline coverage is incomplete because unused template functions are not generated by the compiler. This can be fixed by instantiating templates in the unit tests. This should be all that is necessary:

template class FMath::detail::Field<FMath::Vector3, std::vector<FMath::Vector3>>;
template class FMath::detail::Field<FMath::scalar, std::vector<FMath::scalar>>;

Add indexing via function pointer?

The possibility to pass an indexing function to Field would enable use cases, such as e.g. interactions between elements of a Field.

The only other way (at least that I can currently think of) would be to implement the indexing on the library's user-side, inserting additional function(s) into the FMath namespace and then using it as if it were part of the original library.

Test behaviour of expressions containing temporaries

For a very simple example, see https://godbolt.org/z/xd7abze85

Complex expressions might trigger the creation of temporaries, which might make problems even when the data memory addresses are still valid. Something like auto vf_res2 = vf1 + vf1.cross(vf2); might lead to undefined behaviour when accessing vf_res2[...] later on.

Unit tests should be written to cover the expected behaviour and guidelines should be written to explain what to avoid.

Idea: distinguish parallelisations in user-code with template parameters

By adding optional template parameters, the user could choose in-code if he wants to parallelize on CPU, GPU, or not at all:

enum class Parallelisation
{
    CPU,
    GPU,
    None
}

Using constexpr if, different corresponding OpenMP code paths could be chosen.

I don't know how one could do anything like this to distinguish between cuda and cpu...

Add some basic benchmarks

This would be useful to ensure that performance is at least OK and ideally as good or better than a manually written for-loop.

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.