OpenViBE forum

The OpenViBE community
It is currently Wed Oct 23, 2019 3:03 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: about signal data type
PostPosted: Wed Jan 16, 2019 11:41 am 
Offline

Joined: Mon Jan 14, 2019 1:57 pm
Posts: 3
طراحی سایت سئو سایت ثبت دامنه
hi friends
I am developping a driver and I just encountered something curious :
in the Designer, the type of signal samples is float64, so I though no precision would be lost if the driver acquires double precision data.
But in the driver, the buffer that has to be filled with these samples and sent to the callback function contains float32 samples.
I'm not sure but it seems to me that samples are cast from float32 to float64 in ovpCGenericNetworkAcquisition.cpp.
Why this choice ?
If a simple precision is enough, why are samples transformed into float64 in the Designer ?

Thanks


Last edited by siavash82ir on Sat Jun 15, 2019 8:08 am, edited 2 times in total.

Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 01, 2019 4:49 am 
Offline

Joined: Tue Feb 26, 2019 6:45 am
Posts: 3
For your first .apply example, you should try printing out the output of the to_numeric call each time and the data type. What you will find is that the numeric types will not match (you have uint64, int64, and float). In this case, we just collate the outputs together into an array-like (we have no idea that the function being used is to_numeric, so precision is moot), leading to the forced casting of float64.

Of the four examples, only your last one I would consider a bug. When we coerce, we should not crash because any "bad" elements are replaced with NaN. That means we need to catch OverflowError somewhere in the implementation.

_________________
android development


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Americanized by Maël Soucaze.