ILNumerics Ultimate VS

BaseStorageT, LocalT, InT, OutT, RetT, StorageTDetach Method

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
Makes sure that this array / storage can be written to without affecting any other arrays may sharing data, enabling write access.

[ILNumerics Core Module]

Namespace:  ILNumerics.Core.StorageLayer
Assembly:  ILNumerics.Core (in ILNumerics.Core.dll) Version: 5.5.0.0 (5.5.7503.3146)
Syntax

public virtual void Detach(
	uint targetDeviceID = 0
)

Parameters

targetDeviceID (Optional)
Type: SystemUInt32
[Optional] The device the current data of this storages device specific memory shall be copied onto.
Remarks

This function ensures that...
  • this storage uses memory which is not shared by other storages. If memory is currently shared, the memorys data is copied to a new memory region which is then current to this storage.

Note that this function does not check whether this storage is shared by multiple arrays (InArray, local array, output arrays, return arrays). While during common use and when accessing a local array this local array will be the only array referencing the storage there are situations when other arrays may reference a storage. Examples include the handling of input array types and when local arrays (ArrayT) is stored as fields in classes. Therefore, it is recommended to ensure that no other arrays currently exist and share this storage: ReferenceCount == 1. If required, create a new local array and assign this array to it. If this storage was accessed through a local array (ArrayT), assign by C as the right side of the assignment.

[ILNumerics Core Module]

See Also

Reference