< Summary

Class:GDX.Jobs.ParallelFor.IntegerBufferFillJob
Assembly:GDX
File(s):./Packages/com.dotbunny.gdx/GDX/Jobs/ParallelFor/IntegerBufferFillJob.cs
Covered lines:0
Uncovered lines:3
Coverable lines:3
Total lines:39
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)

./Packages/com.dotbunny.gdx/GDX/Jobs/ParallelFor/IntegerBufferFillJob.cs

#LineLine coverage
 1// Copyright (c) 2020-2024 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.Burst;
 6using Unity.Collections;
 7using Unity.Jobs;
 8
 9namespace GDX.Jobs.ParallelFor
 10{
 11    /// <summary>
 12    ///     Fills a <see cref="Unity.Collections.NativeArray{T}" /> typed as <see cref="System.Int32" /> with a value in
 13    ///     parallel.
 14    /// </summary>
 15    [BurstCompile]
 16    public struct IntegerBufferFillJob : IJobParallelFor
 17    {
 18        /// <summary>
 19        ///     <para>The <see cref="Unity.Collections.NativeArray{T}" /> which is going to be filled.</para>
 20        /// </summary>
 21        /// <remarks>Write-only.</remarks>
 22        [WriteOnly] public NativeArray<int> Buffer;
 23
 24        /// <summary>
 25        ///     <para>The <see cref="System.Int32" /> value to fill the native array with.</para>
 26        /// </summary>
 27        /// <remarks>Read-only.</remarks>
 28        [ReadOnly] public int FillValue;
 29
 30        /// <summary>
 31        ///     Executable work for the provided index.
 32        /// </summary>
 33        /// <param name="index">The index of the Parallel for loop at which to perform work.</param>
 34        public void Execute(int index)
 035        {
 036            Buffer[index] = FillValue;
 037        }
 38    }
 39}

Methods/Properties

Execute(System.Int32)