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