Permalink
Browse files

Fixed ViennaCL examples

  • Loading branch information...
1 parent a51a734 commit 070d3e9e0ccb4a974a7ca45b54581a603519d046 @ddemidov committed Jan 17, 2013
Showing with 6 additions and 6 deletions.
  1. +0 −1 examples/utests.cpp
  2. +1 −5 examples/viennacl/CMakeLists.txt
  3. +5 −0 vexcl/external/viennacl.hpp
View
@@ -1577,7 +1577,6 @@ int main(int argc, char *argv[]) {
Reductor<size_t,SUM> sumi(ctx.queue());
Reductor<double,SUM> sumd(ctx.queue());
- // These should compile...
vex::vector<cl_uint> x0(ctx.queue(), N);
Random<cl_int> rand0;
x0 = rand0(element_index());
@@ -10,10 +10,6 @@ set(EXAMPLES solvers)
foreach(example ${EXAMPLES})
add_executable(${example} ${example}.cpp)
- target_link_libraries(${example} ${OPENCL_LIBRARY})
+ target_link_libraries(${example} ${OPENCL_LIBRARIES} ${Boost_LIBRARIES})
set_target_properties(${example} PROPERTIES COMPILE_FLAGS -Wno-comment)
-
- if (WIN32)
- target_link_libraries(${example} ${Boost_DATE_TIME_LIBRARY})
- endif(WIN32)
endforeach(example)
@@ -48,6 +48,11 @@ namespace viennacl {
{
return A * x;
}
+
+ template <typename T>
+ T norm_2(const vex::vector<T> &x) {
+ return sqrt(inner_prod(x, x));
+ }
}
namespace traits {

0 comments on commit 070d3e9

Please sign in to comment.