Xmipp
v3.23.11-Nereus
|
#include <cuda_gpu_geo_shift_transformer.h>
Public Member Functions | |
GeoShiftTransformer () | |
~GeoShiftTransformer () | |
void | init (const GPU &gpu, size_t x, size_t y, size_t n, int device, myStreamHandle *stream) |
void | initLazy (const GPU &gpu, size_t x, size_t y, size_t n, int device, myStreamHandle *stream=NULL) |
void | release () |
template<typename T_IN > | |
void | applyShift (MultidimArray< T > &output, const MultidimArray< T_IN > &input, T shiftX, T shiftY) |
void | test () |
Definition at line 51 of file cuda_gpu_geo_shift_transformer.h.
|
inline |
Constructor
Definition at line 55 of file cuda_gpu_geo_shift_transformer.h.
|
inline |
Definition at line 59 of file cuda_gpu_geo_shift_transformer.h.
void GeoShiftTransformer< T >::applyShift | ( | MultidimArray< T > & | output, |
const MultidimArray< T_IN > & | input, | ||
T | shiftX, | ||
T | shiftY | ||
) |
Apply 2D shift. Image will be repeated at the border.
output | where resulting images will be stored. Does not have to be initialized |
input | to process |
shiftX | to apply |
shiftY | to apply |
Definition at line 87 of file cuda_gpu_geo_shift_transformer.cpp.
void GeoShiftTransformer< T >::init | ( | const GPU & | gpu, |
size_t | x, | ||
size_t | y, | ||
size_t | n, | ||
int | device, | ||
myStreamHandle * | stream | ||
) |
Release previously obtained resources and initialize the transformer for processing images of given size. It also allocates all resources on GPU.
gpu | to use |
x | dim (inner-most) of the resulting image |
y | dim (outer-most) of the resulting image |
n | no. of images to process in a single batch |
device | to be used |
stream | to be used. NULL for default |
Definition at line 53 of file cuda_gpu_geo_shift_transformer.cpp.
void GeoShiftTransformer< T >::initLazy | ( | const GPU & | gpu, |
size_t | x, | ||
size_t | y, | ||
size_t | n, | ||
int | device, | ||
myStreamHandle * | stream = NULL |
||
) |
Similar as init(), except this method has no effect should the instance be already initialized. It is useful for example in a for loop, where first call will initialize resources and following calls will be ignored Do NOT use it for reinitialization.
Definition at line 78 of file cuda_gpu_geo_shift_transformer.cpp.
void GeoShiftTransformer< T >::release | ( | ) |
Release all resources hold by this instance
Definition at line 34 of file cuda_gpu_geo_shift_transformer.cpp.
void GeoShiftTransformer< T >::test | ( | ) |
Definition at line 131 of file cuda_gpu_geo_shift_transformer.cpp.