Swig generated interface of NuPic C++

Hi,

I am new to NuPic and HTM.

As far as I know NuPic Python was created with a Swig interface file generated from C++ API.

I am working with millions of transactions a day in real time and I need to use NuPic with a more performatic language like Go, Rust or even C++.

How can I have access to the interface (*.i) file generated by Swig and directly work with the C++ API ?
Where can I find the documentation to the C++ API ?
Is there any one who is using NuPic with C++ or Go ?

Thanks in advance

1 Like

You could just use nupic.core. The docs are here.

On what system would you like to run your code?

1 Like

Ubuntu 16

Thank you

Let us know if you run into any issues.

Hi chhenning,

Sorry for the delay, but I was blocked for Replies. Now everything seems ok.

I will try and let you know.

As far as could see, nupic.core is a community fork, I can use it to try to generate a swig interface for Go, no problem. But they say:
“As changes are made to the production version, the changes will be migrated into this fork when resources are available from the community”

Is there any way to have access to the production repo, and generate with swig integration with other languages ?

Thanks for your messages

@mvbaffa Why do you say that nupic.core is a community fork? It’s made by Numenta and it’s the main building block for Numenta’s Platform for Intelligent Computing. Basically a cpp implementation of the htm algorithm and much more.

Now, I’m not a swig expert. But in it’s current state the swig interface works with python 2.7. I’m not sure about other languages like Go. I have a feeling that’s not gonna be easy. I might be wrong…

You are correct, the repo I was looking at was a community fork but the one you have indicated is was the official one.

Talking about Swig, it not gonna be easy, in fact it will very hard, I presume. I have used Swig for small libraries if compared to nupic.core.

It would be easier if Numenta could give us a kind of tutorial not for Swig but for the header files for the API we should try to integrate.

Can the current python bindings inform this?

Thanks, I will check it out

I think you should pay particular attention to PyRegion. Remember that this is only exposing components of the Network API. The OPF is all written in Python.

Ok. Thanks

In src/nupic/bindings I have found the “.I” files.

These are the files that swig uses to generate the wrappers. I will try with these files. It is not easy but, maybe I can have success.

Thanks

1 Like