htm.core icon indicating copy to clipboard operation
htm.core copied to clipboard

Multi-Threaded RDSE

Open aamir-gmail opened this issue 5 years ago • 5 comments

Please confirm if RDSE encoder in single-threaded, if yes would you be open to making it multithreaded. I am encoding a lot of floating-point numbers through it and find it to be slow.

aamir-gmail avatar Mar 14 '21 05:03 aamir-gmail

Yes it is single threaded. Yes, we are open to modifications that anyone would like to make to any algorithm. All we ask is that it include a Unit Test that proves that it works, one that can be added to our regression test. Additional documentation is always useful. It must run on Linux, OSx, and Windows. When a Pull Request is posted, it will be reviewed and then merged. We tend to nit pick during the reviews but that makes for a better library.

None of the algorithms in the library are multi-threaded so be careful to make anything you use re-entrant and put locks on access to shared values... you probably know the drill.

dkeeney avatar Mar 14 '21 13:03 dkeeney

Hi,

I took a look at the source code for the RDSE and I think it should be usable with multiple threads, under the following condition: The output SDR's are not used by multiple threads while they are being written to by the encoder.

ctrl-z-9000-times avatar Mar 14 '21 21:03 ctrl-z-9000-times

We have an own implementation of RDSE using lookup table, which is calculated very quickly only one time by initialization. So that we do not need any multithreaded!

Thanh-Binh avatar Mar 15 '21 07:03 Thanh-Binh

We have an own implementation of RDSE using lookup table, which is calculated very quickly only one time by initialization. So that we do not need any multithreaded!

Yes that what I ended up doing.

aamir-gmail avatar Mar 30 '21 00:03 aamir-gmail

I guess to keep this on your radar for future work, if there is nothing further to be added please close this issue

aamir-gmail avatar Mar 30 '21 01:03 aamir-gmail