#include
#include
#include
#include
Copyright By PowCoder代写 加微信 powcoder
#include
#include
#include
// Initially, use small images and filters to test against CPU code
#define IMGW (4*1024) // (16*1024)
#define FILR 4 // 8
#define FILK (2*FILR + 1)
double timeDiff(struct timespec &t0)
struct timespec t1;
clock_gettime(CLOCK_MONOTONIC, &t1);
double tm = t1.tv_sec – t0.tv_sec + (t1.tv_nsec – t0.tv_nsec) * 1e-9;
return tm;
void convCPU(float *source, float *kernel, float *result)
int main(int argc, char *argv[])
const int loops = 1;
std::vector
std::vector
std::vector
srand(42);
for (int i=0;i