Xmipp  v3.23.11-Nereus
cuda_gpu_reconstruct_fourier.h
Go to the documentation of this file.
1 /***************************************************************************
2  *
3  * Authors: David Strelak (davidstrelak@gmail.com)
4  *
5  * Unidad de Bioinformatica of Centro Nacional de Biotecnologia , CSIC
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20  * 02111-1307 USA
21  *
22  * All comments concerning this program package may be sent to the
23  * e-mail address 'xmipp@cnb.csic.es'
24  ***************************************************************************/
25 
26 #ifndef XMIPP_LIBRARIES_RECONSTRUCTION_CUDA_CUDA_GPU_RECONSTRUCT_FOURIER_H_
27 #define XMIPP_LIBRARIES_RECONSTRUCTION_CUDA_CUDA_GPU_RECONSTRUCT_FOURIER_H_
28 
32 #include <core/xmipp_error.h>
33 
35 
39 
41 
49 
55  void copyFrom(RecFourierBufferData* orig, int stream);
56 
60  void copyToDevice(int stream);
61 
62  // object in CPU memory space (page-locked)
64 
65  // object in GPU memory space
67 };
68 
75 void allocateWrapper(RecFourierBufferData* buffer, int streamIndex);
76 
81 void releaseWrapper(int streamIndex);
82 
87 void createStreams(int count);
88 
93 void deleteStreams(int count);
94 
100 float* allocateTempVolumeGPU(float*& ptr, int size, int typeSize);
101 
106 void releaseTempVolumeGPU(float*& ptr);
107 
113 void copyTempVolumes(std::complex<float>*** tempVol, float*** tempWeights,
114  float* tempVolGPU, float* tempWeightsGPU,
115  int size);
116 
120 void waitForGPU();
121 
126 void copyBlobTable(float* blobTableSqrt, int size);
127 
132 void releaseBlobTable();
133 
135 
137 
142 void copyConstants(
143  int maxVolIndexX, int maxVolIndexYZ,
144  float blobRadius, float blobAlpha,
145  float iDeltaSqrt, float iw0, float oneOverBessiOrderAlpha);
146 
153 void processBufferGPU(float* tempVolumeGPU, float* tempWeightsGPU,
155  float blobRadius, int maxVolIndexYZ, bool useFast,
156  float maxResolutionSqr, int stream, int blobOrder, float blobAlpha);
157 
159 #endif /* XMIPP_LIBRARIES_RECONSTRUCTION_CUDA_CUDA_GPU_RECONSTRUCT_FOURIER_H_ */
void copyBlobTable(float *blobTableSqrt, int size)
HBITMAP buffer
Definition: svm-toy.cpp:37
void copyTempVolumes(std::complex< float > ***tempVol, float ***tempWeights, float *tempVolGPU, float *tempWeightsGPU, int size)
void deleteStreams(int count)
void pinMemory(RecFourierBufferData *buffer)
RecFourierBufferDataGPU * cpuCopy
void releaseWrapper(int streamIndex)
void releaseTempVolumeGPU(float *&ptr)
void copyConstants(int maxVolIndexX, int maxVolIndexYZ, float blobRadius, float blobAlpha, float iDeltaSqrt, float iw0, float oneOverBessiOrderAlpha)
void processBufferGPU(float *tempVolumeGPU, float *tempWeightsGPU, RecFourierBufferData *buffer, float blobRadius, int maxVolIndexYZ, bool useFast, float maxResolutionSqr, int stream, int blobOrder, float blobAlpha)
void allocateWrapper(RecFourierBufferData *buffer, int streamIndex)
float * allocateTempVolumeGPU(float *&ptr, int size, int typeSize)
FRecBufferDataGPUWrapper(RecFourierBufferData *orig)
void unpinMemory(RecFourierBufferData *buffer)
RecFourierBufferDataGPU * gpuCopy
void createStreams(int count)
void copyFrom(RecFourierBufferData *orig, int stream)