Skip to content

buffer size #26

Open
Open

Description

@samuelgarcia

@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

Activity

  1. fpbattaglia commented on May 19, 2020

    @fpbattaglia
    Collaborator
  2. samuelgarcia commented on May 19, 2020

    @samuelgarcia
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions