public void Cauchy(NDArray result, int?seed, float median, float sigma) { using (var cpuCopy = new NDArray(cpuAllocator, result.ElementType, result.Shape)) { cpuRandom.Cauchy(cpuCopy, seed, median, sigma); TOps.Copy(result, cpuCopy); } }
public void Cauchy(Tensor result, int?seed, float median, float sigma) { using (Tensor cpuCopy = new Tensor(cpuAllocator, result.ElementType, result.Sizes)) { cpuRandom.Cauchy(cpuCopy, seed, median, sigma); Ops.Copy(result, cpuCopy); } }