Skip to content

Commit

Permalink
Refactor compute copy helper header per convention
Browse files Browse the repository at this point in the history
  • Loading branch information
9prady9 committed Feb 3, 2020
1 parent 27abb19 commit b415445
Show file tree
Hide file tree
Showing 26 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion docs/rst/extras.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Interop Helpers
===============

The user can include `ComputeCopy.h` header to avoid writing necessary
The user can include `fg/compute_copy.h` header to avoid writing necessary
compute backend's OpenGL interoperation code themselves.

Following defines should be declared prior to inclusion of this header
Expand Down
2 changes: 1 addition & 1 deletion examples/cpu/bubblechart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <forge.h>
#define USE_FORGE_CPU_COPY_HELPERS
#include <ComputeCopy.h>
#include <fg/compute_copy.h>
#include <algorithm>
#include <cmath>
#include <complex>
Expand Down
2 changes: 1 addition & 1 deletion examples/cpu/field.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <forge.h>
#define USE_FORGE_CPU_COPY_HELPERS
#include <ComputeCopy.h>
#include <fg/compute_copy.h>
#include <cmath>
#include <complex>
#include <iostream>
Expand Down
2 changes: 1 addition & 1 deletion examples/cpu/fractal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <forge.h>
#define USE_FORGE_CPU_COPY_HELPERS
#include <ComputeCopy.h>
#include <fg/compute_copy.h>
#include <cmath>
#include <complex>

Expand Down
2 changes: 1 addition & 1 deletion examples/cpu/histogram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <forge.h>
#define USE_FORGE_CPU_COPY_HELPERS
#include <ComputeCopy.h>
#include <fg/compute_copy.h>
#include <cmath>
#include <complex>
#include <cstdlib>
Expand Down
2 changes: 1 addition & 1 deletion examples/cpu/plot3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <forge.h>
#define USE_FORGE_CPU_COPY_HELPERS
#include <ComputeCopy.h>
#include <fg/compute_copy.h>
#include <cmath>
#include <complex>
#include <iostream>
Expand Down
2 changes: 1 addition & 1 deletion examples/cpu/plotting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <forge.h>
#define USE_FORGE_CPU_COPY_HELPERS
#include <ComputeCopy.h>
#include <fg/compute_copy.h>
#include <cmath>
#include <complex>
#include <cstdio>
Expand Down
2 changes: 1 addition & 1 deletion examples/cpu/stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <forge.h>
#define USE_FORGE_CPU_COPY_HELPERS
#include <ComputeCopy.h>
#include <fg/compute_copy.h>
#include <cmath>
#include <complex>
#include <iostream>
Expand Down
2 changes: 1 addition & 1 deletion examples/cpu/surface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <forge.h>
#define USE_FORGE_CPU_COPY_HELPERS
#include <ComputeCopy.h>
#include <fg/compute_copy.h>
#include <cmath>
#include <complex>
#include <iostream>
Expand Down
2 changes: 1 addition & 1 deletion examples/cuda/bubblechart.cu
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <curand_kernel.h>
#include <forge.h>
#define USE_FORGE_CUDA_COPY_HELPERS
#include <ComputeCopy.h>
#include <fg/compute_copy.h>
#include <cstdio>
#include <iostream>

Expand Down
2 changes: 1 addition & 1 deletion examples/cuda/field.cu
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <cuda_runtime.h>
#include <forge.h>
#define USE_FORGE_CUDA_COPY_HELPERS
#include <ComputeCopy.h>
#include <fg/compute_copy.h>

#define PI 3.14159265359

Expand Down
2 changes: 1 addition & 1 deletion examples/cuda/fractal.cu
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <cuda_runtime.h>
#include <forge.h>
#define USE_FORGE_CUDA_COPY_HELPERS
#include <ComputeCopy.h>
#include <fg/compute_copy.h>
#include <cstdio>

const unsigned DIMX = 512;
Expand Down
2 changes: 1 addition & 1 deletion examples/cuda/histogram.cu
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <curand_kernel.h>
#include <forge.h>
#define USE_FORGE_CUDA_COPY_HELPERS
#include <ComputeCopy.h>
#include <fg/compute_copy.h>
#include <cstdio>

const unsigned IMGW = 256;
Expand Down
2 changes: 1 addition & 1 deletion examples/cuda/plot3.cu
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <cuda_runtime.h>
#include <forge.h>
#define USE_FORGE_CUDA_COPY_HELPERS
#include <ComputeCopy.h>
#include <fg/compute_copy.h>
#include <cstdio>
#include <iostream>

Expand Down
2 changes: 1 addition & 1 deletion examples/cuda/plotting.cu
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <cuda_runtime.h>
#include <forge.h>
#define USE_FORGE_CUDA_COPY_HELPERS
#include <ComputeCopy.h>
#include <fg/compute_copy.h>
#include <cstdio>
#include <iostream>

Expand Down
2 changes: 1 addition & 1 deletion examples/cuda/stream.cu
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <cuda_runtime.h>
#include <forge.h>
#define USE_FORGE_CUDA_COPY_HELPERS
#include <ComputeCopy.h>
#include <fg/compute_copy.h>

const unsigned DIMX = 640;
const unsigned DIMY = 480;
Expand Down
2 changes: 1 addition & 1 deletion examples/cuda/surface.cu
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <cuda_runtime.h>
#include <forge.h>
#define USE_FORGE_CUDA_COPY_HELPERS
#include <ComputeCopy.h>
#include <fg/compute_copy.h>
#include <cstdio>
#include <iostream>

Expand Down
2 changes: 1 addition & 1 deletion examples/opencl/bubblechart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static const float FRANGE_END = 2 * 3.141592f;
static const int DATA_SIZE = (int)((FRANGE_END - FRANGE_START) / DX);

#define USE_FORGE_OPENCL_COPY_HELPERS
#include <ComputeCopy.h>
#include <fg/compute_copy.h>

// clang-format off
static const std::string chartKernels =
Expand Down
2 changes: 1 addition & 1 deletion examples/opencl/field.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const float NELEMS = (MAXIMUM - MINIMUM + 1) / STEP;
const unsigned DPOINTS[] = {5, 5, 5, 15, 15, 5, 15, 15};

#define USE_FORGE_OPENCL_COPY_HELPERS
#include <ComputeCopy.h>
#include <fg/compute_copy.h>

// clang-format off
static const std::string fieldKernel =
Expand Down
2 changes: 1 addition & 1 deletion examples/opencl/fractal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const unsigned DIMY = 512;
const unsigned IMG_SIZE = DIMX * DIMY * 4;

#define USE_FORGE_OPENCL_COPY_HELPERS
#include <ComputeCopy.h>
#include <fg/compute_copy.h>

// clang-format off
static const std::string fractal_ocl_kernel =
Expand Down
2 changes: 1 addition & 1 deletion examples/opencl/histogram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const unsigned NBINS = 256;
const float PERSISTENCE = 0.5f;

#define USE_FORGE_OPENCL_COPY_HELPERS
#include <ComputeCopy.h>
#include <fg/compute_copy.h>

// clang-format off
static const std::string perlinKernels =
Expand Down
2 changes: 1 addition & 1 deletion examples/opencl/plot3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static const unsigned ZSIZE = (unsigned)((ZMAX - ZMIN) / DX + 1);
using namespace std;

#define USE_FORGE_OPENCL_COPY_HELPERS
#include <ComputeCopy.h>
#include <fg/compute_copy.h>

// clang-format off
static const std::string sincos_surf_kernel =
Expand Down
2 changes: 1 addition & 1 deletion examples/opencl/plotting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const float FRANGE_END = 2 * 3.141592f;
const unsigned DATA_SIZE = (unsigned)((FRANGE_END - FRANGE_START) / dx);

#define USE_FORGE_OPENCL_COPY_HELPERS
#include <ComputeCopy.h>
#include <fg/compute_copy.h>

// clang-format off
static const std::string sinf_ocl_kernel =
Expand Down
2 changes: 1 addition & 1 deletion examples/opencl/stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const float STEP = 2.0f;
const int NELEMS = (int)((MAXIMUM - MINIMUM + 1) / STEP);

#define USE_FORGE_OPENCL_COPY_HELPERS
#include <ComputeCopy.h>
#include <fg/compute_copy.h>

// clang-format off
static const std::string streamKernel =
Expand Down
2 changes: 1 addition & 1 deletion examples/opencl/surface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const unsigned YSIZE = (unsigned)((YMAX - YMIN) / DX);
using namespace std;

#define USE_FORGE_OPENCL_COPY_HELPERS
#include <ComputeCopy.h>
#include <fg/compute_copy.h>

// clang-format off
static const std::string sin_surf_kernel =
Expand Down
File renamed without changes.

0 comments on commit b415445

Please sign in to comment.