Menu

CUDA 9.0 ViennaCL compile errors

tario
2017-10-07
2017-10-07
  • tario

    tario - 2017-10-07

    Hello Karli,

    I installed cuda 9.0 + the supported gcc 6.3 and g++ 6.3 and tried to compile my application including ViennaCL solvers with the CUDA backend. (everything works fine with the OpenMP backend!, cuda examples including linear algebra examples work fine too).

    Am I missing something in my setup?

    I get the following compile errors (just the initial section, where the errors start):

    /~~~
    usr/local/cuda-9.0/include/cuda_runtime.h:629:43: warning: use of old-style cast [-Wold-style-cast]
    In file included from ./viennacl/linalg/scalar_operations.hpp:40:0,
    from ./viennacl/scalar.hpp:30,
    from ./viennacl/tools/entry_proxy.hpp:27,
    from ./viennacl/detail/vector_def.hpp:26,
    from ./viennacl/vector.hpp:27,
    from lnInclude/../viennacl/compressed_matrix.hpp:29,
    from exFOAM.H:17,
    from exPBiCGStab.C:39:
    ./viennacl/linalg/cuda/scalar_operations.hpp: In function ‘typename viennacl::enable_if<((viennacl::is_scalar<T>::value && viennacl::is_scalar<ScalarT2>::value) && viennacl::is_any_scalar<FactorT>::value)>::type viennacl::linalg::cuda::as(ScalarT1&, const ScalarT2&, const NumericT&, viennacl::vcl_size_t, bool, bool)’:
    ./viennacl/linalg/cuda/scalar_operations.hpp:88:14: error: expected primary-expression before ‘<’ token
    as_kernel<<<1, 1>>>(viennacl::cuda_arg(s1),
    ^
    ./viennacl/linalg/cuda/scalar_operations.hpp:88:21: error: expected primary-expression before ‘>’ token
    as_kernel<<<1, 1>>>(viennacl::cuda_arg(s1),
    ^
    ./viennacl/linalg/cuda/scalar_operations.hpp: In function ‘typename viennacl::enable_if<((((viennacl::is_scalar<T>::value && viennacl::is_scalar<ScalarT2>::value) && viennacl::is_scalar<ScalarT3>::value) && viennacl::is_any_scalar<FactorT>::value) && viennacl::is_any_scalar<FactorT3>::value)>::type viennacl::linalg::cuda::asbs(ScalarT1&, const ScalarT2&, const NumericT1&, viennacl::vcl_size_t, bool, bool, const ScalarT3&, const NumericT2&, viennacl::vcl_size_t, bool, bool)’:
    ./viennacl/linalg/cuda/scalar_operations.hpp:208:16: error: expected primary-expression before ‘<’ token
    asbs_kernel<<<1, 1>>>(viennacl::cuda_arg(s1),
    ^
    ./viennacl/linalg/cuda/scalar_operations.hpp:208:23: error: expected primary-expression before ‘>’ token
    asbs_kernel<<<1, 1>>>(viennacl::cuda_arg(s1),
    ^
    ./viennacl/linalg/cuda/scalar_operations.hpp: In function ‘typename viennacl::enable_if<((((viennacl::is_scalar<T>::value && viennacl::is_scalar<ScalarT2>::value) && viennacl::is_scalar<ScalarT3>::value) && viennacl::is_any_scalar<FactorT>::value) && viennacl::is_any_scalar<FactorT3>::value)>::type viennacl::linalg::cuda::asbs_s(ScalarT1&, const ScalarT2&, const NumericT1&, viennacl::vcl_size_t, bool, bool, const ScalarT3&, const NumericT2&, viennacl::vcl_size_t, bool, bool)’:
    ./viennacl/linalg/cuda/scalar_operations.hpp:332:18: error: expected primary-expression before ‘<’ token
    asbs_s_kernel<<<1, 1>>>(viennacl::cuda_arg(s1),
    ^
    ./viennacl/linalg/cuda/scalar_operations.hpp:332:25: error: expected primary-expression before ‘>’ token
    asbs_s_kernel<<<1, 1>>>(viennacl::cuda_arg(s1),
    ^
    ./viennacl/linalg/cuda/scalar_operations.hpp: In function ‘typename viennacl::enable_if<(viennacl::is_scalar<T>::value && viennacl::is_scalar<ScalarT2>::value)>::type viennacl::linalg::cuda::swap(ScalarT1&, ScalarT2&)’:
    ./viennacl/linalg/cuda/scalar_operations.hpp:365:23: error: expected primary-expression before ‘<’ token
    scalar_swap_kernel<<<1, 1>>>(viennacl::cuda_arg(s1), viennacl::cuda_arg(s2));
    ^
    ./viennacl/linalg/cuda/scalar_operations.hpp:365:30: error: expected primary-expression before ‘>’ token
    scalar_swap_kernel<<<1, 1>>>(viennacl::cuda_arg(s1), viennacl::cuda_arg(s2));
    ^
    In file included from ./viennacl/linalg/vector_operations.hpp:43:0,
    from ./viennacl/vector.hpp:33,
    from lnInclude/../viennacl/compressed_matrix.hpp:29,
    from exFOAM.H:17,
    from exPBiCGStab.C:39:
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::convert_kernel(DestNumericT, unsigned int, unsigned int, unsigned int, const SrcNumericT, unsigned int, unsigned int)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:51:25: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:51:38: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:51:51: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:53:26: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::convert(viennacl::vector_base<T>&, const viennacl::vector_base<NumericT>&)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:61:19: error: expected primary-expression before ‘<’ token
    convert_kernel<<<128, 128>>>(viennacl::cuda_arg(dest),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp:61:30: error: expected primary-expression before ‘>’ token
    convert_kernel<<<128, 128>>>(viennacl::cuda_arg(dest),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::av_kernel(NumericT, unsigned int, unsigned int, unsigned int, const NumericT, unsigned int, const NumericT, unsigned int, unsigned int)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:94:27: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:94:40: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:94:53: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:96:28: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:101:27: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:101:40: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:101:53: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:103:28: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::av_kernel(NumericT
    , unsigned int, unsigned int, unsigned int, NumericT, unsigned int, const NumericT, unsigned int, unsigned int)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:127:27: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:127:40: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:127:53: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:129:28: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:134:27: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:134:40: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:134:53: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:136:28: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::av(viennacl::vector_base<T>&, const viennacl::vector_base<T>&, const ScalarType1&, viennacl::vcl_size_t, bool, bool)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:161:14: error: expected primary-expression before ‘<’ token
    av_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp:161:25: error: expected primary-expression before ‘>’ token
    av_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::avbv_kernel(NumericT
    , unsigned int, unsigned int, unsigned int, const NumericT, unsigned int, const NumericT, unsigned int, unsigned int, const NumericT, unsigned int, const NumericT, unsigned int, unsigned int)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:208:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:208:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:208:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:210:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:215:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:215:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:215:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:217:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:225:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:225:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:225:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:227:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:232:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:232:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:232:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:234:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::avbv_kernel(NumericT, unsigned int, unsigned int, unsigned int, NumericT, unsigned int, const NumericT, unsigned int, unsigned int, const NumericT, unsigned int, const NumericT, unsigned int, unsigned int)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:271:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:271:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:271:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:273:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:278:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:278:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:278:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:280:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:288:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:288:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:288:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:290:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:295:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:295:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:295:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:297:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::avbv_kernel(NumericT, unsigned int, unsigned int, unsigned int, const NumericT, unsigned int, const NumericT, unsigned int, unsigned int, NumericT, unsigned int, const NumericT, unsigned int, unsigned int)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:334:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:334:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:334:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:336:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:341:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:341:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:341:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:343:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:351:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:351:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:351:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:353:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:358:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:358:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:358:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:360:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::avbv_kernel(NumericT, unsigned int, unsigned int, unsigned int, NumericT, unsigned int, const NumericT, unsigned int, unsigned int, NumericT, unsigned int, const NumericT, unsigned int, unsigned int)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:397:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:397:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:397:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:399:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:404:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:404:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:404:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:406:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:414:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:414:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:414:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:416:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:421:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:421:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:421:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:423:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::avbv(viennacl::vector_base<T>&, const viennacl::vector_base<T>&, const ScalarT1&, viennacl::vcl_size_t, bool, bool, const viennacl::vector_base<T>&, const ScalarT2&, viennacl::vcl_size_t, bool, bool)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:458:16: error: expected primary-expression before ‘<’ token
    avbv_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp:458:27: error: expected primary-expression before ‘>’ token
    avbv_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::avbv_v_kernel(NumericT
    , unsigned int, unsigned int, unsigned int, const NumericT, unsigned int, const NumericT, unsigned int, unsigned int, const NumericT, unsigned int, const NumericT, unsigned int, unsigned int)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:512:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:512:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:512:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:514:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:519:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:519:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:519:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:521:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:529:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:529:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:529:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:531:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:536:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:536:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:536:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:538:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::avbv_v_kernel(NumericT, unsigned int, unsigned int, unsigned int, NumericT, unsigned int, const NumericT, unsigned int, unsigned int, const NumericT, unsigned int, const NumericT, unsigned int, unsigned int)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:575:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:575:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:575:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:577:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:582:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:582:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:582:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:584:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:592:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:592:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:592:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:594:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:599:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:599:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:599:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:601:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::avbv_v_kernel(NumericT, unsigned int, unsigned int, unsigned int, const NumericT, unsigned int, const NumericT, unsigned int, unsigned int, NumericT, unsigned int, const NumericT, unsigned int, unsigned int)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:638:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:638:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:638:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:640:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:645:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:645:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:645:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:647:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:655:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:655:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:655:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:657:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:662:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:662:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:662:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:664:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::avbv_v_kernel(NumericT, unsigned int, unsigned int, unsigned int, NumericT, unsigned int, const NumericT, unsigned int, unsigned int, NumericT, unsigned int, const NumericT, unsigned int, unsigned int)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:701:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:701:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:701:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:703:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:708:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:708:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:708:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:710:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:718:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:718:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:718:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:720:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:725:29: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:725:42: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:725:55: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:727:30: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::avbv_v(viennacl::vector_base<T>&, const viennacl::vector_base<T>&, const ScalarT1&, viennacl::vcl_size_t, bool, bool, const viennacl::vector_base<T>&, const ScalarT2&, viennacl::vcl_size_t, bool, bool)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:760:18: error: expected primary-expression before ‘<’ token
    avbv_v_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp:760:29: error: expected primary-expression before ‘>’ token
    avbv_v_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::vector_assign_kernel(NumericT
    , unsigned int, unsigned int, unsigned int, unsigned int, NumericT)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:790:25: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:790:38: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:790:51: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:792:26: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::vector_assign(viennacl::vector_base<T>&, const ScalarT1&, bool)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:813:25: error: expected primary-expression before ‘<’ token
    vector_assign_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp:813:36: error: expected primary-expression before ‘>’ token
    vector_assign_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::vector_swap_kernel(NumericT, unsigned int, unsigned int, unsigned int, NumericT, unsigned int, unsigned int)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:836:25: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:836:38: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:836:51: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:838:26: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::vector_swap(viennacl::vector_base<T>&, viennacl::vector_base<T>&)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:855:23: error: expected primary-expression before ‘<’ token
    vector_swap_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp:855:34: error: expected primary-expression before ‘>’ token
    vector_swap_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::element_op_kernel(NumericT, unsigned int, unsigned int, unsigned int, const NumericT, unsigned int, unsigned int, const NumericT, unsigned int, unsigned int, unsigned int)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:887:27: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:887:40: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:887:53: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:889:28: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:896:27: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:896:40: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:896:53: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:898:28: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:905:27: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:905:40: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:905:53: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:907:28: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::element_op_int_kernel(NumericT
    , unsigned int, unsigned int, unsigned int, const NumericT, unsigned int, unsigned int, const NumericT, unsigned int, unsigned int, unsigned int)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:933:27: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:933:40: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:933:53: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:935:28: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:942:27: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:942:40: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:942:53: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x;
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:944:28: error: ‘gridDim’ was not declared in this scope
    i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::element_op(viennacl::vector_base<T>&, const viennacl::vector_expression<const viennacl::vector_base<T="">, const viennacl::vector_base<T>, viennacl::op_element_binary<OpT> >&)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:966:26: error: expected primary-expression before ‘<’ token
    element_op_int_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp:966:37: error: expected primary-expression before ‘>’ token
    element_op_int_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::element_op(viennacl::vector_base<float>&, const viennacl::vector_expression<const viennacl::vector_base<float="">, const viennacl::vector_base<float>, viennacl::op_element_binary<OpT> >&)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:994:22: error: expected primary-expression before ‘<’ token
    element_op_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp:994:33: error: expected primary-expression before ‘>’ token
    element_op_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::element_op(viennacl::vector_base<double>&, const viennacl::vector_expression<const viennacl::vector_base<double="">, const viennacl::vector_base<double>, viennacl::op_element_binary<OpT> >&)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:1022:22: error: expected primary-expression before ‘<’ token
    element_op_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp:1022:33: error: expected primary-expression before ‘>’ token
    element_op_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::vec_element_acos_kernel(NumericT, unsigned int, unsigned int, unsigned int, const NumericT, unsigned int, unsigned int)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:1051:25: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:1051:38: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:1051:51: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:1051:80: error: ‘gridDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::element_op(viennacl::vector_base<T>&, const viennacl::vector_expression<const viennacl::vector_base<T="">, const viennacl::vector_base<T>, viennacl::op_element_unary<viennacl::op_acos> >&)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:1061:28: error: expected primary-expression before ‘<’ token
    vec_element_acos_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp:1061:39: error: expected primary-expression before ‘>’ token
    vec_element_acos_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::vec_element_asin_kernel(NumericT, unsigned int, unsigned int, unsigned int, const NumericT, unsigned int, unsigned int)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:1078:25: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:1078:38: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:1078:51: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:1078:80: error: ‘gridDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::element_op(viennacl::vector_base<T>&, const viennacl::vector_expression<const viennacl::vector_base<T="">, const viennacl::vector_base<T>, viennacl::op_element_unary<viennacl::op_asin> >&)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:1086:28: error: expected primary-expression before ‘<’ token
    vec_element_asin_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp:1086:39: error: expected primary-expression before ‘>’ token
    vec_element_asin_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::vec_element_atan_kernel(NumericT, unsigned int, unsigned int, unsigned int, const NumericT, unsigned int, unsigned int)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:1104:25: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:1104:38: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:1104:51: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:1104:80: error: ‘gridDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::element_op(viennacl::vector_base<T>&, const viennacl::vector_expression<const viennacl::vector_base<T="">, const viennacl::vector_base<T>, viennacl::op_element_unary<viennacl::op_atan> >&)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:1112:28: error: expected primary-expression before ‘<’ token
    vec_element_atan_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp:1112:39: error: expected primary-expression before ‘>’ token
    vec_element_atan_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::vec_element_ceil_kernel(NumericT, unsigned int, unsigned int, unsigned int, const NumericT, unsigned int, unsigned int)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:1130:25: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:1130:38: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:1130:51: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:1130:80: error: ‘gridDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::element_op(viennacl::vector_base<T>&, const viennacl::vector_expression<const viennacl::vector_base<T="">, const viennacl::vector_base<T>, viennacl::op_element_unary<viennacl::op_ceil> >&)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:1138:28: error: expected primary-expression before ‘<’ token
    vec_element_ceil_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp:1138:39: error: expected primary-expression before ‘>’ token
    vec_element_ceil_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::vec_element_cos_kernel(NumericT, unsigned int, unsigned int, unsigned int, const NumericT, unsigned int, unsigned int)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:1156:25: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:1156:38: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:1156:51: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:1156:80: error: ‘gridDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::element_op(viennacl::vector_base<T>&, const viennacl::vector_expression<const viennacl::vector_base<T="">, const viennacl::vector_base<T>, viennacl::op_element_unary<viennacl::op_cos> >&)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:1164:27: error: expected primary-expression before ‘<’ token
    vec_element_cos_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp:1164:38: error: expected primary-expression before ‘>’ token
    vec_element_cos_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::vec_element_cosh_kernel(NumericT, unsigned int, unsigned int, unsigned int, const NumericT, unsigned int, unsigned int)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:1182:25: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:1182:38: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:1182:51: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:1182:80: error: ‘gridDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::element_op(viennacl::vector_base<T>&, const viennacl::vector_expression<const viennacl::vector_base<T="">, const viennacl::vector_base<T>, viennacl::op_element_unary<viennacl::op_cosh> >&)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:1190:28: error: expected primary-expression before ‘<’ token
    vec_element_cosh_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp:1190:39: error: expected primary-expression before ‘>’ token
    vec_element_cosh_kernel<<<128, 128>>>(viennacl::cuda_arg(vec1),
    ^
    ./viennacl/linalg/cuda/vector_operations.hpp: In function ‘void viennacl::linalg::cuda::vec_element_exp_kernel(NumericT, unsigned int, unsigned int, unsigned int, const NumericT, unsigned int, unsigned int)’:
    ./viennacl/linalg/cuda/vector_operations.hpp:1208:25: error: ‘blockDim’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:1208:38: error: ‘blockIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~~
    ./viennacl/linalg/cuda/vector_operations.hpp:1208:51: error: ‘threadIdx’ was not declared in this scope
    for (unsigned int i = blockDim.x * blockIdx.x + threadIdx.x; i < size1; i += gridDim.x * blockDim.x)
    ^~~~~~~~~
    ...
    ~~~

     
  • Karl Rupp

    Karl Rupp - 2017-10-07

    Hi tario,

    you need to make sure that all source files that include ViennaCL with CUDA enabled carry the .cu file extension. Otherwise, the CUDA-compiler will parse the code as normal C++ code, hence the errors.

    Best regards,
    Karli

     

Log in to post a comment.