|
Ublas : |
Subject: Re: [ublas] [bindings] Problem with assertion in GGES
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2010-07-15 12:00:16
Marco Guazzone wrote:
>
> Maybe we could change "min_size_work" in this way:
>
> static std::ptrdiff_t min_size_work( const std::ptrdiff_t n ) {
> //return std::max< std::ptrdiff_t >( 1, 8*n + 16 );
> return std::max< std::ptrdiff_t >( 8*n, 6*n + 16 );//<-- NEW CHECK
> }
>
> NOTE: just an observation: the old size computation "max(1,8*n+16)"
> could have been replaced by return 8*n+16 since (provided n>0) this
> quantity is always greater than 1.
>
> Cheers,
Hello Marco,
thanks. It should be fixed in trunk. The min_size function is set at
if ( n == 0 ) {
return 1;
} else {
return std::max< std::ptrdiff_t >( 8*n, 6*n + 16 );
}
, and your example works.
Cheers,
Rutger