  This paper presents FLASH 1.0, a C++-based software framework for rapid
parallel deployment and enhancing host code portability in heterogeneous
computing. FLASH takes a novel approach in describing kernels and dynamically
dispatching them in a hardware-agnostic manner. FLASH features truly
hardware-agnostic frontend interfaces, which unify the compile-time control
flow and enforce a portability-optimized code organization that imposes a
demarcation between computational (performance-critical) and functional
(non-performance-critical) codes as well as the separation of hardware-specific
and hardware-agnostic codes in the host application. We use static code
analysis to measure the hardware independence ratio of twelve popular HPC
applications and show that up to 99.72% code portability can be achieved with
FLASH. Similarly, we measure and compare the complexity of state-of-the-art
portable programming models to show that FLASH can achieve a code reduction of
up to 4.0x for two common HPC kernels while maintaining 100% code portability
with a normalized framework overhead between 1% - 13% of the total kernel
runtime. The codes are available at https://github.com/PSCLab-ASU/FLASH.
