citHeader(
  paste0(
    "To cite opencltools as software, use the first entry. ",
    "If you report OpenCL GPU execution, cite Stone et al. (2010). ",
    "Cite nmathopencl when you use its ported R Mathlib kernels; ",
    "cite glmbayes only when describing that downstream Bayesian GLM application, ",
    "not when citing this runtime and loader layer alone."
  )
)

year <- sub("-.*", "", meta$Date)
if (!nzchar(year)) {
  year <- format(Sys.Date(), "%Y")
}

c(
  bibentry(
    bibtype  = "Manual",
    title    = "{opencltools}: OpenCL Tools for {R} Package Developers",
    author   = person("Kjell", "Nygren"),
    year     = year,
    note     = paste("R package version", meta$Version),
    url      = "https://github.com/knygren/opencltools"
  ),
  bibentry(
    bibtype  = "Article",
    title    = "OpenCL: A Parallel Programming Standard for Heterogeneous Computing Systems",
    author   = c(
      person("James E.", "Stone"),
      person("David", "Gohara"),
      person("Guochun", "Shi")
    ),
    journal  = "Computing in Science \\& Engineering",
    volume   = "12",
    number   = "3",
    pages    = "66--72",
    year     = "2010",
    doi      = "10.1109/MCSE.2010.69"
  )
)
