Loading files
0d3b72f5bThis file is pinned to the selected release. Download the original to open it in your design tool.
using System.Threading.Tasks;
using Hast.Layer;
using Hast.Samples.SampleAssembly;
namespace Hast.Samples.Consumer.SampleRunners
{
internal class GenomeMatcherSampleRunner : ISampleRunner
{
public void Configure(HardwareGenerationConfiguration configuration) => configuration.AddHardwareEntryPointType<GenomeMatcher>();
public async Task RunAsync(IHastlayer hastlayer, IHardwareRepresentation hardwareRepresentation, IProxyGenerationConfiguration configuration)
{
var genomeMatcher = await hastlayer.GenerateProxyAsync(hardwareRepresentation, new GenomeMatcher(), configuration);
// Sample from IBM.
var inputOne = "GCCCTAGCG";
var inputTwo = "GCGCAATG";
_ = genomeMatcher.CalculateLongestCommonSubsequence(inputOne, inputTwo, hastlayer, hardwareRepresentation.HardwareGenerationConfiguration);
// Sample from Wikipedia.
inputOne = "ACACACTA";
inputTwo = "AGCACACA";
_ = genomeMatcher.CalculateLongestCommonSubsequence(inputOne, inputTwo, hastlayer, hardwareRepresentation.HardwareGenerationConfiguration);
inputOne = "lombiqtech";
inputTwo = "coulombtech";
_ = genomeMatcher.CalculateLongestCommonSubsequence(inputOne, inputTwo, hastlayer, hardwareRepresentation.HardwareGenerationConfiguration);
}
}
}