Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buffer size #26

Open
samuelgarcia opened this issue May 19, 2020 · 2 comments
Open

buffer size #26

samuelgarcia opened this issue May 19, 2020 · 2 comments

Comments

@samuelgarcia
Copy link

@fpbattaglia @Claybarn

Hi all,
I manage to make my first python plugin and connect realtime tridesclous spike sorting engine.
I have a problem to solve : I need to known the buffer shpae before it start to preallocate buffer on GPU.

In short the def bufferfunction() callback function give an array (n_chan, n_sampl).
n_chan is known at startup but is there a way to known n_sampl before it start (before the frist bufferfunction call) ?

Having a short look at code https://github.com/NeuroNetMem/PythonPlugin/blob/master/PythonPlugin/PythonPlugin.cpp#L146

It appear that this n_sampl is known only when a buffer arrive.
But the getNumSamples(0) suggest that we can know in advance the big buffer size (all channels) and then maybe we could anticipate this n_sampl.

Thanks for the help, this detail is quite important for my need.

And congratulation again for this piece of code.

Samuel

@fpbattaglia
Copy link
Collaborator

fpbattaglia commented May 19, 2020 via email

@samuelgarcia
Copy link
Author

Hi Francesco,
thanks for the anwser.
At the moment in tridesclous with GPU buffer has to be fixe size.

My plan is to add a processing step that equalize buffer size. Make it smaller when it is too big. Concatenate with following buffer when it is too small.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants