Greens function calculation for OPAL rewriten with abstract base class

This commit is contained in:
Uldis Locans
2016-11-17 18:02:48 +01:00
parent 87cdf52f07
commit 63a008d111
8 changed files with 104 additions and 78 deletions

View File

@@ -2,17 +2,17 @@
#define H_CUDA_GREENSFUNCTION
#include <iostream>
#include <math.h>
#include <cmath>
#include <cuda.h>
#include <cuda_runtime.h>
#include <cuComplex.h>
#include "cublas_v2.h"
#include "../Algorithms/GreensFunction.h"
#include "CudaBase.cuh"
class CudaGreensFunction {
class CudaGreensFunction : public GreensFunction{
private:
@@ -34,28 +34,28 @@ public:
Info: calc itegral on device memory (taken from OPAL src code)
Return: success or error code
*/
int cuda_GreensIntegral(void *tmpptr, int I, int J, int K, int NI, int NJ,
double hr_m0, double hr_m1, double hr_m2,
int streamId = -1);
int greensIntegral(void *tmpgreen, int I, int J, int K, int NI, int NJ,
double hr_m0, double hr_m1, double hr_m2,
int streamId = -1);
/**
Info: integration of rho2_m field (taken from OPAL src code)
Return: success or error code
*/
int cuda_IntegrationGreensFunction(void *rho2_m, void *tmpgreen, int I, int J, int K,
int streamId = -1);
int integrationGreensFunction(void *rho2_m, void *tmpgreen, int I, int J, int K,
int streamId = -1);
/**
Info: mirror rho field (taken from OPAL src code)
Return: succes or error code
*/
int cuda_MirrorRhoField(void *mem_ptr, int I, int J, int K, int streamId = -1);
int mirrorRhoField(void *rho2_m, int I, int J, int K, int streamId = -1);
/**
Info: multiply complex fields already on the GPU memory, result will be put in ptr1
Return: success or error code
*/
int cuda_MultiplyCompelxFields(void *ptr1, void *ptr2, int size, int streamId = -1);
int multiplyCompelxFields(void *ptr1, void *ptr2, int size, int streamId = -1);
};