The host code (main.cpp) contains the OpenCL calls to invoke the CDS kernel and test for accuracy compared to the CPU model (cpu.cpp).
The golden results for the CDS spread have been obtained from the DG300 functions excel spreadsheet accompanying the John Hull’s “Options, Futures and other Derivatives” book.