Skip to content

Commit

Permalink
Make all parsers as 'ref' struct
Browse files Browse the repository at this point in the history
  • Loading branch information
dme-compunet committed Jun 27, 2024
1 parent 38bec80 commit aeb82ee
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Source/YoloV8/Parsers/DetectionOutputParser.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Compunet.YoloV8.Parsers;

internal readonly struct DetectionOutputParser(YoloV8Metadata metadata, YoloV8Configuration configuration)
internal readonly ref struct DetectionOutputParser(YoloV8Metadata metadata, YoloV8Configuration configuration)
{
public BoundingBox[] Parse(Tensor<float> output, Size originSize)
{
Expand Down
2 changes: 1 addition & 1 deletion Source/YoloV8/Parsers/IndexedBoundingBoxParser.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Compunet.YoloV8.Parsers;

internal readonly struct IndexedBoundingBoxParser(YoloV8Metadata metadata, YoloV8Configuration configuration)
internal readonly ref struct IndexedBoundingBoxParser(YoloV8Metadata metadata, YoloV8Configuration configuration)
{
public IndexedBoundingBox[] Parse(Tensor<float> output, Size originSize)
{
Expand Down
2 changes: 1 addition & 1 deletion Source/YoloV8/Parsers/ObbDetectionOutputParser.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Compunet.YoloV8;

internal readonly struct ObbDetectionOutputParser(YoloV8Metadata metadata, YoloV8Configuration configuration)
internal readonly ref struct ObbDetectionOutputParser(YoloV8Metadata metadata, YoloV8Configuration configuration)
{
public ObbBoundingBox[] Parse(Tensor<float> output, Size originSize)
{
Expand Down
2 changes: 1 addition & 1 deletion Source/YoloV8/Parsers/ObbIndexedBoundingBoxParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Compunet.YoloV8;

internal readonly struct ObbIndexedBoundingBoxParser(YoloV8Metadata metadata, YoloV8Configuration configuration)
internal readonly ref struct ObbIndexedBoundingBoxParser(YoloV8Metadata metadata, YoloV8Configuration configuration)
{
public ObbIndexedBoundingBox[] Parse(Tensor<float> output, SixLabors.ImageSharp.Size originSize)
{
Expand Down
2 changes: 1 addition & 1 deletion Source/YoloV8/Parsers/PoseOutputParser.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Compunet.YoloV8.Parsers;

internal readonly struct PoseOutputParser(YoloV8Metadata metadata, YoloV8Configuration configuration)
internal readonly ref struct PoseOutputParser(YoloV8Metadata metadata, YoloV8Configuration configuration)
{
public PoseBoundingBox[] Parse(Tensor<float> output, Size originSize)
{
Expand Down
2 changes: 1 addition & 1 deletion Source/YoloV8/Parsers/SegmentationOutputParser.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Compunet.YoloV8.Parsers;

internal readonly struct SegmentationOutputParser(YoloV8Metadata metadata, YoloV8Configuration configuration)
internal readonly ref struct SegmentationOutputParser(YoloV8Metadata metadata, YoloV8Configuration configuration)
{
public SegmentationBoundingBox[] Parse(Tensor<float> boxesOutput, Tensor<float> maskPrototypes, Size originSize)
{
Expand Down

0 comments on commit aeb82ee

Please sign in to comment.