psblas3-cbind:

cbind/base/Makefile
 cbind/base/psb_c_ccomm.c
 cbind/base/psb_c_ccomm.h
 cbind/base/psb_c_dcomm.c
 cbind/base/psb_c_scomm.c
 cbind/base/psb_c_scomm.h
 cbind/base/psb_c_zcomm.c
 cbind/base/psb_c_zcomm.h

COMM routines, C side.
psblas3-mcbind
Salvatore Filippone 8 years ago
parent 184141dd1c
commit 39c90a8362

@ -18,9 +18,9 @@ FOBJS= psb_objhandle_mod.o psb_base_cbind_mod.o psb_cpenv_mod.o \
psb_c_comm_cbind_mod.o psb_z_comm_cbind_mod.o
COBJS= psb_c_base.o psb_c_sbase.o psb_c_dbase.o psb_c_cbase.o psb_c_zbase.o \
psb_c_dcomm.o
psb_c_scomm.o psb_c_dcomm.o psb_c_ccomm.o psb_c_zcomm.o
CMOD=psb_base_cbind.h psb_c_base.h psb_c_sbase.h psb_c_dbase.h psb_c_cbase.h psb_c_zbase.h \
psb_c_dcomm.h
psb_c_scomm.h psb_c_dcomm.h psb_c_ccomm.h psb_c_zcomm.h
OBJS=$(FOBJS) $(COBJS)
LIBMOD=psb_base_cbind_mod$(.mod) psb_cpenv_mod$(.mod) psb_objhandle_mod$(.mod)\

@ -0,0 +1,34 @@
#include <stdlib.h>
#include "psb_c_ccomm.h"
#include "psb_c_cbase.h"
psb_c_t* psb_c_cvgather(psb_c_cvector *xh, psb_c_descriptor *cdh)
{
psb_c_t *temp=NULL;
psb_i_t vsize=0;
if ((vsize=psb_c_cd_get_global_rows(cdh))<0)
return(temp);
if (vsize==0)
vsize=1;
if ((temp=(psb_c_t *)malloc(vsize*sizeof(psb_c_t)))!=NULL)
psb_c_cvgather_f(temp,xh,cdh);
return(temp);
}
psb_c_cspmat* psb_c_cspgather(psb_c_cspmat *ah, psb_c_descriptor *cdh)
{
psb_c_cspmat* temp=psb_c_new_cspmat();
if (temp != NULL)
psb_c_cspgather_f(temp, ah, cdh);
return(temp);
}

@ -0,0 +1,28 @@
#ifndef PSB_C_CCOMM_
#define PSB_C_CCOMM_
#include "psb_c_cbase.h"
#ifdef __cplusplus
extern "C" {
#endif
psb_i_t psb_c_chalo(psb_c_cvector *xh, psb_c_descriptor *cdh);
psb_i_t psb_c_chalo_opt(psb_c_cvector *xh, psb_c_descriptor *cdh,
char *trans, psb_i_t mode);
psb_i_t psb_c_covrl(psb_c_cvector *xh, psb_c_descriptor *cdh);
psb_i_t psb_c_covrl_opt(psb_c_cvector *xh, psb_c_descriptor *cdh,
psb_i_t update, psb_i_t mode);
psb_i_t psb_c_cvscatter(psb_i_t ng, psb_c_t *gx, psb_c_cvector *xh, psb_c_descriptor *cdh);
psb_c_t* psb_c_cvgather(psb_c_cvector *xh, psb_c_descriptor *cdh);
psb_c_cspmat* psb_c_cspgather(psb_c_cspmat *ah, psb_c_descriptor *cdh);
psb_i_t psb_c_cvgather_f(psb_c_t* gv, psb_c_cvector *xh, psb_c_descriptor *cdh);
psb_i_t psb_c_cspgather_f(psb_c_cspmat* ga, psb_c_cspmat *ah, psb_c_descriptor *cdh);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif

@ -1,7 +1,5 @@
#include <stdlib.h>
#include "psb_c_dcomm.h"
#include <stdlib.h>
#include "psb_c_dbase.h"

@ -0,0 +1,34 @@
#include <stdlib.h>
#include "psb_c_scomm.h"
#include "psb_c_sbase.h"
psb_s_t* psb_c_svgather(psb_c_svector *xh, psb_c_descriptor *cdh)
{
psb_s_t *temp=NULL;
psb_i_t vsize=0;
if ((vsize=psb_c_cd_get_global_rows(cdh))<0)
return(temp);
if (vsize==0)
vsize=1;
if ((temp=(psb_s_t *)malloc(vsize*sizeof(psb_s_t)))!=NULL)
psb_c_svgather_f(temp,xh,cdh);
return(temp);
}
psb_c_sspmat* psb_c_sspgather(psb_c_sspmat *ah, psb_c_descriptor *cdh)
{
psb_c_sspmat* temp=psb_c_new_sspmat();
if (temp != NULL)
psb_c_sspgather_f(temp, ah, cdh);
return(temp);
}

@ -0,0 +1,28 @@
#ifndef PSB_C_SCOMM_
#define PSB_C_SCOMM_
#include "psb_c_sbase.h"
#ifdef __cplusplus
extern "C" {
#endif
psb_i_t psb_c_shalo(psb_c_svector *xh, psb_c_descriptor *cdh);
psb_i_t psb_c_shalo_opt(psb_c_svector *xh, psb_c_descriptor *cdh,
char *trans, psb_i_t mode);
psb_i_t psb_c_sovrl(psb_c_svector *xh, psb_c_descriptor *cdh);
psb_i_t psb_c_sovrl_opt(psb_c_svector *xh, psb_c_descriptor *cdh,
psb_i_t update, psb_i_t mode);
psb_i_t psb_c_svscatter(psb_i_t ng, psb_s_t *gx, psb_c_svector *xh, psb_c_descriptor *cdh);
psb_s_t* psb_c_svgather(psb_c_svector *xh, psb_c_descriptor *cdh);
psb_c_sspmat* psb_c_sspgather(psb_c_sspmat *ah, psb_c_descriptor *cdh);
psb_i_t psb_c_svgather_f(psb_s_t* gv, psb_c_svector *xh, psb_c_descriptor *cdh);
psb_i_t psb_c_sspgather_f(psb_c_sspmat* ga, psb_c_sspmat *ah, psb_c_descriptor *cdh);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif

@ -0,0 +1,34 @@
#include <stdlib.h>
#include "psb_c_zcomm.h"
#include "psb_c_zbase.h"
psb_z_t* psb_c_zvgather(psb_c_zvector *xh, psb_c_descriptor *cdh)
{
psb_z_t *temp=NULL;
psb_i_t vsize=0;
if ((vsize=psb_c_cd_get_global_rows(cdh))<0)
return(temp);
if (vsize==0)
vsize=1;
if ((temp=(psb_z_t *)malloc(vsize*sizeof(psb_z_t)))!=NULL)
psb_c_zvgather_f(temp,xh,cdh);
return(temp);
}
psb_c_zspmat* psb_c_zspgather(psb_c_zspmat *ah, psb_c_descriptor *cdh)
{
psb_c_zspmat* temp=psb_c_new_zspmat();
if (temp != NULL)
psb_c_zspgather_f(temp, ah, cdh);
return(temp);
}

@ -0,0 +1,28 @@
#ifndef PSB_C_ZCOMM_
#define PSB_C_ZCOMM_
#include "psb_c_zbase.h"
#ifdef __cplusplus
extern "C" {
#endif
psb_i_t psb_c_zhalo(psb_c_zvector *xh, psb_c_descriptor *cdh);
psb_i_t psb_c_zhalo_opt(psb_c_zvector *xh, psb_c_descriptor *cdh,
char *trans, psb_i_t mode);
psb_i_t psb_c_zovrl(psb_c_zvector *xh, psb_c_descriptor *cdh);
psb_i_t psb_c_zovrl_opt(psb_c_zvector *xh, psb_c_descriptor *cdh,
psb_i_t update, psb_i_t mode);
psb_i_t psb_c_zvscatter(psb_i_t ng, psb_z_t *gx, psb_c_zvector *xh, psb_c_descriptor *cdh);
psb_z_t* psb_c_zvgather(psb_c_zvector *xh, psb_c_descriptor *cdh);
psb_c_zspmat* psb_c_zspgather(psb_c_zspmat *ah, psb_c_descriptor *cdh);
psb_i_t psb_c_zvgather_f(psb_z_t* gv, psb_c_zvector *xh, psb_c_descriptor *cdh);
psb_i_t psb_c_zspgather_f(psb_c_zspmat* ga, psb_c_zspmat *ah, psb_c_descriptor *cdh);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
Loading…
Cancel
Save