CS代写 #include

#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 x_s(IMGW*IMGW);
std::vector k_s(FILK);
std::vector r_s(IMGW*IMGW);

srand(42);
for (int i=0;iCS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com