Class BarracudaArray
A BarracudaArray exposes a buffer of native memory to managed code.
Inheritance
BarracudaArray
Syntax
public class BarracudaArray : IDisposable
Constructors
BarracudaArray(Int32, DataType, Allocator)
Declaration
public BarracudaArray(int length, DataType dataType = DataType.Float, Allocator allocator = Allocator.Persistent)
Parameters
BarracudaArray(SafeHandle, DataType, Int32)
Declaration
protected BarracudaArray(SafeHandle safeHandle, DataType dataType, int dataLength)
Parameters
Fields
m_SafeHandle
Declaration
protected readonly SafeHandle m_SafeHandle
Field Value
Properties
Disposed
Declaration
public bool Disposed { get; }
Property Value
Item[Int32]
Declaration
public float this[int index] { get; set; }
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Property Value
Item[Int64]
Declaration
public float this[long index] { get; set; }
Parameters
Type |
Name |
Description |
Int64 |
index |
|
Property Value
Length
Declaration
public int Length { get; }
Property Value
LongLength
Declaration
public long LongLength { get; }
Property Value
RawPtr
Declaration
public virtual void *RawPtr { get; }
Property Value
SizeOfType
Declaration
public int SizeOfType { get; }
Property Value
Type
Declaration
public DataType Type { get; }
Property Value
Methods
AddressAt(Int64)
Declaration
public float *AddressAt(long index)
Parameters
Type |
Name |
Description |
Int64 |
index |
|
Returns
BlockCopy(Byte[], Int32, BarracudaArray, Int32, Int32)
Declaration
public static void BlockCopy(byte[] sourceArray, int sourceByteOffset, BarracudaArray destinationArray, int destinationByteOffset, int lengthInBytes)
Parameters
BlockCopy(BarracudaArray, Int32, Byte[], Int32, Int32)
Declaration
public static void BlockCopy(BarracudaArray sourceArray, int sourceByteOffset, byte[] destinationArray, int destinationByteOffset, int lengthInBytes)
Parameters
Copy(Single[], Int32, BarracudaArray, Int32, Int32)
Declaration
public static void Copy(float[] sourceArray, int sourceIndex, BarracudaArray destinationArray, int destinationIndex, int length)
Parameters
Copy(Single[], Int32, BarracudaArray, Int64, Int32)
Declaration
public static void Copy(float[] sourceArray, int sourceIndex, BarracudaArray destinationArray, long destinationIndex, int length)
Parameters
Copy(Single[], BarracudaArray, Int32)
Declaration
public static void Copy(float[] sourceArray, BarracudaArray destinationArray, int length = -1)
Parameters
Copy(BarracudaArray, Int32, Single[], Int32, Int32)
Declaration
public static void Copy(BarracudaArray sourceArray, int sourceIndex, float[] destinationArray, int destinationIndex, int length)
Parameters
Copy(BarracudaArray, Int32, BarracudaArray, Int32, Int32)
Declaration
public static void Copy(BarracudaArray sourceArray, int sourceIndex, BarracudaArray destinationArray, int destinationIndex, int length)
Parameters
Copy(BarracudaArray, BarracudaArray, Int32)
Declaration
public static void Copy(BarracudaArray sourceArray, BarracudaArray destinationArray, int length = -1)
Parameters
CopyTo(BarracudaArray, Int32)
Declaration
public void CopyTo(BarracudaArray dst, int dstOffset)
Parameters
CopyTo(BarracudaArray, Int64)
Declaration
public void CopyTo(BarracudaArray dst, long dstOffset)
Parameters
DataAlignmentSize(DataType)
Declaration
public static int DataAlignmentSize(DataType dataType)
Parameters
Returns
DataItemSize(DataType)
Declaration
public static int DataItemSize(DataType dataType)
Parameters
Returns
Dispose()
Declaration
public virtual void Dispose()
Implements
GetFloat(Int32)
Declaration
public float GetFloat(int index)
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Returns
GetHalf(Int32)
Declaration
public half GetHalf(int index)
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Returns
HalfAddressAt(Int64)
Declaration
public half*HalfAddressAt(long index)
Parameters
Type |
Name |
Description |
Int64 |
index |
|
Returns
LengthWithPaddingForGPUCopy(DataType, Int32)
Declaration
public static int LengthWithPaddingForGPUCopy(DataType dataType, int length)
Parameters
Returns
RawAddressAt(Int64)
Declaration
public void *RawAddressAt(long index)
Parameters
Type |
Name |
Description |
Int64 |
index |
|
Returns
SetFloat(Int32, Single)
Declaration
public void SetFloat(int index, float value)
Parameters
SetHalf(Int32, half)
Declaration
public void SetHalf(int index, half value)
Parameters
UploadToComputeBuffer(ComputeBuffer)
Declaration
public void UploadToComputeBuffer(ComputeBuffer buffer)
Parameters
UploadToComputeBuffer(ComputeBuffer, Int32, Int32, Int32)
Declaration
public void UploadToComputeBuffer(ComputeBuffer buffer, int elementStartIndex, int computeBufferStartIndex, int numElementToCopy)
Parameters
ZeroMemory()
Declaration
Operators
Implicit(BarracudaArray to Single[])
Warning, this return a copy! Do not use to modify a BarracudaArray
Declaration
public static implicit operator float[](BarracudaArray barracudaArray)
Parameters
Returns