[Bf-committers] CPUDevice and implementation selection (native/sse2/sse3)

Chad Fraleigh chadf at triularity.org
Tue Feb 12 00:06:39 CET 2013


On Mon, Feb 11, 2013 at 2:58 PM, Chad Fraleigh <chadf at triularity.org> wrote:
> The other thing is since CPUDeviceTask is already OO-based, rather
> than doing checks each time an optimizable method is called to
> determine what implementation to use, wouldn't it be cleaner to make
> CPUDeviceTask semi-abstract and create three sub-classes (e.g.
> BasicCPUDeviceTask, SSE2CPUDeviceTask, SSE3CPUDeviceTask) with each
> custom impl and just have task_add() [or something] decide which to
> create?

Oops.. drop the 'Task' suffixes from those comments. I saw
CPUDeviceTask being declared mid way through CPUDevice and thought the
methods after it where in that class instead. This is a _very_
confusing place to declare another class!


-Chad


More information about the Bf-committers mailing list