static public void FromVtArray(VtInt64Array input, ref long[] output) { if (output.Length != input.size()) { output = UsdIo.ArrayAllocator.Malloc <long>(input.size()); } unsafe { fixed(long *p = output) { input.CopyToArray((IntPtr)p); } } }
// Convenience API: generates garbage, do not use when performance matters. static public long[] FromVtArray(VtInt64Array input) { long[] output = UsdIo.ArrayAllocator.Malloc <long>(input.size()); FromVtArray(input, ref output); return(output); }