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
65
Brutal.Jolt/Generated/Classes/LFHMAllocatorContext.gen.cs
Normal file
65
Brutal.Jolt/Generated/Classes/LFHMAllocatorContext.gen.cs
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
// <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 context object for a lock free hash map that allocates a larger memory block at once and hands it
|
||||
/// out in smaller portions. This avoids contention on the atomic LFHMAllocator::mWriteOffset.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Core/LockFreeHashMap.h#L48">Jolt/Core/LockFreeHashMap.h:48</see>
|
||||
/// <br/>
|
||||
/// <c>class LFHMAllocatorContext : public NonCopyable</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
[InteropHandle]
|
||||
public readonly partial struct LFHMAllocatorContext : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Construct a new allocator context
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Core/LockFreeHashMap.h#L52">Jolt/Core/LockFreeHashMap.h:52</see>
|
||||
/// <br/>
|
||||
/// <c>inline LFHMAllocatorContext(LFHMAllocator &inAllocator, uint32 inBlockSize)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static LFHMAllocatorContext Create(LFHMAllocator allocator, uint blockSize) =>
|
||||
Jolt.PInvoke.LFHMAllocatorContext_Create(allocator, blockSize);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Allocate data block
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Core/LockFreeHashMap.h#L59">Jolt/Core/LockFreeHashMap.h:59</see>
|
||||
/// <br/>
|
||||
/// <c>inline bool Allocate(uint32 inSize, uint32 inAlignment, uint32 &outWriteOffset)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <code>
|
||||
/// @brief Allocate data block
|
||||
/// @param inSize Size of block to allocate.
|
||||
/// @param inAlignment Alignment of block to allocate.
|
||||
/// @param outWriteOffset Offset in buffer where block is located
|
||||
/// @return True if allocation succeeded
|
||||
/// </code>
|
||||
/// </remarks>
|
||||
public bool Allocate(uint size, uint alignment, out uint writeOffset) =>
|
||||
Jolt.PInvoke.LFHMAllocatorContext_Allocate(this, size, alignment, out writeOffset);
|
||||
|
||||
public void Dispose() => Jolt.PInvoke.LFHMAllocatorContext_Destroy(this);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue