< Summary

Class:GDX.Jobs.ParallelFor.IntegerBufferSwapJob
Assembly:GDX
File(s):D:/BuildAgent/work/GDX-Documentation/Projects/GDX_Development/Packages/com.dotbunny.gdx/GDX/Jobs/ParallelFor/IntegerBufferSwapJob.cs
Covered lines:0
Uncovered lines:3
Coverable lines:3
Total lines:43
Line coverage:0% (0 of 3)
Covered branches:0
Total branches:0
Covered methods:0
Total methods:1
Method coverage:0% (0 of 1)

Coverage History

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Execute(...)0%2100%

File(s)

D:/BuildAgent/work/GDX-Documentation/Projects/GDX_Development/Packages/com.dotbunny.gdx/GDX/Jobs/ParallelFor/IntegerBufferSwapJob.cs

#LineLine coverage
 1// Copyright (c) 2020-2022 dotBunny Inc.
 2// dotBunny licenses this file to you under the BSL-1.0 license.
 3// See the LICENSE file in the project root for more information.
 4
 5using Unity.Collections;
 6using Unity.Jobs;
 7using Unity.Burst;
 8
 9namespace GDX.Jobs.ParallelFor
 10{
 11    /// <summary>
 12    ///     Swaps a <see cref="NativeArray{T}" /> typed as <see cref="int" /> with a another
 13    ///     in parallel.
 14    /// </summary>
 15    /// <remarks>
 16    ///     <para>
 17    ///         The <see cref="IntegerBufferSwapJob" /> relies on the <see cref="IJobParallelFor" /> which
 18    ///         requires UnityEngine.CoreModule.dll.
 19    ///     </para>
 20    /// </remarks>
 21    [BurstCompile]
 22    public struct IntegerBufferSwapJob : IJobParallelFor
 23    {
 24        /// <summary>
 25        ///     The left-hand side <see cref="NativeArray{T}" /> typed as <see cref="int" />.
 26        /// </summary>
 27        public NativeArray<int> A;
 28
 29        /// <summary>
 30        ///     The right-hand side <see cref="NativeArray{T}" /> typed as <see cref="int" />.
 31        /// </summary>
 32        public NativeArray<int> B;
 33
 34        /// <summary>
 35        /// Executable work for the provided index.
 36        /// </summary>
 37        /// <param name="index">The index of the Parallel for loop at which to perform work.</param>
 38        public void Execute(int index)
 039        {
 040            (A[index], B[index]) = (B[index], A[index]);
 041        }
 42    }
 43}

Methods/Properties

Execute(System.Int32)