SyncValueIndexFromGPU syncs given value from GPU device memory to CPU host memory, specifying value by index for given named variable, in given set. Variable can only only be Storage memory -- otherwise an error is returned.
(set int, varNm string, valIndex int)
| 363 | // specifying value by index for given named variable, in given set. |
| 364 | // Variable can only only be Storage memory -- otherwise an error is returned. |
| 365 | func (mm *Memory) SyncValueIndexFromGPU(set int, varNm string, valIndex int) error { |
| 366 | mr, err := mm.SyncRegionValueIndex(set, varNm, valIndex) |
| 367 | if err != nil { |
| 368 | return err |
| 369 | } |
| 370 | mm.TransferRegsFromGPU([]MemReg{mr}) |
| 371 | return nil |
| 372 | } |
| 373 | |
| 374 | // SyncStorageRegionsFromGPU syncs given regions from the Storage buffer memory |
| 375 | // from GPU to CPU, in one call. Use SyncRegValueIndexFromCPU to get the regions. |