Skip to content

Commit

Permalink
Fix remaining warnings ni Hastlayer.SDK.NuGet.
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahelsaig committed Oct 18, 2023
1 parent 2ed2383 commit 0d23e7e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion NuGetTest/Hast.NuGet.Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// To cross-compile, first run without any arguments (this will throw an exception during execution), then copy the
// HardwareFramework directory to the remote device and pass the binary's path as the argument, e.g.:
// dotnet Hast.NuGet.Console.dll HardwareFramework/bin/*.azure.xclbin
var binaryPath = Environment.GetCommandLineArgs().FirstOrDefault(item => item.EndsWithOrdinalIgnoreCase(".xclbin"));
var binaryPath = Environment.GetCommandLineArgs().Find(item => item.EndsWithOrdinalIgnoreCase(".xclbin"));
if (File.Exists(binaryPath))
{
configuration.SingleBinaryPath = binaryPath;
Expand Down
4 changes: 2 additions & 2 deletions src/Samples/Hast.Samples.SampleAssembly/PrimeCalculator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,10 @@ public bool IsPrimeNumberSync(uint number, IHastlayer hastlayer = null, IHardwar
RunIsPrimeNumberAsync(number, memory => Task.Run(() => IsPrimeNumberSync(memory)), hastlayer, configuration).Result;

public Task<bool> IsPrimeNumberAsync(uint number, IHastlayer hastlayer = null, IHardwareGenerationConfiguration configuration = null) =>
RunIsPrimeNumberAsync(number, memory => IsPrimeNumberAsync(memory), hastlayer, configuration);
RunIsPrimeNumberAsync(number, IsPrimeNumberAsync, hastlayer, configuration);

public bool[] ArePrimeNumbers(uint[] numbers, IHastlayer hastlayer = null, IHardwareGenerationConfiguration configuration = null) =>
RunArePrimeNumbersMethod(numbers, memory => ArePrimeNumbers(memory), hastlayer, configuration);
RunArePrimeNumbersMethod(numbers, ArePrimeNumbers, hastlayer, configuration);

public bool[] ParallelizedArePrimeNumbers(uint[] numbers, IHastlayer hastlayer = null, IHardwareGenerationConfiguration configuration = null)
{
Expand Down
8 changes: 4 additions & 4 deletions src/Samples/Hast.Samples.SampleAssembly/SimdCalculator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,28 +115,28 @@ private void RunSimdOperation(SimpleMemory memory, SimdOperation operation)
#region Helpers

public int[] AddVectors(int[] vector1, int[] vector2, IHastlayer hastlayer = null, IHardwareGenerationConfiguration configuration = null) =>
RunSimdOperation(vector1, vector2, memory => AddVectors(memory), hastlayer, configuration);
RunSimdOperation(vector1, vector2, AddVectors, hastlayer, configuration);

public int[] SubtractVectors(
int[] vector1,
int[] vector2,
IHastlayer hastlayer = null,
IHardwareGenerationConfiguration configuration = null) =>
RunSimdOperation(vector1, vector2, memory => SubtractVectors(memory), hastlayer, configuration);
RunSimdOperation(vector1, vector2, SubtractVectors, hastlayer, configuration);

public int[] MultiplyVectors(
int[] vector1,
int[] vector2,
IHastlayer hastlayer = null,
IHardwareGenerationConfiguration configuration = null) =>
RunSimdOperation(vector1, vector2, memory => MultiplyVectors(memory), hastlayer, configuration);
RunSimdOperation(vector1, vector2, MultiplyVectors, hastlayer, configuration);

public int[] DivideVectors(
int[] vector1,
int[] vector2,
IHastlayer hastlayer = null,
IHardwareGenerationConfiguration configuration = null) =>
RunSimdOperation(vector1, vector2, memory => DivideVectors(memory), hastlayer, configuration);
RunSimdOperation(vector1, vector2, DivideVectors, hastlayer, configuration);

private int[] RunSimdOperation(
int[] vector1,
Expand Down

0 comments on commit 0d23e7e

Please sign in to comment.