mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apalu...@apache.org
Subject [50/51] [partial] mahout git commit: Revert "(nojira) add native-viennaCL module to codebase. closes apache/mahout#241"
Date Fri, 10 Jun 2016 16:52:55 GMT
http://git-wip-us.apache.org/repos/asf/mahout/blob/7ae549fa/native-viennaCL/src/main/cpp/libviennacl/src/blas1.cpp
----------------------------------------------------------------------
diff --git a/native-viennaCL/src/main/cpp/libviennacl/src/blas1.cpp b/native-viennaCL/src/main/cpp/libviennacl/src/blas1.cpp
deleted file mode 100644
index a7319d5..0000000
--- a/native-viennaCL/src/main/cpp/libviennacl/src/blas1.cpp
+++ /dev/null
@@ -1,420 +0,0 @@
-/* =========================================================================
-   Copyright (c) 2010-2014, Institute for Microelectronics,
-                            Institute for Analysis and Scientific Computing,
-                            TU Wien.
-   Portions of this software are copyright by UChicago Argonne, LLC.
-
-                            -----------------
-                  ViennaCL - The Vienna Computing Library
-                            -----------------
-
-   Project Head:    Karl Rupp                   rupp@iue.tuwien.ac.at
-
-   (A list of authors and contributors can be found in the PDF manual)
-
-   License:         MIT (X11), see file LICENSE in the base directory
-============================================================================= */
-
-// include necessary system headers
-#include <iostream>
-
-#include "viennacl.hpp"
-#include "viennacl_private.hpp"
-
-#include "init_vector.hpp"
-
-//include basic scalar and vector types of ViennaCL
-#include "viennacl/scalar.hpp"
-#include "viennacl/vector.hpp"
-
-//include the generic inner product functions of ViennaCL
-#include "viennacl/linalg/inner_prod.hpp"
-
-//include the generic norm functions of ViennaCL
-#include "viennacl/linalg/norm_1.hpp"
-#include "viennacl/linalg/norm_2.hpp"
-#include "viennacl/linalg/norm_inf.hpp"
-
-// IxAMAX
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLiamax(ViennaCLInt *index, ViennaCLVector x)
-{
-  viennacl::backend::mem_handle v1_handle;
-
-  if (init_vector(v1_handle, x) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  switch (x->precision)
-  {
-    case ViennaCLFloat:
-    {
-      typedef viennacl::vector_base<float>::size_type     difference_type;
-      viennacl::vector_base<float> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-
-      *index = static_cast<ViennaCLInt>(viennacl::linalg::index_norm_inf(v1));
-      return ViennaCLSuccess;
-    }
-
-    case ViennaCLDouble:
-    {
-      typedef viennacl::vector_base<double>::size_type     difference_type;
-      viennacl::vector_base<double> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-
-      *index = static_cast<ViennaCLInt>(viennacl::linalg::index_norm_inf(v1));
-      return ViennaCLSuccess;
-    }
-
-    default:
-      return ViennaCLGenericFailure;
-  }
-}
-
-
-
-
-// xASUM
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLasum(ViennaCLHostScalar *alpha, ViennaCLVector x)
-{
-  if ((*alpha)->precision != x->precision)
-    return ViennaCLGenericFailure;
-
-  viennacl::backend::mem_handle v1_handle;
-
-  if (init_vector(v1_handle, x) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  switch (x->precision)
-  {
-    case ViennaCLFloat:
-    {
-      typedef viennacl::vector_base<float>::size_type     difference_type;
-      viennacl::vector_base<float> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-
-      (*alpha)->value_float = viennacl::linalg::norm_1(v1);
-      return ViennaCLSuccess;
-    }
-
-    case ViennaCLDouble:
-    {
-      typedef viennacl::vector_base<double>::size_type     difference_type;
-      viennacl::vector_base<double> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-
-      (*alpha)->value_double = viennacl::linalg::norm_1(v1);
-      return ViennaCLSuccess;
-    }
-
-    default:
-      return ViennaCLGenericFailure;
-  }
-}
-
-
-
-// xAXPY
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLaxpy(ViennaCLHostScalar alpha, ViennaCLVector x, ViennaCLVector y)
-{
-  if (alpha->precision != x->precision)
-    return ViennaCLGenericFailure;
-
-  if (x->precision != y->precision)
-    return ViennaCLGenericFailure;
-
-  viennacl::backend::mem_handle v1_handle;
-  viennacl::backend::mem_handle v2_handle;
-
-  if (init_vector(v1_handle, x) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  if (init_vector(v2_handle, y) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  switch (x->precision)
-  {
-    case ViennaCLFloat:
-    {
-      typedef viennacl::vector_base<float>::size_type     difference_type;
-      viennacl::vector_base<float> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-      viennacl::vector_base<float> v2(v2_handle, static_cast<viennacl::vcl_size_t>(y->size), static_cast<viennacl::vcl_size_t>(y->offset), static_cast<difference_type>(y->inc));
-
-      v2 += alpha->value_float * v1;
-      return ViennaCLSuccess;
-    }
-
-    case ViennaCLDouble:
-    {
-      typedef viennacl::vector_base<double>::size_type     difference_type;
-      viennacl::vector_base<double> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-      viennacl::vector_base<double> v2(v2_handle, static_cast<viennacl::vcl_size_t>(y->size), static_cast<viennacl::vcl_size_t>(y->offset), static_cast<difference_type>(y->inc));
-
-      v2 += alpha->value_double * v1;
-      return ViennaCLSuccess;
-    }
-
-    default:
-      return ViennaCLGenericFailure;
-  }
-}
-
-
-// xCOPY
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLcopy(ViennaCLVector x, ViennaCLVector y)
-{
-  if (x->precision != y->precision)
-    return ViennaCLGenericFailure;
-
-  viennacl::backend::mem_handle v1_handle;
-  viennacl::backend::mem_handle v2_handle;
-
-  if (init_vector(v1_handle, x) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  if (init_vector(v2_handle, y) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  switch (x->precision)
-  {
-    case ViennaCLFloat:
-    {
-      typedef viennacl::vector_base<float>::size_type     difference_type;
-      viennacl::vector_base<float> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-      viennacl::vector_base<float> v2(v2_handle, static_cast<viennacl::vcl_size_t>(y->size), static_cast<viennacl::vcl_size_t>(y->offset), static_cast<difference_type>(y->inc));
-
-      v2 = v1;
-      return ViennaCLSuccess;
-    }
-
-    case ViennaCLDouble:
-    {
-      typedef viennacl::vector_base<double>::size_type     difference_type;
-      viennacl::vector_base<double> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-      viennacl::vector_base<double> v2(v2_handle, static_cast<viennacl::vcl_size_t>(y->size), static_cast<viennacl::vcl_size_t>(y->offset), static_cast<difference_type>(y->inc));
-
-      v2 = v1;
-      return ViennaCLSuccess;
-    }
-
-    default:
-      return ViennaCLGenericFailure;
-  }
-}
-
-// xDOT
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLdot(ViennaCLHostScalar *alpha, ViennaCLVector x, ViennaCLVector y)
-{
-  if ((*alpha)->precision != x->precision)
-    return ViennaCLGenericFailure;
-
-  if (x->precision != y->precision)
-    return ViennaCLGenericFailure;
-
-  viennacl::backend::mem_handle v1_handle;
-  viennacl::backend::mem_handle v2_handle;
-
-  if (init_vector(v1_handle, x) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  if (init_vector(v2_handle, y) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  switch (x->precision)
-  {
-    case ViennaCLFloat:
-    {
-      typedef viennacl::vector_base<float>::size_type     difference_type;
-      viennacl::vector_base<float> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-      viennacl::vector_base<float> v2(v2_handle, static_cast<viennacl::vcl_size_t>(y->size), static_cast<viennacl::vcl_size_t>(y->offset), static_cast<difference_type>(y->inc));
-
-      (*alpha)->value_float = viennacl::linalg::inner_prod(v1, v2);
-      return ViennaCLSuccess;
-    }
-
-    case ViennaCLDouble:
-    {
-      typedef viennacl::vector_base<double>::size_type     difference_type;
-      viennacl::vector_base<double> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-      viennacl::vector_base<double> v2(v2_handle, static_cast<viennacl::vcl_size_t>(y->size), static_cast<viennacl::vcl_size_t>(y->offset), static_cast<difference_type>(y->inc));
-
-      (*alpha)->value_double = viennacl::linalg::inner_prod(v1, v2);
-      return ViennaCLSuccess;
-    }
-
-    default:
-      return ViennaCLGenericFailure;
-  }
-}
-
-// xNRM2
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLnrm2(ViennaCLHostScalar *alpha, ViennaCLVector x)
-{
-  if ((*alpha)->precision != x->precision)
-    return ViennaCLGenericFailure;
-
-  viennacl::backend::mem_handle v1_handle;
-
-  if (init_vector(v1_handle, x) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  switch (x->precision)
-  {
-    case ViennaCLFloat:
-    {
-      typedef viennacl::vector_base<float>::size_type     difference_type;
-      viennacl::vector_base<float> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-
-      (*alpha)->value_float = viennacl::linalg::norm_2(v1);
-      return ViennaCLSuccess;
-    }
-
-    case ViennaCLDouble:
-    {
-      typedef viennacl::vector_base<double>::size_type     difference_type;
-      viennacl::vector_base<double> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-
-      (*alpha)->value_double = viennacl::linalg::norm_2(v1);
-      return ViennaCLSuccess;
-    }
-
-    default:
-      return ViennaCLGenericFailure;
-  }
-}
-
-
-
-// xROT
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLrot(ViennaCLVector     x, ViennaCLVector     y,
-                                                      ViennaCLHostScalar c, ViennaCLHostScalar s)
-{
-  if (c->precision != x->precision)
-    return ViennaCLGenericFailure;
-
-  if (s->precision != x->precision)
-    return ViennaCLGenericFailure;
-
-  if (x->precision != y->precision)
-    return ViennaCLGenericFailure;
-
-  viennacl::backend::mem_handle v1_handle;
-  viennacl::backend::mem_handle v2_handle;
-
-  if (init_vector(v1_handle, x) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  if (init_vector(v2_handle, y) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  switch (x->precision)
-  {
-    case ViennaCLFloat:
-    {
-      typedef viennacl::vector_base<float>::size_type     difference_type;
-      viennacl::vector_base<float> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-      viennacl::vector_base<float> v2(v2_handle, static_cast<viennacl::vcl_size_t>(y->size), static_cast<viennacl::vcl_size_t>(y->offset), static_cast<difference_type>(y->inc));
-
-      viennacl::linalg::plane_rotation(v1, v2, c->value_float, s->value_float);
-      return ViennaCLSuccess;
-    }
-
-    case ViennaCLDouble:
-    {
-      typedef viennacl::vector_base<double>::size_type     difference_type;
-      viennacl::vector_base<double> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-      viennacl::vector_base<double> v2(v2_handle, static_cast<viennacl::vcl_size_t>(y->size), static_cast<viennacl::vcl_size_t>(y->offset), static_cast<difference_type>(y->inc));
-
-      viennacl::linalg::plane_rotation(v1, v2, c->value_double, s->value_double);
-      return ViennaCLSuccess;
-    }
-
-    default:
-      return ViennaCLGenericFailure;
-  }
-}
-
-// xSCAL
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLscal(ViennaCLHostScalar alpha, ViennaCLVector x)
-{
-  if (alpha->precision != x->precision)
-    return ViennaCLGenericFailure;
-
-  viennacl::backend::mem_handle v1_handle;
-
-  if (init_vector(v1_handle, x) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  switch (x->precision)
-  {
-    case ViennaCLFloat:
-    {
-      typedef viennacl::vector_base<float>::size_type     difference_type;
-      viennacl::vector_base<float> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-
-      v1 *= alpha->value_float;
-      return ViennaCLSuccess;
-    }
-
-    case ViennaCLDouble:
-    {
-      typedef viennacl::vector_base<double>::size_type     difference_type;
-      viennacl::vector_base<double> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-
-      v1 *= alpha->value_double;
-      return ViennaCLSuccess;
-    }
-
-    default:
-      return ViennaCLGenericFailure;
-  }
-}
-
-
-// xSWAP
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLswap(ViennaCLVector x, ViennaCLVector y)
-{
-  if (x->precision != y->precision)
-    return ViennaCLGenericFailure;
-
-  viennacl::backend::mem_handle v1_handle;
-  viennacl::backend::mem_handle v2_handle;
-
-  if (init_vector(v1_handle, x) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  if (init_vector(v2_handle, y) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  switch (x->precision)
-  {
-    case ViennaCLFloat:
-    {
-      typedef viennacl::vector_base<float>::size_type     difference_type;
-      viennacl::vector_base<float> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-      viennacl::vector_base<float> v2(v2_handle, static_cast<viennacl::vcl_size_t>(y->size), static_cast<viennacl::vcl_size_t>(y->offset), static_cast<difference_type>(y->inc));
-
-      viennacl::swap(v1, v2);
-      return ViennaCLSuccess;
-    }
-
-    case ViennaCLDouble:
-    {
-      typedef viennacl::vector_base<double>::size_type     difference_type;
-      viennacl::vector_base<double> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-      viennacl::vector_base<double> v2(v2_handle, static_cast<viennacl::vcl_size_t>(y->size), static_cast<viennacl::vcl_size_t>(y->offset), static_cast<difference_type>(y->inc));
-
-      viennacl::swap(v1, v2);
-      return ViennaCLSuccess;
-    }
-
-    default:
-      return ViennaCLGenericFailure;
-  }
-}
-
-

http://git-wip-us.apache.org/repos/asf/mahout/blob/7ae549fa/native-viennaCL/src/main/cpp/libviennacl/src/blas1.cu
----------------------------------------------------------------------
diff --git a/native-viennaCL/src/main/cpp/libviennacl/src/blas1.cu b/native-viennaCL/src/main/cpp/libviennacl/src/blas1.cu
deleted file mode 100644
index a7319d5..0000000
--- a/native-viennaCL/src/main/cpp/libviennacl/src/blas1.cu
+++ /dev/null
@@ -1,420 +0,0 @@
-/* =========================================================================
-   Copyright (c) 2010-2014, Institute for Microelectronics,
-                            Institute for Analysis and Scientific Computing,
-                            TU Wien.
-   Portions of this software are copyright by UChicago Argonne, LLC.
-
-                            -----------------
-                  ViennaCL - The Vienna Computing Library
-                            -----------------
-
-   Project Head:    Karl Rupp                   rupp@iue.tuwien.ac.at
-
-   (A list of authors and contributors can be found in the PDF manual)
-
-   License:         MIT (X11), see file LICENSE in the base directory
-============================================================================= */
-
-// include necessary system headers
-#include <iostream>
-
-#include "viennacl.hpp"
-#include "viennacl_private.hpp"
-
-#include "init_vector.hpp"
-
-//include basic scalar and vector types of ViennaCL
-#include "viennacl/scalar.hpp"
-#include "viennacl/vector.hpp"
-
-//include the generic inner product functions of ViennaCL
-#include "viennacl/linalg/inner_prod.hpp"
-
-//include the generic norm functions of ViennaCL
-#include "viennacl/linalg/norm_1.hpp"
-#include "viennacl/linalg/norm_2.hpp"
-#include "viennacl/linalg/norm_inf.hpp"
-
-// IxAMAX
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLiamax(ViennaCLInt *index, ViennaCLVector x)
-{
-  viennacl::backend::mem_handle v1_handle;
-
-  if (init_vector(v1_handle, x) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  switch (x->precision)
-  {
-    case ViennaCLFloat:
-    {
-      typedef viennacl::vector_base<float>::size_type     difference_type;
-      viennacl::vector_base<float> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-
-      *index = static_cast<ViennaCLInt>(viennacl::linalg::index_norm_inf(v1));
-      return ViennaCLSuccess;
-    }
-
-    case ViennaCLDouble:
-    {
-      typedef viennacl::vector_base<double>::size_type     difference_type;
-      viennacl::vector_base<double> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-
-      *index = static_cast<ViennaCLInt>(viennacl::linalg::index_norm_inf(v1));
-      return ViennaCLSuccess;
-    }
-
-    default:
-      return ViennaCLGenericFailure;
-  }
-}
-
-
-
-
-// xASUM
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLasum(ViennaCLHostScalar *alpha, ViennaCLVector x)
-{
-  if ((*alpha)->precision != x->precision)
-    return ViennaCLGenericFailure;
-
-  viennacl::backend::mem_handle v1_handle;
-
-  if (init_vector(v1_handle, x) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  switch (x->precision)
-  {
-    case ViennaCLFloat:
-    {
-      typedef viennacl::vector_base<float>::size_type     difference_type;
-      viennacl::vector_base<float> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-
-      (*alpha)->value_float = viennacl::linalg::norm_1(v1);
-      return ViennaCLSuccess;
-    }
-
-    case ViennaCLDouble:
-    {
-      typedef viennacl::vector_base<double>::size_type     difference_type;
-      viennacl::vector_base<double> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-
-      (*alpha)->value_double = viennacl::linalg::norm_1(v1);
-      return ViennaCLSuccess;
-    }
-
-    default:
-      return ViennaCLGenericFailure;
-  }
-}
-
-
-
-// xAXPY
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLaxpy(ViennaCLHostScalar alpha, ViennaCLVector x, ViennaCLVector y)
-{
-  if (alpha->precision != x->precision)
-    return ViennaCLGenericFailure;
-
-  if (x->precision != y->precision)
-    return ViennaCLGenericFailure;
-
-  viennacl::backend::mem_handle v1_handle;
-  viennacl::backend::mem_handle v2_handle;
-
-  if (init_vector(v1_handle, x) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  if (init_vector(v2_handle, y) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  switch (x->precision)
-  {
-    case ViennaCLFloat:
-    {
-      typedef viennacl::vector_base<float>::size_type     difference_type;
-      viennacl::vector_base<float> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-      viennacl::vector_base<float> v2(v2_handle, static_cast<viennacl::vcl_size_t>(y->size), static_cast<viennacl::vcl_size_t>(y->offset), static_cast<difference_type>(y->inc));
-
-      v2 += alpha->value_float * v1;
-      return ViennaCLSuccess;
-    }
-
-    case ViennaCLDouble:
-    {
-      typedef viennacl::vector_base<double>::size_type     difference_type;
-      viennacl::vector_base<double> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-      viennacl::vector_base<double> v2(v2_handle, static_cast<viennacl::vcl_size_t>(y->size), static_cast<viennacl::vcl_size_t>(y->offset), static_cast<difference_type>(y->inc));
-
-      v2 += alpha->value_double * v1;
-      return ViennaCLSuccess;
-    }
-
-    default:
-      return ViennaCLGenericFailure;
-  }
-}
-
-
-// xCOPY
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLcopy(ViennaCLVector x, ViennaCLVector y)
-{
-  if (x->precision != y->precision)
-    return ViennaCLGenericFailure;
-
-  viennacl::backend::mem_handle v1_handle;
-  viennacl::backend::mem_handle v2_handle;
-
-  if (init_vector(v1_handle, x) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  if (init_vector(v2_handle, y) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  switch (x->precision)
-  {
-    case ViennaCLFloat:
-    {
-      typedef viennacl::vector_base<float>::size_type     difference_type;
-      viennacl::vector_base<float> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-      viennacl::vector_base<float> v2(v2_handle, static_cast<viennacl::vcl_size_t>(y->size), static_cast<viennacl::vcl_size_t>(y->offset), static_cast<difference_type>(y->inc));
-
-      v2 = v1;
-      return ViennaCLSuccess;
-    }
-
-    case ViennaCLDouble:
-    {
-      typedef viennacl::vector_base<double>::size_type     difference_type;
-      viennacl::vector_base<double> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-      viennacl::vector_base<double> v2(v2_handle, static_cast<viennacl::vcl_size_t>(y->size), static_cast<viennacl::vcl_size_t>(y->offset), static_cast<difference_type>(y->inc));
-
-      v2 = v1;
-      return ViennaCLSuccess;
-    }
-
-    default:
-      return ViennaCLGenericFailure;
-  }
-}
-
-// xDOT
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLdot(ViennaCLHostScalar *alpha, ViennaCLVector x, ViennaCLVector y)
-{
-  if ((*alpha)->precision != x->precision)
-    return ViennaCLGenericFailure;
-
-  if (x->precision != y->precision)
-    return ViennaCLGenericFailure;
-
-  viennacl::backend::mem_handle v1_handle;
-  viennacl::backend::mem_handle v2_handle;
-
-  if (init_vector(v1_handle, x) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  if (init_vector(v2_handle, y) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  switch (x->precision)
-  {
-    case ViennaCLFloat:
-    {
-      typedef viennacl::vector_base<float>::size_type     difference_type;
-      viennacl::vector_base<float> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-      viennacl::vector_base<float> v2(v2_handle, static_cast<viennacl::vcl_size_t>(y->size), static_cast<viennacl::vcl_size_t>(y->offset), static_cast<difference_type>(y->inc));
-
-      (*alpha)->value_float = viennacl::linalg::inner_prod(v1, v2);
-      return ViennaCLSuccess;
-    }
-
-    case ViennaCLDouble:
-    {
-      typedef viennacl::vector_base<double>::size_type     difference_type;
-      viennacl::vector_base<double> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-      viennacl::vector_base<double> v2(v2_handle, static_cast<viennacl::vcl_size_t>(y->size), static_cast<viennacl::vcl_size_t>(y->offset), static_cast<difference_type>(y->inc));
-
-      (*alpha)->value_double = viennacl::linalg::inner_prod(v1, v2);
-      return ViennaCLSuccess;
-    }
-
-    default:
-      return ViennaCLGenericFailure;
-  }
-}
-
-// xNRM2
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLnrm2(ViennaCLHostScalar *alpha, ViennaCLVector x)
-{
-  if ((*alpha)->precision != x->precision)
-    return ViennaCLGenericFailure;
-
-  viennacl::backend::mem_handle v1_handle;
-
-  if (init_vector(v1_handle, x) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  switch (x->precision)
-  {
-    case ViennaCLFloat:
-    {
-      typedef viennacl::vector_base<float>::size_type     difference_type;
-      viennacl::vector_base<float> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-
-      (*alpha)->value_float = viennacl::linalg::norm_2(v1);
-      return ViennaCLSuccess;
-    }
-
-    case ViennaCLDouble:
-    {
-      typedef viennacl::vector_base<double>::size_type     difference_type;
-      viennacl::vector_base<double> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-
-      (*alpha)->value_double = viennacl::linalg::norm_2(v1);
-      return ViennaCLSuccess;
-    }
-
-    default:
-      return ViennaCLGenericFailure;
-  }
-}
-
-
-
-// xROT
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLrot(ViennaCLVector     x, ViennaCLVector     y,
-                                                      ViennaCLHostScalar c, ViennaCLHostScalar s)
-{
-  if (c->precision != x->precision)
-    return ViennaCLGenericFailure;
-
-  if (s->precision != x->precision)
-    return ViennaCLGenericFailure;
-
-  if (x->precision != y->precision)
-    return ViennaCLGenericFailure;
-
-  viennacl::backend::mem_handle v1_handle;
-  viennacl::backend::mem_handle v2_handle;
-
-  if (init_vector(v1_handle, x) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  if (init_vector(v2_handle, y) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  switch (x->precision)
-  {
-    case ViennaCLFloat:
-    {
-      typedef viennacl::vector_base<float>::size_type     difference_type;
-      viennacl::vector_base<float> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-      viennacl::vector_base<float> v2(v2_handle, static_cast<viennacl::vcl_size_t>(y->size), static_cast<viennacl::vcl_size_t>(y->offset), static_cast<difference_type>(y->inc));
-
-      viennacl::linalg::plane_rotation(v1, v2, c->value_float, s->value_float);
-      return ViennaCLSuccess;
-    }
-
-    case ViennaCLDouble:
-    {
-      typedef viennacl::vector_base<double>::size_type     difference_type;
-      viennacl::vector_base<double> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-      viennacl::vector_base<double> v2(v2_handle, static_cast<viennacl::vcl_size_t>(y->size), static_cast<viennacl::vcl_size_t>(y->offset), static_cast<difference_type>(y->inc));
-
-      viennacl::linalg::plane_rotation(v1, v2, c->value_double, s->value_double);
-      return ViennaCLSuccess;
-    }
-
-    default:
-      return ViennaCLGenericFailure;
-  }
-}
-
-// xSCAL
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLscal(ViennaCLHostScalar alpha, ViennaCLVector x)
-{
-  if (alpha->precision != x->precision)
-    return ViennaCLGenericFailure;
-
-  viennacl::backend::mem_handle v1_handle;
-
-  if (init_vector(v1_handle, x) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  switch (x->precision)
-  {
-    case ViennaCLFloat:
-    {
-      typedef viennacl::vector_base<float>::size_type     difference_type;
-      viennacl::vector_base<float> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-
-      v1 *= alpha->value_float;
-      return ViennaCLSuccess;
-    }
-
-    case ViennaCLDouble:
-    {
-      typedef viennacl::vector_base<double>::size_type     difference_type;
-      viennacl::vector_base<double> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-
-      v1 *= alpha->value_double;
-      return ViennaCLSuccess;
-    }
-
-    default:
-      return ViennaCLGenericFailure;
-  }
-}
-
-
-// xSWAP
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLswap(ViennaCLVector x, ViennaCLVector y)
-{
-  if (x->precision != y->precision)
-    return ViennaCLGenericFailure;
-
-  viennacl::backend::mem_handle v1_handle;
-  viennacl::backend::mem_handle v2_handle;
-
-  if (init_vector(v1_handle, x) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  if (init_vector(v2_handle, y) != ViennaCLSuccess)
-    return ViennaCLGenericFailure;
-
-  switch (x->precision)
-  {
-    case ViennaCLFloat:
-    {
-      typedef viennacl::vector_base<float>::size_type     difference_type;
-      viennacl::vector_base<float> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-      viennacl::vector_base<float> v2(v2_handle, static_cast<viennacl::vcl_size_t>(y->size), static_cast<viennacl::vcl_size_t>(y->offset), static_cast<difference_type>(y->inc));
-
-      viennacl::swap(v1, v2);
-      return ViennaCLSuccess;
-    }
-
-    case ViennaCLDouble:
-    {
-      typedef viennacl::vector_base<double>::size_type     difference_type;
-      viennacl::vector_base<double> v1(v1_handle, static_cast<viennacl::vcl_size_t>(x->size), static_cast<viennacl::vcl_size_t>(x->offset), static_cast<difference_type>(x->inc));
-      viennacl::vector_base<double> v2(v2_handle, static_cast<viennacl::vcl_size_t>(y->size), static_cast<viennacl::vcl_size_t>(y->offset), static_cast<difference_type>(y->inc));
-
-      viennacl::swap(v1, v2);
-      return ViennaCLSuccess;
-    }
-
-    default:
-      return ViennaCLGenericFailure;
-  }
-}
-
-

http://git-wip-us.apache.org/repos/asf/mahout/blob/7ae549fa/native-viennaCL/src/main/cpp/libviennacl/src/blas1_cuda.cu
----------------------------------------------------------------------
diff --git a/native-viennaCL/src/main/cpp/libviennacl/src/blas1_cuda.cu b/native-viennaCL/src/main/cpp/libviennacl/src/blas1_cuda.cu
deleted file mode 100644
index e6dddbb..0000000
--- a/native-viennaCL/src/main/cpp/libviennacl/src/blas1_cuda.cu
+++ /dev/null
@@ -1,264 +0,0 @@
-/* =========================================================================
-   Copyright (c) 2010-2014, Institute for Microelectronics,
-                            Institute for Analysis and Scientific Computing,
-                            TU Wien.
-   Portions of this software are copyright by UChicago Argonne, LLC.
-
-                            -----------------
-                  ViennaCL - The Vienna Computing Library
-                            -----------------
-
-   Project Head:    Karl Rupp                   rupp@iue.tuwien.ac.at
-
-   (A list of authors and contributors can be found in the PDF manual)
-
-   License:         MIT (X11), see file LICENSE in the base directory
-============================================================================= */
-
-// include necessary system headers
-#include <iostream>
-
-#include "viennacl.hpp"
-#include "viennacl_private.hpp"
-
-//include basic scalar and vector types of ViennaCL
-#include "viennacl/scalar.hpp"
-#include "viennacl/vector.hpp"
-
-//include the generic inner product functions of ViennaCL
-#include "viennacl/linalg/inner_prod.hpp"
-
-//include the generic norm functions of ViennaCL
-#include "viennacl/linalg/norm_1.hpp"
-#include "viennacl/linalg/norm_2.hpp"
-#include "viennacl/linalg/norm_inf.hpp"
-
-
-#ifdef VIENNACL_WITH_CUDA
-
-
-// IxAMAX
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLCUDAiSamax(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                             ViennaCLInt *index,
-                                                             float *x, ViennaCLInt offx, ViennaCLInt incx)
-{
-  viennacl::vector_base<float> v1(x, viennacl::CUDA_MEMORY, n, offx, incx);
-
-  *index = static_cast<ViennaCLInt>(viennacl::linalg::index_norm_inf(v1));
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLCUDAiDamax(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                             ViennaCLInt *index,
-                                                             double *x, ViennaCLInt offx, ViennaCLInt incx)
-{
-  viennacl::vector_base<double> v1(x, viennacl::CUDA_MEMORY, n, offx, incx);
-
-  *index = static_cast<ViennaCLInt>(viennacl::linalg::index_norm_inf(v1));
-  return ViennaCLSuccess;
-}
-
-
-
-// xASUM
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLCUDASasum(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            float *alpha,
-                                                            float *x, ViennaCLInt offx, ViennaCLInt incx)
-{
-  viennacl::vector_base<float> v1(x, viennacl::CUDA_MEMORY, n, offx, incx);
-
-  *alpha = viennacl::linalg::norm_1(v1);
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLCUDADasum(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            double *alpha,
-                                                            double *x, ViennaCLInt offx, ViennaCLInt incx)
-{
-  viennacl::vector_base<double> v1(x, viennacl::CUDA_MEMORY, n, offx, incx);
-
-  *alpha = viennacl::linalg::norm_1(v1);
-  return ViennaCLSuccess;
-}
-
-
-// xAXPY
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLCUDASaxpy(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            float alpha,
-                                                            float *x, ViennaCLInt offx, ViennaCLInt incx,
-                                                            float *y, ViennaCLInt offy, ViennaCLInt incy)
-{
-  viennacl::vector_base<float> v1(x, viennacl::CUDA_MEMORY, n, offx, incx);
-  viennacl::vector_base<float> v2(y, viennacl::CUDA_MEMORY, n, offy, incy);
-
-  v2 += alpha * v1;
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLCUDADaxpy(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            double alpha,
-                                                            double *x, ViennaCLInt offx, ViennaCLInt incx,
-                                                            double *y, ViennaCLInt offy, ViennaCLInt incy)
-{
-  viennacl::vector_base<double> v1(x, viennacl::CUDA_MEMORY, n, offx, incx);
-  viennacl::vector_base<double> v2(y, viennacl::CUDA_MEMORY, n, offy, incy);
-
-  v2 += alpha * v1;
-  return ViennaCLSuccess;
-}
-
-
-// xCOPY
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLCUDAScopy(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            float *x, ViennaCLInt offx, ViennaCLInt incx,
-                                                            float *y, ViennaCLInt offy, ViennaCLInt incy)
-{
-  viennacl::vector_base<float> v1(x, viennacl::CUDA_MEMORY, n, offx, incx);
-  viennacl::vector_base<float> v2(y, viennacl::CUDA_MEMORY, n, offy, incy);
-
-  v2 = v1;
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLCUDADcopy(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            double *x, ViennaCLInt offx, ViennaCLInt incx,
-                                                            double *y, ViennaCLInt offy, ViennaCLInt incy)
-{
-  viennacl::vector_base<double> v1(x, viennacl::CUDA_MEMORY, n, offx, incx);
-  viennacl::vector_base<double> v2(y, viennacl::CUDA_MEMORY, n, offy, incy);
-
-  v2 = v1;
-  return ViennaCLSuccess;
-}
-
-// xDOT
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLCUDASdot(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                           float *alpha,
-                                                           float *x, ViennaCLInt offx, ViennaCLInt incx,
-                                                           float *y, ViennaCLInt offy, ViennaCLInt incy)
-{
-  viennacl::vector_base<float> v1(x, viennacl::CUDA_MEMORY, n, offx, incx);
-  viennacl::vector_base<float> v2(y, viennacl::CUDA_MEMORY, n, offy, incy);
-
-  *alpha = viennacl::linalg::inner_prod(v1, v2);
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLCUDADdot(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                           double *alpha,
-                                                           double *x, ViennaCLInt offx, ViennaCLInt incx,
-                                                           double *y, ViennaCLInt offy, ViennaCLInt incy)
-{
-  viennacl::vector_base<double> v1(x, viennacl::CUDA_MEMORY, n, offx, incx);
-  viennacl::vector_base<double> v2(y, viennacl::CUDA_MEMORY, n, offy, incy);
-
-  *alpha = viennacl::linalg::inner_prod(v1, v2);
-  return ViennaCLSuccess;
-}
-
-// xNRM2
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLCUDASnrm2(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            float *alpha,
-                                                            float *x, ViennaCLInt offx, ViennaCLInt incx)
-{
-  viennacl::vector_base<float> v1(x, viennacl::CUDA_MEMORY, n, offx, incx);
-
-  *alpha = viennacl::linalg::norm_2(v1);
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLCUDADnrm2(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            double *alpha,
-                                                            double *x, ViennaCLInt offx, ViennaCLInt incx)
-{
-  viennacl::vector_base<double> v1(x, viennacl::CUDA_MEMORY, n, offx, incx);
-
-  *alpha = viennacl::linalg::norm_2(v1);
-  return ViennaCLSuccess;
-}
-
-
-
-// xROT
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLCUDASrot(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                           float *x, ViennaCLInt offx, ViennaCLInt incx,
-                                                           float *y, ViennaCLInt offy, ViennaCLInt incy,
-                                                           float c, float s)
-{
-  viennacl::vector_base<float> v1(x, viennacl::CUDA_MEMORY, n, offx, incx);
-  viennacl::vector_base<float> v2(y, viennacl::CUDA_MEMORY, n, offy, incy);
-
-  viennacl::linalg::plane_rotation(v1, v2, c, s);
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLCUDADrot(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                           double *x, ViennaCLInt offx, ViennaCLInt incx,
-                                                           double *y, ViennaCLInt offy, ViennaCLInt incy,
-                                                           double c, double s)
-{
-  viennacl::vector_base<double> v1(x, viennacl::CUDA_MEMORY, n, offx, incx);
-  viennacl::vector_base<double> v2(y, viennacl::CUDA_MEMORY, n, offy, incy);
-
-  viennacl::linalg::plane_rotation(v1, v2, c, s);
-  return ViennaCLSuccess;
-}
-
-
-
-// xSCAL
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLCUDASscal(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            float alpha,
-                                                            float *x, ViennaCLInt offx, ViennaCLInt incx)
-{
-  viennacl::vector_base<float> v1(x, viennacl::CUDA_MEMORY, n, offx, incx);
-
-  v1 *= alpha;
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLCUDADscal(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            double alpha,
-                                                            double *x, ViennaCLInt offx, ViennaCLInt incx)
-{
-  viennacl::vector_base<double> v1(x, viennacl::CUDA_MEMORY, n, offx, incx);
-
-  v1 *= alpha;
-  return ViennaCLSuccess;
-}
-
-
-// xSWAP
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLCUDASswap(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            float *x, ViennaCLInt offx, ViennaCLInt incx,
-                                                            float *y, ViennaCLInt offy, ViennaCLInt incy)
-{
-  viennacl::vector_base<float> v1(x, viennacl::CUDA_MEMORY, n, offx, incx);
-  viennacl::vector_base<float> v2(y, viennacl::CUDA_MEMORY, n, offy, incy);
-
-  viennacl::swap(v1, v2);
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLCUDADswap(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            double *x, ViennaCLInt offx, ViennaCLInt incx,
-                                                            double *y, ViennaCLInt offy, ViennaCLInt incy)
-{
-  viennacl::vector_base<double> v1(x, viennacl::CUDA_MEMORY, n, offx, incx);
-  viennacl::vector_base<double> v2(y, viennacl::CUDA_MEMORY, n, offy, incy);
-
-  viennacl::swap(v1, v2);
-  return ViennaCLSuccess;
-}
-#endif
-
-

http://git-wip-us.apache.org/repos/asf/mahout/blob/7ae549fa/native-viennaCL/src/main/cpp/libviennacl/src/blas1_host.cpp
----------------------------------------------------------------------
diff --git a/native-viennaCL/src/main/cpp/libviennacl/src/blas1_host.cpp b/native-viennaCL/src/main/cpp/libviennacl/src/blas1_host.cpp
deleted file mode 100644
index 07a5097..0000000
--- a/native-viennaCL/src/main/cpp/libviennacl/src/blas1_host.cpp
+++ /dev/null
@@ -1,293 +0,0 @@
-/* =========================================================================
-   Copyright (c) 2010-2014, Institute for Microelectronics,
-                            Institute for Analysis and Scientific Computing,
-                            TU Wien.
-   Portions of this software are copyright by UChicago Argonne, LLC.
-
-                            -----------------
-                  ViennaCL - The Vienna Computing Library
-                            -----------------
-
-   Project Head:    Karl Rupp                   rupp@iue.tuwien.ac.at
-
-   (A list of authors and contributors can be found in the PDF manual)
-
-   License:         MIT (X11), see file LICENSE in the base directory
-============================================================================= */
-
-// include necessary system headers
-#include <iostream>
-
-#include "viennacl.hpp"
-#include "viennacl_private.hpp"
-
-//include basic scalar and vector types of ViennaCL
-#include "viennacl/scalar.hpp"
-#include "viennacl/vector.hpp"
-
-//include the generic inner product functions of ViennaCL
-#include "viennacl/linalg/inner_prod.hpp"
-
-//include the generic norm functions of ViennaCL
-#include "viennacl/linalg/norm_1.hpp"
-#include "viennacl/linalg/norm_2.hpp"
-#include "viennacl/linalg/norm_inf.hpp"
-
-
-// IxAMAX
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostiSamax(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                             ViennaCLInt *index,
-                                                             float *x, ViennaCLInt offx, int incx)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-
-  *index = static_cast<ViennaCLInt>(viennacl::linalg::index_norm_inf(v1));
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostiDamax(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                             ViennaCLInt *index,
-                                                             double *x, ViennaCLInt offx, int incx)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-
-  *index = static_cast<ViennaCLInt>(viennacl::linalg::index_norm_inf(v1));
-  return ViennaCLSuccess;
-}
-
-
-
-// xASUM
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostSasum(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            float *alpha,
-                                                            float *x, ViennaCLInt offx, int incx)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-
-  *alpha = viennacl::linalg::norm_1(v1);
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostDasum(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            double *alpha,
-                                                            double *x, ViennaCLInt offx, int incx)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-
-  *alpha = viennacl::linalg::norm_1(v1);
-  return ViennaCLSuccess;
-}
-
-
-
-// xAXPY
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostSaxpy(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            float alpha,
-                                                            float *x, ViennaCLInt offx, int incx,
-                                                            float *y, ViennaCLInt offy, int incy)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-  viennacl::vector_base<float> v2(y, viennacl::MAIN_MEMORY, size_type(n), size_type(offy), difference_type(incy));
-
-  v2 += alpha * v1;
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostDaxpy(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            double alpha,
-                                                            double *x, ViennaCLInt offx, int incx,
-                                                            double *y, ViennaCLInt offy, int incy)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-  viennacl::vector_base<double> v2(y, viennacl::MAIN_MEMORY, size_type(n), size_type(offy), difference_type(incy));
-
-  v2 += alpha * v1;
-  return ViennaCLSuccess;
-}
-
-
-// xCOPY
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostScopy(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            float *x, ViennaCLInt offx, int incx,
-                                                            float *y, ViennaCLInt offy, int incy)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-  viennacl::vector_base<float> v2(y, viennacl::MAIN_MEMORY, size_type(n), size_type(offy), difference_type(incy));
-
-  v2 = v1;
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostDcopy(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            double *x, ViennaCLInt offx, int incx,
-                                                            double *y, ViennaCLInt offy, int incy)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-  viennacl::vector_base<double> v2(y, viennacl::MAIN_MEMORY, size_type(n), size_type(offy), difference_type(incy));
-
-  v2 = v1;
-  return ViennaCLSuccess;
-}
-
-// xAXPY
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostSdot(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                           float *alpha,
-                                                           float *x, ViennaCLInt offx, int incx,
-                                                           float *y, ViennaCLInt offy, int incy)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-  viennacl::vector_base<float> v2(y, viennacl::MAIN_MEMORY, size_type(n), size_type(offy), difference_type(incy));
-
-  *alpha = viennacl::linalg::inner_prod(v1, v2);
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostDdot(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                           double *alpha,
-                                                           double *x, ViennaCLInt offx, int incx,
-                                                           double *y, ViennaCLInt offy, int incy)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-  viennacl::vector_base<double> v2(y, viennacl::MAIN_MEMORY, size_type(n), size_type(offy), difference_type(incy));
-
-  *alpha = viennacl::linalg::inner_prod(v1, v2);
-  return ViennaCLSuccess;
-}
-
-// xNRM2
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostSnrm2(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            float *alpha,
-                                                            float *x, ViennaCLInt offx, int incx)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-
-  *alpha = viennacl::linalg::norm_2(v1);
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostDnrm2(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            double *alpha,
-                                                            double *x, ViennaCLInt offx, int incx)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-
-  *alpha = viennacl::linalg::norm_2(v1);
-  return ViennaCLSuccess;
-}
-
-
-// xROT
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostSrot(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                           float *x, ViennaCLInt offx, int incx,
-                                                           float *y, ViennaCLInt offy, int incy,
-                                                           float c, float s)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-  viennacl::vector_base<float> v2(y, viennacl::MAIN_MEMORY, size_type(n), size_type(offy), difference_type(incy));
-
-  viennacl::linalg::plane_rotation(v1, v2, c, s);
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostDrot(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                           double *x, ViennaCLInt offx, int incx,
-                                                           double *y, ViennaCLInt offy, int incy,
-                                                           double c, double s)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-  viennacl::vector_base<double> v2(y, viennacl::MAIN_MEMORY, size_type(n), size_type(offy), difference_type(incy));
-
-  viennacl::linalg::plane_rotation(v1, v2, c, s);
-  return ViennaCLSuccess;
-}
-
-
-
-// xSCAL
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostSscal(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            float alpha,
-                                                            float *x, ViennaCLInt offx, int incx)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-
-  v1 *= alpha;
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostDscal(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            double alpha,
-                                                            double *x, ViennaCLInt offx, int incx)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-
-  v1 *= alpha;
-  return ViennaCLSuccess;
-}
-
-// xSWAP
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostSswap(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            float *x, ViennaCLInt offx, int incx,
-                                                            float *y, ViennaCLInt offy, int incy)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-  viennacl::vector_base<float> v2(y, viennacl::MAIN_MEMORY, size_type(n), size_type(offy), difference_type(incy));
-
-  viennacl::swap(v1, v2);
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostDswap(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            double *x, ViennaCLInt offx, int incx,
-                                                            double *y, ViennaCLInt offy, int incy)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-  viennacl::vector_base<double> v2(y, viennacl::MAIN_MEMORY, size_type(n), size_type(offy), difference_type(incy));
-
-  viennacl::swap(v1, v2);
-  return ViennaCLSuccess;
-}

http://git-wip-us.apache.org/repos/asf/mahout/blob/7ae549fa/native-viennaCL/src/main/cpp/libviennacl/src/blas1_host.cu
----------------------------------------------------------------------
diff --git a/native-viennaCL/src/main/cpp/libviennacl/src/blas1_host.cu b/native-viennaCL/src/main/cpp/libviennacl/src/blas1_host.cu
deleted file mode 100644
index 07a5097..0000000
--- a/native-viennaCL/src/main/cpp/libviennacl/src/blas1_host.cu
+++ /dev/null
@@ -1,293 +0,0 @@
-/* =========================================================================
-   Copyright (c) 2010-2014, Institute for Microelectronics,
-                            Institute for Analysis and Scientific Computing,
-                            TU Wien.
-   Portions of this software are copyright by UChicago Argonne, LLC.
-
-                            -----------------
-                  ViennaCL - The Vienna Computing Library
-                            -----------------
-
-   Project Head:    Karl Rupp                   rupp@iue.tuwien.ac.at
-
-   (A list of authors and contributors can be found in the PDF manual)
-
-   License:         MIT (X11), see file LICENSE in the base directory
-============================================================================= */
-
-// include necessary system headers
-#include <iostream>
-
-#include "viennacl.hpp"
-#include "viennacl_private.hpp"
-
-//include basic scalar and vector types of ViennaCL
-#include "viennacl/scalar.hpp"
-#include "viennacl/vector.hpp"
-
-//include the generic inner product functions of ViennaCL
-#include "viennacl/linalg/inner_prod.hpp"
-
-//include the generic norm functions of ViennaCL
-#include "viennacl/linalg/norm_1.hpp"
-#include "viennacl/linalg/norm_2.hpp"
-#include "viennacl/linalg/norm_inf.hpp"
-
-
-// IxAMAX
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostiSamax(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                             ViennaCLInt *index,
-                                                             float *x, ViennaCLInt offx, int incx)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-
-  *index = static_cast<ViennaCLInt>(viennacl::linalg::index_norm_inf(v1));
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostiDamax(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                             ViennaCLInt *index,
-                                                             double *x, ViennaCLInt offx, int incx)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-
-  *index = static_cast<ViennaCLInt>(viennacl::linalg::index_norm_inf(v1));
-  return ViennaCLSuccess;
-}
-
-
-
-// xASUM
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostSasum(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            float *alpha,
-                                                            float *x, ViennaCLInt offx, int incx)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-
-  *alpha = viennacl::linalg::norm_1(v1);
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostDasum(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            double *alpha,
-                                                            double *x, ViennaCLInt offx, int incx)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-
-  *alpha = viennacl::linalg::norm_1(v1);
-  return ViennaCLSuccess;
-}
-
-
-
-// xAXPY
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostSaxpy(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            float alpha,
-                                                            float *x, ViennaCLInt offx, int incx,
-                                                            float *y, ViennaCLInt offy, int incy)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-  viennacl::vector_base<float> v2(y, viennacl::MAIN_MEMORY, size_type(n), size_type(offy), difference_type(incy));
-
-  v2 += alpha * v1;
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostDaxpy(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            double alpha,
-                                                            double *x, ViennaCLInt offx, int incx,
-                                                            double *y, ViennaCLInt offy, int incy)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-  viennacl::vector_base<double> v2(y, viennacl::MAIN_MEMORY, size_type(n), size_type(offy), difference_type(incy));
-
-  v2 += alpha * v1;
-  return ViennaCLSuccess;
-}
-
-
-// xCOPY
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostScopy(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            float *x, ViennaCLInt offx, int incx,
-                                                            float *y, ViennaCLInt offy, int incy)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-  viennacl::vector_base<float> v2(y, viennacl::MAIN_MEMORY, size_type(n), size_type(offy), difference_type(incy));
-
-  v2 = v1;
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostDcopy(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            double *x, ViennaCLInt offx, int incx,
-                                                            double *y, ViennaCLInt offy, int incy)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-  viennacl::vector_base<double> v2(y, viennacl::MAIN_MEMORY, size_type(n), size_type(offy), difference_type(incy));
-
-  v2 = v1;
-  return ViennaCLSuccess;
-}
-
-// xAXPY
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostSdot(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                           float *alpha,
-                                                           float *x, ViennaCLInt offx, int incx,
-                                                           float *y, ViennaCLInt offy, int incy)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-  viennacl::vector_base<float> v2(y, viennacl::MAIN_MEMORY, size_type(n), size_type(offy), difference_type(incy));
-
-  *alpha = viennacl::linalg::inner_prod(v1, v2);
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostDdot(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                           double *alpha,
-                                                           double *x, ViennaCLInt offx, int incx,
-                                                           double *y, ViennaCLInt offy, int incy)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-  viennacl::vector_base<double> v2(y, viennacl::MAIN_MEMORY, size_type(n), size_type(offy), difference_type(incy));
-
-  *alpha = viennacl::linalg::inner_prod(v1, v2);
-  return ViennaCLSuccess;
-}
-
-// xNRM2
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostSnrm2(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            float *alpha,
-                                                            float *x, ViennaCLInt offx, int incx)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-
-  *alpha = viennacl::linalg::norm_2(v1);
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostDnrm2(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            double *alpha,
-                                                            double *x, ViennaCLInt offx, int incx)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-
-  *alpha = viennacl::linalg::norm_2(v1);
-  return ViennaCLSuccess;
-}
-
-
-// xROT
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostSrot(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                           float *x, ViennaCLInt offx, int incx,
-                                                           float *y, ViennaCLInt offy, int incy,
-                                                           float c, float s)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-  viennacl::vector_base<float> v2(y, viennacl::MAIN_MEMORY, size_type(n), size_type(offy), difference_type(incy));
-
-  viennacl::linalg::plane_rotation(v1, v2, c, s);
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostDrot(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                           double *x, ViennaCLInt offx, int incx,
-                                                           double *y, ViennaCLInt offy, int incy,
-                                                           double c, double s)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-  viennacl::vector_base<double> v2(y, viennacl::MAIN_MEMORY, size_type(n), size_type(offy), difference_type(incy));
-
-  viennacl::linalg::plane_rotation(v1, v2, c, s);
-  return ViennaCLSuccess;
-}
-
-
-
-// xSCAL
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostSscal(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            float alpha,
-                                                            float *x, ViennaCLInt offx, int incx)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-
-  v1 *= alpha;
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostDscal(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            double alpha,
-                                                            double *x, ViennaCLInt offx, int incx)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-
-  v1 *= alpha;
-  return ViennaCLSuccess;
-}
-
-// xSWAP
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostSswap(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            float *x, ViennaCLInt offx, int incx,
-                                                            float *y, ViennaCLInt offy, int incy)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-  viennacl::vector_base<float> v2(y, viennacl::MAIN_MEMORY, size_type(n), size_type(offy), difference_type(incy));
-
-  viennacl::swap(v1, v2);
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLHostDswap(ViennaCLBackend /*backend*/, ViennaCLInt n,
-                                                            double *x, ViennaCLInt offx, int incx,
-                                                            double *y, ViennaCLInt offy, int incy)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, viennacl::MAIN_MEMORY, size_type(n), size_type(offx), difference_type(incx));
-  viennacl::vector_base<double> v2(y, viennacl::MAIN_MEMORY, size_type(n), size_type(offy), difference_type(incy));
-
-  viennacl::swap(v1, v2);
-  return ViennaCLSuccess;
-}

http://git-wip-us.apache.org/repos/asf/mahout/blob/7ae549fa/native-viennaCL/src/main/cpp/libviennacl/src/blas1_opencl.cpp
----------------------------------------------------------------------
diff --git a/native-viennaCL/src/main/cpp/libviennacl/src/blas1_opencl.cpp b/native-viennaCL/src/main/cpp/libviennacl/src/blas1_opencl.cpp
deleted file mode 100644
index 617b128..0000000
--- a/native-viennaCL/src/main/cpp/libviennacl/src/blas1_opencl.cpp
+++ /dev/null
@@ -1,297 +0,0 @@
-/* =========================================================================
-   Copyright (c) 2010-2014, Institute for Microelectronics,
-                            Institute for Analysis and Scientific Computing,
-                            TU Wien.
-   Portions of this software are copyright by UChicago Argonne, LLC.
-
-                            -----------------
-                  ViennaCL - The Vienna Computing Library
-                            -----------------
-
-   Project Head:    Karl Rupp                   rupp@iue.tuwien.ac.at
-
-   (A list of authors and contributors can be found in the PDF manual)
-
-   License:         MIT (X11), see file LICENSE in the base directory
-============================================================================= */
-
-// include necessary system headers
-#include <iostream>
-
-#include "viennacl.hpp"
-#include "viennacl_private.hpp"
-
-//include basic scalar and vector types of ViennaCL
-#include "viennacl/scalar.hpp"
-#include "viennacl/vector.hpp"
-
-//include the generic inner product functions of ViennaCL
-#include "viennacl/linalg/inner_prod.hpp"
-
-//include the generic norm functions of ViennaCL
-#include "viennacl/linalg/norm_1.hpp"
-#include "viennacl/linalg/norm_2.hpp"
-#include "viennacl/linalg/norm_inf.hpp"
-
-#ifdef VIENNACL_WITH_OPENCL
-
-// IxAMAX
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLOpenCLiSamax(ViennaCLBackend backend, ViennaCLInt n,
-                                                               ViennaCLInt *index,
-                                                               cl_mem x, ViennaCLInt offx, ViennaCLInt incx)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, size_type(n), size_type(offx), difference_type(incx), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-
-  *index = static_cast<ViennaCLInt>(viennacl::linalg::index_norm_inf(v1));
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLOpenCLiDamax(ViennaCLBackend backend, ViennaCLInt n,
-                                                               ViennaCLInt *index,
-                                                               cl_mem x, ViennaCLInt offx, ViennaCLInt incx)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, size_type(n), size_type(offx), difference_type(incx), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-
-  *index = static_cast<ViennaCLInt>(viennacl::linalg::index_norm_inf(v1));
-  return ViennaCLSuccess;
-}
-
-
-
-
-// xASUM
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLOpenCLSasum(ViennaCLBackend backend, ViennaCLInt n,
-                                                              float *alpha,
-                                                              cl_mem x, ViennaCLInt offx, ViennaCLInt incx)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, size_type(n), size_type(offx), difference_type(incx), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-
-  *alpha = viennacl::linalg::norm_1(v1);
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLOpenCLDasum(ViennaCLBackend backend, ViennaCLInt n,
-                                                              double *alpha,
-                                                              cl_mem x, ViennaCLInt offx, ViennaCLInt incx)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, size_type(n), size_type(offx), difference_type(incx), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-
-  *alpha = viennacl::linalg::norm_1(v1);
-  return ViennaCLSuccess;
-}
-
-
-
-// xAXPY
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLOpenCLSaxpy(ViennaCLBackend backend, ViennaCLInt n,
-                                                              float alpha,
-                                                              cl_mem x, ViennaCLInt offx, ViennaCLInt incx,
-                                                              cl_mem y, ViennaCLInt offy, ViennaCLInt incy)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, size_type(n), size_type(offx), difference_type(incx), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-  viennacl::vector_base<float> v2(y, size_type(n), size_type(offy), difference_type(incy), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-
-  v2 += alpha * v1;
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLOpenCLDaxpy(ViennaCLBackend backend, ViennaCLInt n,
-                                                              double alpha,
-                                                              cl_mem x, ViennaCLInt offx, ViennaCLInt incx,
-                                                              cl_mem y, ViennaCLInt offy, ViennaCLInt incy)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, size_type(n), size_type(offx), difference_type(incx), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-  viennacl::vector_base<double> v2(y, size_type(n), size_type(offy), difference_type(incy), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-
-  v2 += alpha * v1;
-  return ViennaCLSuccess;
-}
-
-
-// xCOPY
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLOpenCLScopy(ViennaCLBackend backend, ViennaCLInt n,
-                                                              cl_mem x, ViennaCLInt offx, ViennaCLInt incx,
-                                                              cl_mem y, ViennaCLInt offy, ViennaCLInt incy)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, size_type(n), size_type(offx), difference_type(incx), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-  viennacl::vector_base<float> v2(y, size_type(n), size_type(offy), difference_type(incy), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-
-  v2 = v1;
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLOpenCLDcopy(ViennaCLBackend backend, ViennaCLInt n,
-                                                              cl_mem x, ViennaCLInt offx, ViennaCLInt incx,
-                                                              cl_mem y, ViennaCLInt offy, ViennaCLInt incy)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, size_type(n), size_type(offx), difference_type(incx), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-  viennacl::vector_base<double> v2(y, size_type(n), size_type(offy), difference_type(incy), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-
-  v2 = v1;
-  return ViennaCLSuccess;
-}
-
-// xDOT
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLOpenCLSdot(ViennaCLBackend backend, ViennaCLInt n,
-                                                             float *alpha,
-                                                             cl_mem x, ViennaCLInt offx, ViennaCLInt incx,
-                                                             cl_mem y, ViennaCLInt offy, ViennaCLInt incy)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, size_type(n), size_type(offx), difference_type(incx), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-  viennacl::vector_base<float> v2(y, size_type(n), size_type(offy), difference_type(incy), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-
-  *alpha = viennacl::linalg::inner_prod(v1, v2);
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLOpenCLDdot(ViennaCLBackend backend, ViennaCLInt n,
-                                                             double *alpha,
-                                                             cl_mem x, ViennaCLInt offx, ViennaCLInt incx,
-                                                             cl_mem y, ViennaCLInt offy, ViennaCLInt incy)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, size_type(n), size_type(offx), difference_type(incx), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-  viennacl::vector_base<double> v2(y, size_type(n), size_type(offy), difference_type(incy), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-
-  *alpha = viennacl::linalg::inner_prod(v1, v2);
-  return ViennaCLSuccess;
-}
-
-
-// xNRM2
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLOpenCLSnrm2(ViennaCLBackend backend, ViennaCLInt n,
-                                                              float *alpha,
-                                                              cl_mem x, ViennaCLInt offx, ViennaCLInt incx)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, size_type(n), size_type(offx), difference_type(incx), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-
-  *alpha = viennacl::linalg::norm_2(v1);
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLOpenCLDnrm2(ViennaCLBackend backend, ViennaCLInt n,
-                                                              double *alpha,
-                                                              cl_mem x, ViennaCLInt offx, ViennaCLInt incx)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, size_type(n), size_type(offx), difference_type(incx), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-
-  *alpha = viennacl::linalg::norm_2(v1);
-  return ViennaCLSuccess;
-}
-
-
-// xROT
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLOpenCLSrot(ViennaCLBackend backend, ViennaCLInt n,
-                                                             cl_mem x, ViennaCLInt offx, ViennaCLInt incx,
-                                                             cl_mem y, ViennaCLInt offy, ViennaCLInt incy,
-                                                             float c, float s)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, size_type(n), size_type(offx), difference_type(incx), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-  viennacl::vector_base<float> v2(y, size_type(n), size_type(offy), difference_type(incy), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-
-  viennacl::linalg::plane_rotation(v1, v2, c, s);
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLOpenCLDrot(ViennaCLBackend backend, ViennaCLInt n,
-                                                             cl_mem x, ViennaCLInt offx, ViennaCLInt incx,
-                                                             cl_mem y, ViennaCLInt offy, ViennaCLInt incy,
-                                                             double c, double s)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, size_type(n), size_type(offx), difference_type(incx), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-  viennacl::vector_base<double> v2(y, size_type(n), size_type(offy), difference_type(incy), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-
-  viennacl::linalg::plane_rotation(v1, v2, c, s);
-  return ViennaCLSuccess;
-}
-
-
-
-// xSCAL
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLOpenCLSscal(ViennaCLBackend backend, ViennaCLInt n,
-                                                              float alpha,
-                                                              cl_mem x, ViennaCLInt offx, ViennaCLInt incx)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, size_type(n), size_type(offx), difference_type(incx), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-
-  v1 *= alpha;
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLOpenCLDscal(ViennaCLBackend backend, ViennaCLInt n,
-                                                              double alpha,
-                                                              cl_mem x, ViennaCLInt offx, ViennaCLInt incx)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, size_type(n), size_type(offx), difference_type(incx), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-
-  v1 *= alpha;
-  return ViennaCLSuccess;
-}
-
-// xSWAP
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLOpenCLSswap(ViennaCLBackend backend, ViennaCLInt n,
-                                                              cl_mem x, ViennaCLInt offx, ViennaCLInt incx,
-                                                              cl_mem y, ViennaCLInt offy, ViennaCLInt incy)
-{
-  typedef viennacl::vector_base<float>::size_type           size_type;
-  typedef viennacl::vector_base<float>::size_type           difference_type;
-  viennacl::vector_base<float> v1(x, size_type(n), size_type(offx), difference_type(incx), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-  viennacl::vector_base<float> v2(y, size_type(n), size_type(offy), difference_type(incy), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-
-  viennacl::swap(v1, v2);
-  return ViennaCLSuccess;
-}
-
-VIENNACL_EXPORTED_FUNCTION ViennaCLStatus ViennaCLOpenCLDswap(ViennaCLBackend backend, ViennaCLInt n,
-                                                              cl_mem x, ViennaCLInt offx, ViennaCLInt incx,
-                                                              cl_mem y, ViennaCLInt offy, ViennaCLInt incy)
-{
-  typedef viennacl::vector_base<double>::size_type           size_type;
-  typedef viennacl::vector_base<double>::size_type           difference_type;
-  viennacl::vector_base<double> v1(x, size_type(n), size_type(offx), difference_type(incx), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-  viennacl::vector_base<double> v2(y, size_type(n), size_type(offy), difference_type(incy), viennacl::ocl::get_context(backend->opencl_backend.context_id));
-
-  viennacl::swap(v1, v2);
-  return ViennaCLSuccess;
-}
-#endif


Mime
View raw message