Documentation
|
|
Returns a device pointer to the data. More...
| template<typename T > | |
| T * | device () const |
Returns a device pointer to the data.
Device-side pointer to matrix data. Data stored in column-major (Fortran) order. No need to free this, but unlock() when finished to allow garbage collection.
This function does not implement copy-on-write semantics when another array points to same data. Since memory returned by this call may be modified at any point, other arrays sharing this device memory are in danger of modification without copy-on-write semantics. The following example demonstrates how A is modified inadvertently.
Use copy() to manually create copies