#include "../include/lass.h"

/**
 *
 *  @file dsss_dgtsv.c
 *
 *  @brief LASs-DSSs ddss_dgtsv routine.
 *
 *  LASs-DSSs is a software package provided by:
 *  Barcelona Supercomputing Center - Centro Nacional de Supercomputacion
 *
 *  @author Pedro Valero-Lara pedro.valero@bsc.es
 *  @date 2017-01-02
 *  @reviewer 
 *  @modified 
 *
 **/

/**
 *  
 *  @ingroup DSSS
 *   
 *  Solves the system of equations, where A is an N-by-N tridiagonal matrix: 
 *
 *      A * X = RHS
 *
**/

/**
 *  
 *  @param[in]
 *  N       int.
 *          N specifies the size of the vectors (DL, D, DU), which composed the
 *			tridiagonal matrix A, and the size of the vector RHS.
 *          N must be greater than zero.
 *    
 *  @param[in]
 *  DL      double *.
 *          DL is a pointer to the lower vector of the tridiagonal matrix A.  
 *
 *  @param[in]
 *  D       double *.
 *          D is a pointer to the diagonal vector of the tridiagonal matrix A.  
 *
 *  @param[in]
 *  DU      double *.
 *          DU is a pointer to the upper vector of the tridiagonal matrix A.  
 *  
 *	@param[in,out]
 *  RHS     double *.
 *          RHS is a pointer to the right-hand side vector of the equation.
 *          On exit, RHS is overwritten by the vector solution X.  
 *   
**/  

/**
 *
 *  @retval Success successful exit
 *  @retval NoSuccess unsuccessful exit
 *
 **/

/**
 *
 *  @sa kdgtsv
 *
 **/

int dsss_dgtsv( int N, 
				 double *DL, double *D, double *DU, 
				 double *RHS )
{

	if ( N <= 0 )
	{
		fprintf( stderr, "Illegal value of N, in dsss_dgtsv code\n" );
        return NoSuccess;
	}

	return kdgtsv( N,
				   DL, D, DU,
				   RHS );

} 
