Subject: Re: [boost] Namespace policy: putting names in boost::detail
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2011-07-04 13:44:08
On 04/07/2011 18:53, Vicente Botet wrote:
> Mathias Gaunard-2 wrote:
>> A GSoC student and I are currently converting a library to use the
>> namespace boost::simd.
>> Some of the implementation details of the library are not simd-specific,
>> and we would like to use them in some other libraries that extend
>> Would it be ok to put them in the boost::detail namespace, or is that
>> considered as bad as putting stuff in the boost namespace?
>> We need to inject overloads and specializations into a unique namespace
>> for boost.simd and NT2, so we could need two names, like
>> boost::detail::dispatch and boost::detail::specialize.
> What kind of dispatch and specializations do you need to share that they can
> not be on simd? Maybe some more context will help.
NT2 and Boost.SIMD use a fully externalizable function dispatching and
In NT2, we have some functions, like plus, multiplies, etc. that work on
a variety of types: scalars, simd packs, expression trees, tables,
matrices, polynoms, etc.
Each function can thus be specialized many times, some times just for
particular scalars or simd pack types for example.
All specializations of all functions are provided as specializations of
the same class.
The dispatching uses overloading to select the best specialization
available using partial ordering.
It already relies on ADL tricks so I don't think we can be very flexible
with regards to namespaces.
Boost.SIMD will only contain the scalar and simd packs specializations,
and we would need to add the other versions of NT2.
Actually, I think it might be better to put all that in the namespace
boost::detail::dispatch (or even boost::dispatch), as some kind of
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk