> Hi Matias,
> 
> The odp_time_local and others functions are time sensitive functions,
> that's why it was decided to avoid copping as more as possible.
> 
> The timespec is not simple "long type". Its type is arch dependent but is 
> always
> 64bit.
> In case of 32 bit system it's defined as long long.
> The same for odp_time_t struct. So, at least for now it seems to be the same 
> for
> both 32 and 64 bit systems.

Hi Ivan,

At least for 32/64-bit Ubuntu this is not the case. On a 32-bit system (Ubuntu 
16.04) the size of struct timespec is 8 bytes (type is long int) and on a 
64-bit system it is 16 bytes. The validation tests were failing before this 
patch on a 32-bit system.

When it comes to the performance, I wouldn't believe this patch having much of 
an impact. It's an inline function and the compiler should be able to  optimize 
out the added copy operations.

-Matias

And I think Bill Fischofer knew about this while adding
> this
> ,at first glance, strange union, right Bill?
> Yes, it's not the best decision from style point of view, but it's fast and 
> in case of
> an error
> is supposed to be caught by time validation tests.
> 

_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to