mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
65 lines
2.4 KiB
C#
65 lines
2.4 KiB
C#
// <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>
|
|
/// Implementation of the Barrier class for a JobSystem
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Core/JobSystemWithBarrier.h#L23">Jolt/Core/JobSystemWithBarrier.h:23</see>
|
|
/// <br/>
|
|
/// <c>class JobSystemWithBarrier : public JobSystem</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Implementation of the Barrier class for a JobSystem
|
|
///
|
|
/// This class can be used to make it easier to create a new JobSystem implementation that integrates with your own job system.
|
|
/// It will implement all functionality relating to barriers, so the only functions that are left to be implemented are:
|
|
///
|
|
/// * JobSystem::GetMaxConcurrency
|
|
/// * JobSystem::CreateJob
|
|
/// * JobSystem::FreeJob
|
|
/// * JobSystem::QueueJob/QueueJobs
|
|
///
|
|
/// See instructions in JobSystem for more information on how to implement these.
|
|
/// </code>
|
|
/// </remarks>
|
|
[InteropHandle]
|
|
public readonly partial struct JobSystemWithBarrier
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// Initialize the barriers
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Core/JobSystemWithBarrier.h#L36">Jolt/Core/JobSystemWithBarrier.h:36</see>
|
|
/// <br/>
|
|
/// <c>void Init(uint inMaxBarriers)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Initialize the barriers
|
|
/// @param inMaxBarriers Max number of barriers that can be allocated at any time
|
|
/// </code>
|
|
/// </remarks>
|
|
public void Init(uint maxBarriers) => Jolt.PInvoke.JobSystemWithBarrier_Init(this, maxBarriers);
|
|
|
|
public static implicit operator JobSystem(JobSystemWithBarrier value) =>
|
|
Unsafe.BitCast<JobSystemWithBarrier, JobSystem>(value);
|
|
|
|
/// <inheritdoc cref="JobSystem.GetMaxConcurrency()"/>
|
|
public int GetMaxConcurrency() => ((JobSystem)this).GetMaxConcurrency();
|
|
}
|
|
}
|