HubbardGPU
Hubbard diagonalisation on the GPU (and CPU)
 All Classes Files Functions Variables Typedefs Friends Macros
hamgpu.cu File Reference
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cublas_v2.h>
#include "hamgpu.h"
#include "hamsparse.h"
#include "hamsparse2D.h"
+ Include dependency graph for hamgpu.cu:

Go to the source code of this file.

Macros

#define NUMTHREADS   128
 
#define GRIDSIZE   65535
 
#define CUDA_SAFE_CALL(call)
 

Functions

__global__ void gpu_mvprod (double *x, double *y, double alpha, int NumUp, int NumDown, int dim, double *Umat, double *Down_data, unsigned int *Down_ind, int size_Down, double *Up_data, unsigned int *Up_ind, int size_Up, int rows_shared)
 

Macro Definition Documentation

#define CUDA_SAFE_CALL (   call)
Value:
{ \
cudaError err = call; \
if( cudaSuccess != err) { \
fprintf(stderr, "Cuda error in file '%s' in line %i : %s.\n", \
__FILE__, __LINE__, cudaGetErrorString( err) ); \
exit(EXIT_FAILURE); \
} }

Definition at line 34 of file hamgpu.cu.

#define GRIDSIZE   65535

Definition at line 31 of file hamgpu.cu.

#define NUMTHREADS   128

Definition at line 28 of file hamgpu.cu.

Function Documentation

__global__ void gpu_mvprod ( double *  x,
double *  y,
double  alpha,
int  NumUp,
int  NumDown,
int  dim,
double *  Umat,
double *  Down_data,
unsigned int *  Down_ind,
int  size_Down,
double *  Up_data,
unsigned int *  Up_ind,
int  size_Up,
int  rows_shared 
)

The actual Cuda kernel to calculate the matrix vector product with the hamiltonian

Definition at line 69 of file hamgpu.cu.