 |
|
|
|
Actions
|
|
[ Date Prev][ Date Next][ Thread Prev][ Thread Next][ Date Index][ Thread Index]
Re: [vsipl++] [patch] pwarp
- Subject: Re: [vsipl++] [patch] pwarp
- From: Jules Bergmann <jules@xxxxxxxxxxxxxxxx>
- Date: Thu, 13 Dec 2007 13:56:30 -0500
Stefan Seefeld wrote:
Jules Bergmann wrote:
Why can't we just test the spe_program_handle_t* for uniqueness? Then
we can decentralize the selection of the right spe_program_handle_t* to
the PPU bridge functions, and task_manager will just have to remember
the last task loaded to avoid the extra reload.
Indeed, the spe_program_handle pointer is unique, too. However:
1) if we don't use embedded images, a call to get_image() will actually
load the kernel first, so we'd need to add some more cachine logic.
get_image() still returns a (presumably) unique pointer to an image right?
A bridge function might look like:
template <typename T>
Choose;
template <>
struct Choose<float>
{
private:
static spe_program_handle_t* image_;
public:
static spe_program_handle_t* image()
{
if (image_ == NULL)
image_ get_image(path...)
return image_;
}
};
... other specializations for other types ...
template <typename T>
...
vmul(...)
{
spe_program_handle_t* pgm = Choose<T>::image();
... = task_manager.instance(pgm)
}
2) With SDK 3.0 (which we are going to adapt sooner or later anyhow), we
don't have access to that any more, or at least not in that raw form.
You mean ALF 3.0, right? I'm assuming libspe2 doesn't take away
functionality.
What does ALF 3.0 force us to do here?
-- jules
--
Jules Bergmann
CodeSourcery
jules@xxxxxxxxxxxxxxxx
(650) 331-3385 x705
|
|