Swap two memory spaces */
| 67 | |
| 68 | /** Swap two memory spaces */ |
| 69 | void swap(Memory &m) { |
| 70 | std::swap(device_id, m.device_id); |
| 71 | std::swap(count, m.count); |
| 72 | std::swap(capacity, m.capacity); |
| 73 | std::swap(stream, m.stream); |
| 74 | std::swap(refer_count, m.refer_count); |
| 75 | std::swap(host_ptr, m.host_ptr); |
| 76 | std::swap(device_ptr, m.device_ptr); |
| 77 | } |
| 78 | |
| 79 | __host__ __device__ Data &operator[](Index index) { |
| 80 | #ifdef __CUDA_ARCH__ |
no outgoing calls
no test coverage detected