mirror of
https://github.com/NVIDIA/cuda-samples.git
synced 2026-11-18 09:58:18 +08:00
Sync v13.5-public from internal repo
This commit is contained in:
@@ -33,8 +33,10 @@
|
||||
template <typename T> struct DeviceData
|
||||
{
|
||||
T *dPos[2]; // mapped host pointers
|
||||
T *dReadScratch;
|
||||
T *dVel;
|
||||
cudaEvent_t event;
|
||||
cudaStream_t stream;
|
||||
unsigned int offset;
|
||||
unsigned int numBodies;
|
||||
};
|
||||
@@ -66,6 +68,12 @@ public:
|
||||
|
||||
virtual unsigned int getNumBodies() const { return m_numBodies; }
|
||||
|
||||
// Stream that GPU0 kernels (and PBO map/unmap) are issued on. Single-GPU
|
||||
// leaves this as the legacy default stream (0); multi-GPU uses a
|
||||
// non-blocking stream. Benchmark / FPS timing must record on this stream
|
||||
// rather than hard-coding 0.
|
||||
cudaStream_t getComputeStream() const { return m_deviceData[0].stream; }
|
||||
|
||||
protected: // methods
|
||||
BodySystemCUDA() {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user