toHost

allocate host memory and copy device memory content

  1. ref toHost(M m, T[] host)
  2. auto toHost(M m, T* host)
  3. auto toHost(M m)
    version(grain_cuda)
    toHost
    (
    M
    )
    (
    ref M m
    )

Examples

foreach (i; 0 .. 100) {
    auto d = CuPtr!float([3.0]);
    assert(d.toHost() == [3.0]);
}

Meta