Can you help with this error? This happens after build, when I debug:
GCC Block code
K just linked refu.dll library, which contains timer function.
This is what I see on screen:
http://oi59.tinypic.com/2zgte1e.jpg
This is main.c
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
#include "include/types.h"
#include "include/gaussian.h"
#include "include/args.h"
#include "refu/Time/rfc_timer.h"
#include <stdbool.h>
int main ( int argc, char *argv[] )
{
uint32_t gaussianSize;
float gaussianSigma;
char* imgname;//the name of the image file, taken by the arguments
/** TIMER STUFF **/
char errorLog[] = "errorLog";
char infoLog[] = "infoLog";
double units;
//init the Refu library
rfInit(errorLog,infoLog);
//read in the program's arguments
if(readArguments(argc,argv,&imgname,&gaussianSize,&gaussianSigma)==false)
return -1;
RF_Timer timer;
rfTimer_Init(&timer,RF_TIMER_MICROSECONDS);
/** perform CPU blurring *//
if(pna_blur_cpu(imgname,gaussianSize,gaussianSigma)==false)//time it
return -2;
units = rfTimer_Query(&timer,RF_TIMER_MICROSECONDS);
printf("CPU Gaussian blurring took %f microseconds\n",units);
//reset the timer for the GPU
rfTimer_Query(&timer,RF_TIMER_MICROSECONDS);
//perform GPU blurring and then read the timer
if(pna_blur_gpu(imgname,gaussianSize,gaussianSigma)==false)
return -3;
units = rfTimer_Query(&timer,RF_TIMER_MICROSECONDS);//time it
printf("GPU Gaussian blurring took %f microseconds\n",units);
return 0;
}
|
Project can be downloaded here, included the refu library:
http://sourceforge.net/projects/autots/files/Gaussian_with_OpenCL%202.zip/download
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: W:\___NEW_PROJECTS\GaussianBlur\Gaussian_with_OpenCL 1\
Adding source dir: W:\___NEW_PROJECTS\GaussianBlur\Gaussian_with_OpenCL 1\
Adding file: W:\___NEW_PROJECTS\GaussianBlur\Gaussian_with_OpenCL 1\bin\Debug\Gaussian_with_OpenCL.exe
Changing directory to: W:/___NEW~1/GAUSSI~1/GAUSSI~2/.
Starting debugger: P:\CodeBlocks_32bit\MINGW\bin\gdb.exe -nx -fullname -quiet -args W:/___NEW~1/GAUSSI~1/GAUSSI~2/bin/Debug/GAUSSI~1.EXE
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.5
Child process PID: 340
Program received signal SIGSEGV, Segmentation fault.
In ntdll!RtlEnumerateGenericTableLikeADirectory () (C:\WINDOWS\system32\ntdll.dll)