#include <stdio.h>
#include "../external/cusolver_common.h"
#define no_name_mangle extern "C"

__global__ void hello_from_GPU() {
  printf("HELLO FROM GPUUUU");
}

void check_cusolver_version() {

  int major=-1, minor=-1, patch=-1;
  cusolverGetProperty(MAJOR_VERSION, &major);
  cusolverGetProperty(MINOR_VERSION, &minor);
  cusolverGetProperty(PATCH_LEVEL, &patch);
  printf("CUSOLVER Version (Major,Minor,PatchLevel): %d.%d.%d\n", major,minor,patch);

}



no_name_mangle void cuda_entry_point() {

  check_cusolver_version();

  hello_from_GPU<<<1, 1>>>();

  cudaDeviceSynchronize();
}
