> Am I right in thinking this should work with NDArrays of different data types or dimensions,
> at least if the driver or plugin maintained different NDArrayPool instances?
That is correct, there is no restriction on the dimensions or datatypes. There is no need to maintain different NDArrayPool instances. The datatype and dimensions of an array from the pool are always reset to those requested. If the memory in the existing array is sufficient it just uses that buffer, if not it frees and reallocates.
This means that there is potentially a small performance penalty because if the array data buffer found in the pool is too small it will free and allocate memory. Over time all of the arrays in the pool will probably be sized to hold the largest array and then no more reallocation will be done.
Mark
________________________________________
From: Pearson, Matthew R. [[email protected]]
Sent: Friday, September 23, 2016 7:41 AM
To: Mark Rivers
Cc: Hinxx; [email protected] list
Subject: Re: areaDetector plugin with multiple outputs
Hi Mark,
Am I right in thinking this should work with NDArrays of different data types or dimensions, at least if the driver or plugin maintained different NDArrayPool instances?
Cheers,
Matt
> On Sep 23, 2016, at 8:04 AM, Mark Rivers <[email protected]> wrote:
>
> Hi Hinko,
>
>> To answer my own question, I think the NDPluginTimeSeries::doTimeSeriesCallbacks() does what I'm after.
>
> Yes, that is correct. Each NDArray callbacks is done with a different asyn "addr". So the plugin must pass the flag ASYN_MULTIDEVICE in the constructor and downstream plugins must subscribe for callbacks using the appropriate "addr".
>
> This is a search to see what plugins call doCallbacksGenericPointer with a non-zero final argument:
>
> NDPluginCircularBuff.cpp: doCallbacksGenericPointer(preBuffer_->readFromStart(), NDArrayData, 0);
> NDPluginCircularBuff.cpp: doCallbacksGenericPointer(preBuffer_->readNext(), NDArrayData, 0);
> NDPluginCircularBuff.cpp: doCallbacksGenericPointer(pArrayCpy, NDArrayData, 0);
> NDPluginColorConvert.cpp: doCallbacksGenericPointer(this->pArrays[0], NDArrayData, 0);
> NDPluginFFT.cpp: doCallbacksGenericPointer(pArrayOut, NDArrayData, 0);
> NDPluginFile.cpp: doCallbacksGenericPointer(pArray, NDArrayData, 0);
> NDPluginFile.cpp: doCallbacksGenericPointer(pArrayOut, NDArrayData, 0);
> NDPluginOverlay.cpp: doCallbacksGenericPointer(this->pArrays[0], NDArrayData, 0);
> NDPluginProcess.cpp: doCallbacksGenericPointer( pArrayOut, NDArrayData, 0);
> NDPluginROI.cpp: doCallbacksGenericPointer(this->pArrays[0], NDArrayData, 0);
> NDPluginROIStat.cpp: doCallbacksGenericPointer(pArrayOut, NDArrayData, 0);
> NDPluginStats.cpp: doCallbacksGenericPointer(pArrayOut, NDArrayData, 0);
> NDPluginTimeSeries.cpp: doCallbacksGenericPointer(pArrayOut, NDArrayData, numSignals_);
> NDPluginTimeSeries.cpp: doCallbacksGenericPointer(pArray, NDArrayData, signal);
> NDPluginTransform.cpp: doCallbacksGenericPointer(transformedArray, NDArrayData,0);
> NDPosPlugin.cpp: doCallbacksGenericPointer(this->pArrays[0], NDArrayData, 0);
>
> So of the standard plugins in ADCore only NDPluginTimeSeries does this.
>
> Mark
>
> ________________________________
> From: [email protected] [[email protected]] on behalf of Hinxx [[email protected]]
> Sent: Friday, September 23, 2016 6:44 AM
> To: [email protected]
> Subject: Re: areaDetector plugin with multiple outputs
>
> To answer my own question, I think the NDPluginTimeSeries::doTimeSeriesCallbacks() does what I'm after.
>
> On 09/23/2016 10:41 AM, Hinxx wrote:
> Hi,
>
> I would like to have a single input array into areaDetector plugin and have the plugin deliver multiple arrays as output. Is this possible? Are there any examples?
> I would then like to feed the output arrays into other areaDetector plugins.
>
> Thanks,
> Hinko
>
>
>
- References:
- areaDetector plugin with multiple outputs Hinxx
- Re: areaDetector plugin with multiple outputs Hinxx
- RE: areaDetector plugin with multiple outputs Mark Rivers
- Re: areaDetector plugin with multiple outputs Pearson, Matthew R.
- Navigate by Date:
- Prev:
Re: areaDetector plugin with multiple outputs Pearson, Matthew R.
- Next:
Andor SDK3 issue - AT_WaitBuffer fails Pearson, Matthew R.
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
<2016>
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: areaDetector plugin with multiple outputs Pearson, Matthew R.
- Next:
Andor SDK3 issue - AT_WaitBuffer fails Pearson, Matthew R.
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
<2016>
2017
2018
2019
2020
2021
2022
2023
2024
|