• DocumentCode
    1050495
  • Title

    An Optimized Cell BE Special Function Library Generated by Coconut

  • Author

    Anand, Christopher Kumar ; Kahl, Wolfram

  • Author_Institution
    Dept. of Comput. & Software, McMaster Univ., Hamilton, ON, Canada
  • Volume
    58
  • Issue
    8
  • fYear
    2009
  • Firstpage
    1126
  • Lastpage
    1138
  • Abstract
    Coconut, a tool for developing high-assurance, high-performance kernels for scientific computing, contains an extensible domain-specific language (DSL) embedded in Haskell. The DSL supports interactive prototyping and unit testing, simplifying the process of designing efficient implementations of common patterns. Unscheduled C and scheduled assembly language output are supported. Using the patterns, even nonexpert users can write efficient function implementations, leveraging special hardware features. A production-quality library of elementary functions for the cell BE SPU compute engines has been developed. Coconut-generated and -scheduled vector functions were more than four times faster than commercially distributed functions written in C with intrinsics (a nicer syntax for in-line assembly), wrapped in loops and scheduled by spuxlc. All Coconut functions were faster, but the difference was larger for hard-to-approximate functions for which register-level SIMD lookups made a bigger difference. Other helpful features in the language include facilities for translating interval and polynomial descriptions between GHCi, a Haskell interpreter used to prototype in the DSL, and Maple, used for exploration and minimax polynomial generation. This makes it easier to match mathematical properties of the functions with efficient calculational patterns in the SPU ISA. By using single, literate source files, the resulting functions are remarkably readable.
  • Keywords
    C language; assembly language; functional languages; software engineering; Coconut; DSL; GHCi; Haskell interpreter; Maple; extensible domain-specific language; high-performance kernels; interactive prototyping; minimax polynomial generation; optimized cell BE special function library; register-level SIMD lookups; scheduled assembly language output; scientific computing; spuxlc; unit testing; unscheduled C language output; Assembly; DSL; Domain specific languages; Kernel; Libraries; Polynomials; Processor scheduling; Prototypes; Scientific computing; Testing; SIMD processors; Special function approximations; applicative (functional) programming.; code generation; parallel and vector implementations; specialized application languages;
  • fLanguage
    English
  • Journal_Title
    Computers, IEEE Transactions on
  • Publisher
    ieee
  • ISSN
    0018-9340
  • Type

    jour

  • DOI
    10.1109/TC.2008.223
  • Filename
    4731241