#include "fastvol/american/psor.cuh"

namespace fastvol::american::psor
{
void price_fp64_cuda(const double *__restrict__ S,
                     const double *__restrict__ K,
                     const char *__restrict__ cp_flag,
                     const double *__restrict__ ttm,
                     const double *__restrict__ iv,
                     const double *__restrict__ r,
                     const double *__restrict__ q,
                     int    n_s,
                     int    n_t,
                     int    k_mul,
                     double w,
                     double tol,
                     int    max_iter,
                     size_t n_options,
                     double *__restrict__ result,
                     double *__restrict__ delta,
                     double *__restrict__ gamma,
                     double *__restrict__ theta,
                     cudaStream_t stream,
                     int          device,
                     bool         on_device,
                     bool         is_pinned,
                     bool         sync)
{
    cuda::price<double>(S,
                        K,
                        cp_flag,
                        ttm,
                        iv,
                        r,
                        q,
                        n_s,
                        n_t,
                        k_mul,
                        w,
                        tol,
                        max_iter,
                        n_options,
                        result,
                        delta,
                        gamma,
                        theta,
                        stream,
                        device,
                        on_device,
                        is_pinned,
                        sync);
}

void price_fp32_cuda(const float *__restrict__ S,
                     const float *__restrict__ K,
                     const char *__restrict__ cp_flag,
                     const float *__restrict__ ttm,
                     const float *__restrict__ iv,
                     const float *__restrict__ r,
                     const float *__restrict__ q,
                     int    n_s,
                     int    n_t,
                     int    k_mul,
                     float  w,
                     float  tol,
                     int    max_iter,
                     size_t n_options,
                     float *__restrict__ result,
                     float *__restrict__ delta,
                     float *__restrict__ gamma,
                     float *__restrict__ theta,
                     cudaStream_t stream,
                     int          device,
                     bool         on_device,
                     bool         is_pinned,
                     bool         sync)
{
    cuda::price<float>(S,
                       K,
                       cp_flag,
                       ttm,
                       iv,
                       r,
                       q,
                       n_s,
                       n_t,
                       k_mul,
                       w,
                       tol,
                       max_iter,
                       n_options,
                       result,
                       delta,
                       gamma,
                       theta,
                       stream,
                       device,
                       on_device,
                       is_pinned,
                       sync);
}

} // namespace fastvol::american::psor
