24 #define MAX_GPU_DEVICES 4
29 #include <cuda_runtime.h>
34 class Tracker :
public yarp::os::Thread
55 ImageOf<PixelRgb> *leftImage;
56 ImageOf<PixelRgb> *rightImage;
57 ImageOf<PixelRgb> oldLeftImage;
58 ImageOf<PixelRgb> oldRightImage;
59 ImageOf<PixelRgb> leftMotionImage;
60 ImageOf<PixelRgb> rightMotionImage;
65 int *leftMotionImage_d;
66 int *leftMotionResult_d;
69 int *rightMotionImage_d;
70 int *rightMotionResult_d;
75 int *leftMotionImage_h;
76 int *rightMotionImage_h;
77 int *leftMotionResult_h;
78 int *rightMotionResult_h;
83 void findMotion(ImageOf<PixelRgb> *image, ImageOf<PixelRgb> *oldImage, ImageOf<PixelRgb> *motionImage,
int *imageVector,
int*motionImageVector,
int *aDeviceImage,
int *bDeviceImage,
int *motionDeviceImage,
int *motionDeviceResult,
int *motionResult);
84 void myCopyImage(ImageOf<PixelRgb> *source, ImageOf<PixelRgb> *destination);
85 void myCopyImageToVector(ImageOf<PixelRgb> *source,
int *destination,
bool direction);
92 void printGPUProperties(
int deviceID);
94 void printConfiguration();
96 void setSimulationMode(
int simulation);
97 void setGPUMode(
bool gpuMode);
98 void setDevice(
int deviceID);
100 void setDebuggingLevel(
int level);
101 void setThreshold(
int thresholdValue);
103 int getSimulationMode();
106 int getDebuggingLevel();
109 vector<string> queryGPU();