Some algorithms are most naturally expressed as stream-processing operations, with data flowing through a graph of processing elements. For instance digital signal processing, networking and encryption algorithms are often of this form. We can distinguish between fine and coarse-grained stream graphs. Fine-grained graphs, where the data flowing through the graph consists of individual values, such as integers or complex numbers, are often the most natural, particularly in many DSP algorithms. But they can be challenging to implement efficiently, particularly if we need to target a range of different architectures, such as multicore PCs, GPUs and FPGAs.
Numerous languages exist for expressing such algorithms in a natural fashion. However, in many real applications the stream processing component forms only a small part of a larger application. Most dataflow languages are too specialized to implement the whole application. We therefore often require a hybrid solution where different parts of the application use different languages. The goal of the S# project was to allow fine-grained streaming algorithms to be described in a natural fashion within the context of an existing mainstream programming language, C#. Furthermore, by using domain-specific compilation techniques, we can generate code that is competitive with other solutions on a range of target architectures, including FPGAs. The S# paper submitted to TRETS gives a brief overview of this library before describing how we compile it to efficient code on a range of platforms. In particular we describe how such programs can be compiled into code suitable for execution on an FPGA, with data being streamed to and from an enclosing C# application.
Developing High-Performance Streaming Applications in C#
Draft of a paper describing S# and some preliminary results for the FPGA backend.
A short-read gene sequence matching example in S#
Draft of the S# manual