GithubHelp home page GithubHelp logo

libtvb's Introduction

SDDEKit

SDDEKit is a C rewrite and generalization of numerical algorithms backing the simulator of The Virtual Brain project, though it is intended to support any sort of modeling project involving stochastic delay differential equations.

The current focus is nailing down 'software carpentry' aspects of building a scientific library, and only preliminary sets of mathematical components are implemented; as such, it is not for general use until the upcoming v0.1 release.

Build the library & benchmark with

python -m dev build

(if you work in Bash, you may want to alias dev='python -m dev ').

We're currently rewriting the test & benchmark suite using upcoming Python bindings.

See our docs for more information.

Many thanks to our contributors

This work is partially funded by the French Medical Foundation.

Build Status Coverage Status

libtvb's People

Contributors

abheekg avatar gitter-badger avatar i-zaak avatar maedoc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

libtvb's Issues

Review memory copying

When receiving heap-allocated arguments kept internally, make internal copy. When returning heap-allocated data, write to address ร  la memcpy.

int init(void *obj, int n, double *x);

On return, x's contents may be freed.

int recv(void *obj, int n, double *x);

On return,x points to at least n elements of etc.

Test malloc failures explicitly

Dev machine has tons of memory malloc never fails and significant error handling code is not covered by tests.

This requires adding a custom allocator which counts calls and intentionally fails after a specific number of calls. The unit tests should cover malloc failures by checking return codes.

inspired by http://stackoverflow.com/questions/3868716

Consistent nbytes method

Every sd_ struct interface should have an uint32_t (*nbytes)(sd_ *) method which returns the number of bytes used by that interface. This should include the internal implementation storage as well as the interface struct(s). sd_hist provides such a method & implementation and other structs should have the same.

error handler and log system

  • implement log msg handlers
  • error handler
  • library calls return 0 for success or non-zero for some error
  • err handler called with string reason
  • user can set own handler or no handler
  • macro for 'raising' error

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.