#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cublas_v2.h>
#include "hamgpu.h"
#include "hamsparse.h"
#include "hamsparse2D.h"
Go to the source code of this file.
|
__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) |
|
#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.
__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.