#!/bin/bash
#==================================================================================================
#
#  Run script for the operations module of the Blaze test suite
#
#  Copyright (C) 2012-2020 Klaus Iglberger - All Rights Reserved
#
#  This file is part of the Blaze library. You can redistribute it and/or modify it under
#  the terms of the New (Revised) BSD License. Redistribution and use in source and binary
#  forms, with or without modification, are permitted provided that the following conditions
#  are met:
#
#  1. Redistributions of source code must retain the above copyright notice, this list of
#     conditions and the following disclaimer.
#  2. Redistributions in binary form must reproduce the above copyright notice, this list
#     of conditions and the following disclaimer in the documentation and/or other materials
#     provided with the distribution.
#  3. Neither the names of the Blaze development group nor the names of its contributors
#     may be used to endorse or promote products derived from this software without specific
#     prior written permission.
#
#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
#  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
#  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
#  SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
#  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
#  TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
#  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
#  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
#  DAMAGE.
#
#==================================================================================================


PATH_OPERATIONS=$( dirname "${BASH_SOURCE[0]}" )


#==================================================================================================
# Dense vector/dense vector addition
#==================================================================================================

$PATH_OPERATIONS/dvecdvecadd/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/sparse vector addition
#==================================================================================================

$PATH_OPERATIONS/dvecsvecadd/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/dense vector addition
#==================================================================================================

$PATH_OPERATIONS/svecdvecadd/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/sparse vector addition
#==================================================================================================

$PATH_OPERATIONS/svecsvecadd/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/dense vector subtraction
#==================================================================================================

$PATH_OPERATIONS/dvecdvecsub/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/sparse vector subtraction
#==================================================================================================

$PATH_OPERATIONS/dvecsvecsub/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/dense vector subtraction
#==================================================================================================

$PATH_OPERATIONS/svecdvecsub/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/sparse vector subtraction
#==================================================================================================

$PATH_OPERATIONS/svecsvecsub/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/dense vector multiplication
#==================================================================================================

$PATH_OPERATIONS/dvecdvecmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/sparse vector multiplication
#==================================================================================================

$PATH_OPERATIONS/dvecsvecmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/dense vector multiplication
#==================================================================================================

$PATH_OPERATIONS/svecdvecmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/sparse vector multiplication
#==================================================================================================

$PATH_OPERATIONS/svecsvecmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/dense vector cross product
#==================================================================================================

$PATH_OPERATIONS/dvecdveccross/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/sparse vector cross product
#==================================================================================================

$PATH_OPERATIONS/dvecsveccross/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/dense vector cross product
#==================================================================================================

$PATH_OPERATIONS/svecdveccross/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/sparse vector cross product
#==================================================================================================

$PATH_OPERATIONS/svecsveccross/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/dense vector inner product
#==================================================================================================

$PATH_OPERATIONS/dvecdvecinner/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/sparse vector inner product
#==================================================================================================

$PATH_OPERATIONS/dvecsvecinner/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/dense vector inner product
#==================================================================================================

$PATH_OPERATIONS/svecdvecinner/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/sparse vector inner product
#==================================================================================================

$PATH_OPERATIONS/svecsvecinner/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/dense vector outer product
#==================================================================================================

$PATH_OPERATIONS/dvecdvecouter/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/sparse vector outer product
#==================================================================================================

$PATH_OPERATIONS/dvecsvecouter/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/dense vector outer product
#==================================================================================================

$PATH_OPERATIONS/svecdvecouter/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/sparse vector outer product
#==================================================================================================

$PATH_OPERATIONS/svecsvecouter/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/dense vector division
#==================================================================================================

$PATH_OPERATIONS/dvecdvecdiv/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/dense vector division
#==================================================================================================

$PATH_OPERATIONS/svecdvecdiv/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/dense vector minimum
#==================================================================================================

$PATH_OPERATIONS/dvecdvecmin/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/dense vector maximum
#==================================================================================================

$PATH_OPERATIONS/dvecdvecmax/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector reduction
#==================================================================================================

$PATH_OPERATIONS/dvecreduce/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector reduction
#==================================================================================================

$PATH_OPERATIONS/svecreduce/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector expansion
#==================================================================================================

$PATH_OPERATIONS/dvecexpand/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector expansion
#==================================================================================================

$PATH_OPERATIONS/svecexpand/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector repeat
#==================================================================================================

$PATH_OPERATIONS/dvecrepeat/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector repeat
#==================================================================================================

$PATH_OPERATIONS/svecrepeat/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense matrix/dense vector multiplication
#==================================================================================================

$PATH_OPERATIONS/dmatdvecmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense matrix/sparse vector multiplication
#==================================================================================================

$PATH_OPERATIONS/dmatsvecmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse matrix/dense vector multiplication
#==================================================================================================

$PATH_OPERATIONS/smatdvecmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse matrix/sparse vector multiplication
#==================================================================================================

$PATH_OPERATIONS/smatsvecmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/dense matrix multiplication
#==================================================================================================

$PATH_OPERATIONS/tdvecdmatmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/dense matrix multiplication
#==================================================================================================

$PATH_OPERATIONS/tsvecdmatmult/run;  if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/sparse matrix multiplication
#==================================================================================================

$PATH_OPERATIONS/tdvecsmatmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/sparse matrix multiplication
#==================================================================================================

$PATH_OPERATIONS/tsvecsmatmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense matrix/dense matrix addition
#==================================================================================================

$PATH_OPERATIONS/dmatdmatadd/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense matrix/sparse matrix addition
#==================================================================================================

$PATH_OPERATIONS/dmatsmatadd/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse matrix/dense matrix addition
#==================================================================================================

$PATH_OPERATIONS/smatdmatadd/run;  if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse matrix/sparse matrix addition
#==================================================================================================

$PATH_OPERATIONS/smatsmatadd/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense matrix/dense matrix subtraction
#==================================================================================================

$PATH_OPERATIONS/dmatdmatsub/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense matrix/sparse matrix subtraction
#==================================================================================================

$PATH_OPERATIONS/dmatsmatsub/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse matrix/dense matrix subtraction
#==================================================================================================

$PATH_OPERATIONS/smatdmatsub/run;  if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse matrix/sparse matrix subtraction
#==================================================================================================

$PATH_OPERATIONS/smatsmatsub/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense matrix/dense matrix Schur product
#==================================================================================================

$PATH_OPERATIONS/dmatdmatschur/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense matrix/sparse matrix Schur product
#==================================================================================================

$PATH_OPERATIONS/dmatsmatschur/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse matrix/dense matrix Schur product
#==================================================================================================

$PATH_OPERATIONS/smatdmatschur/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse matrix/sparse matrix Schur product
#==================================================================================================

$PATH_OPERATIONS/smatsmatschur/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense matrix/dense matrix multiplication
#==================================================================================================

$PATH_OPERATIONS/dmatdmatmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense matrix/sparse matrix multiplication
#==================================================================================================

$PATH_OPERATIONS/dmatsmatmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse matrix/dense matrix multiplication
#==================================================================================================

$PATH_OPERATIONS/smatdmatmult/run;  if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse matrix/sparse matrix multiplication
#==================================================================================================

$PATH_OPERATIONS/smatsmatmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense matrix/dense matrix minimum
#==================================================================================================

$PATH_OPERATIONS/dmatdmatmin/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense matrix/dense matrix maximum
#==================================================================================================

$PATH_OPERATIONS/dmatdmatmax/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense matrix reduction
#==================================================================================================

$PATH_OPERATIONS/dmatreduce/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse matrix reduction
#==================================================================================================

$PATH_OPERATIONS/smatreduce/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense matrix repeat
#==================================================================================================

$PATH_OPERATIONS/dmatrepeat/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse matrix repeat
#==================================================================================================

$PATH_OPERATIONS/smatrepeat/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Determinant
#==================================================================================================

$PATH_OPERATIONS/determinant/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# LU decomposition
#==================================================================================================

$PATH_OPERATIONS/lu/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# LLH decomposition
#==================================================================================================

$PATH_OPERATIONS/llh/run; if [ $? != 0 ]; then exit 1; fi

#==================================================================================================
# PLLHP decomposition
#==================================================================================================

$PATH_OPERATIONS/pllhp/run; if [ $? != 0 ]; then exit 1; fi

#==================================================================================================
# QR decomposition
#==================================================================================================

$PATH_OPERATIONS/qr/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# RQ decomposition
#==================================================================================================

$PATH_OPERATIONS/rq/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# QL decomposition
#==================================================================================================

$PATH_OPERATIONS/ql/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# LQ decomposition
#==================================================================================================

$PATH_OPERATIONS/lq/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Inversion
#==================================================================================================

$PATH_OPERATIONS/inversion/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Eigenvalues/eigenvectors
#==================================================================================================

$PATH_OPERATIONS/eigen/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Singular values/vectors
#==================================================================================================

$PATH_OPERATIONS/svd/run; if [ $? != 0 ]; then exit 1; fi
