/* Copyright 2008 BORDEAUX I UNIVERSITY & INRIA 
**
** This file is part of the PaStiX parallel sparse matrix package.
**
** This software is governed by the CeCILL-C license under French law
** and abiding by the rules of distribution of free software. You can
** use, modify and/or redistribute the software under the terms of the
** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following
** URL: "http://www.cecill.info".
** 
** As a counterpart to the access to the source code and rights to copy,
** modify and redistribute granted by the license, users are provided
** only with a limited warranty and the software's author, the holder of
** the economic rights, and the successive licensors have only limited
** liability.
** 
** In this respect, the user's attention is drawn to the risks associated
** with loading, using, modifying and/or developing or reproducing the
** software by the user in light of its specific status of free software,
** that may mean that it is complicated to manipulate, and that also
** therefore means that it is reserved for developers and experienced
** professionals having in-depth computer knowledge. Users are therefore
** encouraged to load and test the software's suitability as regards
** their requirements in conditions enabling the security of their
** systems and/or data to be ensured and, more generally, to use and
** operate it in the same conditions as regards security.
** 
** The fact that you are presently reading this means that you have had
** knowledge of the CeCILL-C license and that you accept its terms.
*/
#ifndef CORE_ZGEADD_H
#define CORE_ZGEADD_H
#ifdef FORCE_NOMPI
#  include "nompi.h"
#else
#  include <mpi.h>
#endif
#ifdef STARPU_USE_DEPRECATED_API
#  undef STARPU_USE_DEPRECATED_API
#endif
#ifdef STARPU_USE_DEPRECATED_ONE_ZERO_API
#  undef STARPU_USE_DEPRECATED_ONE_ZERO_API
#endif
#include <starpu.h>
#include "common_pastix.h"
#ifndef FORCE_NOMPI
#  include <starpu_mpi.h>
#endif
#include <starpu_profiling.h>

#include "sopalin_define.h"
#include "sopalin_acces.h"
#include "symbol.h"
#include "ftgt.h"
#include "csc.h"
#include "updown.h"
#include "queue.h"
#include "bulles.h"
#include "solver.h"

#define pastix_complex64_t PASTIX_FLOAT
#define z_SolverCblk SolverCblk
#define core_zgeadd                 PASTIX_PREFIX_F(core_geadd)
#define core_zgeaddsp1d             PASTIX_PREFIX_F(core_geaddsp1d)
#define starpu_zgetrfsp1d_geadd_cpu PASTIX_PREFIX_F(starpu_getrfsp1d_geadd_cpu)
#define starpu_zsytrfsp1d_syadd_cpu PASTIX_PREFIX_F(starpu_sytrfsp1d_syadd_cpu)
#define CblasNoTrans 'N'
#define CblasTrans 'T'

int core_zgeadd(int trans, int M, int N, pastix_complex64_t alpha,
                const pastix_complex64_t *A, int LDA,
                      pastix_complex64_t *B, int LDB);
int core_zgeaddsp1d( SolverMatrix * datacode,
                     z_SolverCblk * cblk1,
                     z_SolverCblk * cblk2,
                     pastix_complex64_t * L1,
                     pastix_complex64_t * L2,
                     pastix_complex64_t * U1,
                     pastix_complex64_t * U2 );
void
starpu_zgetrfsp1d_geadd_cpu( void * buffers[],
                             void * _args );
void
starpu_zsytrfsp1d_syadd_cpu( void * buffers[],
                             void * _args );

#endif CORE_ZGEADD_H
