Merge pull request #158 from CNugteren/msvc_compilation_fixes

MSVC compilation fixes
pull/176/head
Cedric Nugteren 2017-05-27 17:53:30 +02:00 committed by GitHub
commit f57e209aab
2 changed files with 16 additions and 13 deletions

View File

@ -20,13 +20,21 @@ install:
- ps: pushd $env:OPENCL_ROOT
- ps: $opencl_registry = $env:OPENCL_REGISTRY
# This downloads the source to the Khronos ICD library
- git clone --depth 1 https://github.com/KhronosGroup/OpenCL-ICD-Loader.git
- git clone https://github.com/KhronosGroup/OpenCL-ICD-Loader.git
- ps: pushd OpenCL-ICD-Loader
- git checkout cb4acb9 # older version (pre 2.2 support)
- ps: popd
- ps: mv ./OpenCL-ICD-Loader/* .
# This downloads all the opencl header files
# The cmake build files expect a directory called inc
- ps: mkdir inc/CL
- git clone --depth 1 https://github.com/KhronosGroup/OpenCL-Headers.git inc/CL
- ps: wget $opencl_registry/api/2.1/cl.hpp -OutFile inc/CL/cl.hpp
# Switch to OpenCL 2.1 headers
- ps: pushd inc/CL
- git fetch origin opencl21:opencl21
- git checkout opencl21
- ps: popd
# - ps: dir; if( $lastexitcode -eq 0 ){ dir include/CL } else { Write-Output boom }
# Create the static import lib in a directory called lib, so findopencl() will find it
- ps: mkdir lib
@ -34,11 +42,6 @@ install:
- cmake -G "NMake Makefiles" ..
- nmake
- ps: popd
# Switch to OpenCL 1.2 headers
- ps: pushd inc/CL
- git fetch origin opencl12:opencl12
- git checkout opencl12
- ps: popd
# Rename the inc directory to include, so FindOpencl() will find it
- ps: ren inc include
- ps: popd

View File

@ -172,13 +172,13 @@ struct Arguments {
T beta = ConstantOne<T>();
// Batch-specific arguments
size_t batch_count = 1;
std::vector<size_t> x_offsets = {0};
std::vector<size_t> y_offsets = {0};
std::vector<size_t> a_offsets = {0};
std::vector<size_t> b_offsets = {0};
std::vector<size_t> c_offsets = {0};
std::vector<T> alphas = {ConstantOne<T>()};
std::vector<T> betas = {ConstantOne<T>()};
std::vector<size_t> x_offsets; // = {0};
std::vector<size_t> y_offsets; // = {0};
std::vector<size_t> a_offsets; // = {0};
std::vector<size_t> b_offsets; // = {0};
std::vector<size_t> c_offsets; // = {0};
std::vector<T> alphas; // = {ConstantOne<T>()};
std::vector<T> betas; // = {ConstantOne<T>()};
// Sizes
size_t x_size = 1;
size_t y_size = 1;