mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-05 07:41:11 +00:00
Added missing libsw library
This commit is contained in:
parent
dd5e51c09c
commit
9dff8cfb5a
57 changed files with 13454 additions and 0 deletions
66
external/libsdf/libsw/mpi_template.c
vendored
Normal file
66
external/libsdf/libsw/mpi_template.c
vendored
Normal file
|
@ -0,0 +1,66 @@
|
|||
|
||||
/* This is a template that is included multiple times in MPI_reduce.c */
|
||||
|
||||
switch(manifest->u.op) {
|
||||
#ifndef LOC_OPS
|
||||
case MPI_SUM:
|
||||
Do_Op(outbuf, +=, inbuf, Type, count);
|
||||
break;
|
||||
case MPI_PROD:
|
||||
Do_Op(outbuf, *=, inbuf, Type, count);
|
||||
break;
|
||||
case MPI_MAX:
|
||||
Do_Op(outbuf,
|
||||
= (*(Type *)outbuf > *(Type *)inbuf) ? *(Type *)outbuf :,
|
||||
inbuf, Type, count);
|
||||
break;
|
||||
case MPI_MIN:
|
||||
Do_Op(outbuf,
|
||||
= (*(Type *)outbuf < *(Type *)inbuf) ? *(Type *)outbuf :,
|
||||
inbuf, Type, count);
|
||||
break;
|
||||
#ifdef BIT_OPS
|
||||
case MPI_BAND:
|
||||
Do_Op(outbuf, &=, inbuf, Type, count);
|
||||
break;
|
||||
case MPI_BOR:
|
||||
Do_Op(outbuf, |=, inbuf, Type, count);
|
||||
break;
|
||||
case MPI_BXOR:
|
||||
Do_Op(outbuf, ^=, inbuf, Type, count);
|
||||
break;
|
||||
case MPI_LAND:
|
||||
Do_Op(outbuf, = *(Type *)outbuf && , inbuf, Type, count);
|
||||
break;
|
||||
case MPI_LOR:
|
||||
Do_Op(outbuf, = *(Type *)outbuf || , inbuf, Type, count);
|
||||
break;
|
||||
case MPI_LXOR: /* cripes */
|
||||
Do_Op(outbuf, = (!*(Type *)outbuf == !*(Type *)inbuf) ?
|
||||
0 : 1 ||, inbuf, Type, count);
|
||||
break;
|
||||
#endif /*BIT_OPS */
|
||||
#else /* LOC_OPS */
|
||||
case MPI_MAXLOC:
|
||||
Do_Op(outbuf, = (((Type *)outbuf)->x > ((Type *)inbuf)->x) ?
|
||||
*(Type *)outbuf :, inbuf, Type, count);
|
||||
break;
|
||||
case MPI_MINLOC:
|
||||
Do_Op(outbuf, = (((Type *)outbuf)->x < ((Type *)inbuf)->x) ?
|
||||
*(Type *)outbuf :, inbuf, Type, count);
|
||||
break;
|
||||
#endif /* LOC_OPS */
|
||||
default:
|
||||
Error("Unknown op in MPI_reduce\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue