GithubHelp home page GithubHelp logo

mtak- / lstm Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 0.0 600 KB

lstm is a header only C++14 take on Software Transactional Memory (STM)

License: MIT License

CMake 1.74% C++ 97.87% Python 0.40%

lstm's People

Contributors

mtak- avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lstm's Issues

support for read_only transactions

There's substantial overhead in maintaining the read/write sets. For read only transactions, maintaining the read/write sets is totally unnecessary AFAICT. This means lookups in the write set can be avoided, as well as adding elements to the read set.

read_write transactions should be allowed to call read_only transactions. This implies a branch is required to decide if the transaction really is in read_only mode or in read_write mode (in which case checking the write set and maintaining the read set cannot be avoided).

There must be a way to avoid this branch in known read_write transactions.

support for RCU transactions read_only/read_write

Currently, users have access to the low level RCU primitives through thread_data if desired. It would be convenient to add some wrappers similar to read_write to handle the bookkeeping for the user.

This will need some experimentation if STM and RCU are to play nicely together. In order to publish data in a way that works well with the STM side of things, vars will need to have some seqlock style API. I'm not even sure if STM should be allowed to call RCU code.

make transaction trivially copy/move constructible, maybe not assignable

transaction is more or less a handle to thread_data with some additional info:

  • transaction_domain* domain_ which never gets mutated (and in fact cannot be mutated)
  • gp_t read_version which can only be mutated from outside the rootmost closure passed into a read_write block; moreover, read_version is really just a non-atomic version of the grace period in thread_data. It's possible this variable should be nuked altogether (benchmark).

This means transaction could be passed around by value avoiding the extra indirection. If we do that, the name of the class maybe should change to reflect that it's a handle/context and users are free to copy it about, though assigning it doesn't really make sense (it's kind of a const handle?).

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.