mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-29 06:28:25 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
68
Brutal.Jolt/Generated/Classes/TempAllocator.gen.cs
Normal file
68
Brutal.Jolt/Generated/Classes/TempAllocator.gen.cs
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
// <auto-generated/>
|
||||
// Generated by Brutal.Jolt.Generate; do not edit by hand.
|
||||
#nullable enable
|
||||
|
||||
using System.Runtime.CompilerServices;
|
||||
using Brutal.Interop;
|
||||
using Brutal.Numerics;
|
||||
|
||||
namespace Brutal.JoltApi
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Allocator for temporary allocations. This allocator works as a stack: The blocks must always be freed in the
|
||||
/// reverse order as they are allocated. Note that allocations and frees can take place from different threads,
|
||||
/// but the order is guaranteed though job dependencies, so it is not needed to use any form of locking.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Core/TempAllocator.h#L15">Jolt/Core/TempAllocator.h:15</see>
|
||||
/// <br/>
|
||||
/// <c>class TempAllocator : public NonCopyable</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
[InteropHandle]
|
||||
public readonly partial struct TempAllocator
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Allocates inSize bytes of memory, returned memory address must be JPH_RVECTOR_ALIGNMENT byte aligned
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Core/TempAllocator.h#L27">Jolt/Core/TempAllocator.h:27</see>
|
||||
/// <br/>
|
||||
/// <c>virtual void * Allocate(uint inSize) = 0</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public unsafe Ptr Allocate(ByteSize size) => Jolt.PInvoke.TempAllocator_Allocate(this, (uint)size);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Frees inSize bytes of memory located at inAddress
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Core/TempAllocator.h#L30">Jolt/Core/TempAllocator.h:30</see>
|
||||
/// <br/>
|
||||
/// <c>virtual void Free(void *inAddress, uint inSize) = 0</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public unsafe void Free(Ptr address, ByteSize size) =>
|
||||
Jolt.PInvoke.TempAllocator_Free(this, address, (uint)size);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// If this allocator needs to fall back to aligned allocations because JPH_RVECTOR_ALIGNMENT is bigger than
|
||||
/// the platform default
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Core/TempAllocator.h#L21">Jolt/Core/TempAllocator.h:21</see>
|
||||
/// <br/>
|
||||
/// <c>static constexpr bool needs_aligned_allocate = JPH_RVECTOR_ALIGNMENT > JPH_DEFAULT_ALLOCATE_ALIGNMENT</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static bool GetNeeds_aligned_allocate() => Jolt.PInvoke.TempAllocator_GetNeeds_aligned_allocate();
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue