[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Octave and CUDA
From: |
mpender |
Subject: |
Re: Octave and CUDA |
Date: |
Tue, 21 Jan 2014 18:27:02 -0800 (PST) |
>You can probably do it by storing a pointer reinterpret_cast'ed to
>integer into an Octave variable, and using that "integer" as handle. In
>the case of GPU memory, you'd cuda_malloc the block and then cast
>the resulting pointer; or you could even construct your own C++ data
>structure holding the CUDA memory pointer plus additional data you want,
>and store a pointer to your internal data structure in the Octave integer.
I'm attempting to do this now, but am stuck on the syntax required within a
C++ function to recast the passed Octave integer into a pointer that can be
used to free the memory block. Everything seems to work when I do it
within the same C++ file, but for this to work well the memory must be
persistent across multiple calls to C++/Oct files.
I've created a new thread to track this as a new question:
http://octave.1599824.n4.nabble.com/Casting-from-an-Octave-int-value-to-a-pointer-td4661233.html
--
View this message in context:
http://octave.1599824.n4.nabble.com/Octave-and-CUDA-tp4660998p4661235.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Octave and CUDA, mpender, 2014/01/12
- Re: Octave and CUDA, mpender, 2014/01/13
- Re: Octave and CUDA, Daniel Kraft, 2014/01/13
- Message not available
- Re: Octave and CUDA, Daniel Kraft, 2014/01/13
- Re: Octave and CUDA, mpender, 2014/01/14
- Re: Octave and CUDA, Jordi GutiƩrrez Hermoso, 2014/01/14
- Re: Octave and CUDA, Mike Puglia, 2014/01/14
- Re: Octave and CUDA, mpender, 2014/01/16
- Re: Octave and CUDA, mpender, 2014/01/14
- Re: Octave and CUDA,
mpender <=