help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Writing GPU Array Type: Which Array Class to Inherit From?


From: David Bateman
Subject: Re: Writing GPU Array Type: Which Array Class to Inherit From?
Date: Tue, 07 Jul 2009 21:09:30 +0200
User-agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103)


Wouldn't it be better to inherit from octave_matrix and store a copy of the matrix in the original octave_matrix::matrix value and the version in GPU memory in the new class and synchronize the two values as needed.. You won't inherit the operators at the octave prompt if you inherit directly for a liboctave class.

D.



cjbattagl wrote:
I've written a GPUArray class that maintains a pointer to memory in GPU space
so that certain operations can be outsourced to the GPU. However, right now
I am inheriting from octave_base_value and only storing the device memory
pointer.

I would like to inherit my data type from a 2-dimensional array class so
that I can maintain both CPU and GPU memory (so that methods not yet
implemented on the GPU can be handled by the CPU- and swap data between
Host/Device memories only when necessary).

What would be the best Array or Matrix class for me to inherit from? The
liboctave folder is full of them! I would like my data type to work
interchangeably with standard matrix datatypes. i.e, would MArray2 be best?

Thanks!
Casey


--
David Bateman                                address@hidden
35 rue Gambetta                              +33 1 46 04 02 18 (Home)
92100 Boulogne-Billancourt FRANCE            +33 6 72 01 06 33 (Mob)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]