Skip to content

Commit 3f898b5

Browse files
authored
Merge pull request #41 from e-kwsm/ansi
refactor: replace obsolescent K&R syntax
2 parents ea5d206 + 490692f commit 3f898b5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+245
-1126
lines changed

BLACS/TESTING/Cbt.c

Lines changed: 69 additions & 613 deletions
Large diffs are not rendered by default.

PBLAS/SRC/PTOOLS/PB_Cctypeset.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "../PBblacs.h"
1717
#include "../PBblas.h"
1818

19-
PBTYP_T * PB_Cctypeset()
19+
PBTYP_T * PB_Cctypeset(void)
2020
{
2121
/*
2222
* Purpose

PBLAS/SRC/PTOOLS/PB_Cdtypeset.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "../PBblacs.h"
1717
#include "../PBblas.h"
1818

19-
PBTYP_T * PB_Cdtypeset()
19+
PBTYP_T * PB_Cdtypeset(void)
2020
{
2121
/*
2222
* Purpose

PBLAS/SRC/PTOOLS/PB_Citypeset.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "../PBblacs.h"
1717
#include "../PBblas.h"
1818

19-
PBTYP_T * PB_Citypeset()
19+
PBTYP_T * PB_Citypeset(void)
2020
{
2121
/*
2222
* Purpose

PBLAS/SRC/PTOOLS/PB_Cstypeset.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "../PBblacs.h"
1717
#include "../PBblas.h"
1818

19-
PBTYP_T * PB_Cstypeset()
19+
PBTYP_T * PB_Cstypeset(void)
2020
{
2121
/*
2222
* Purpose

PBLAS/SRC/PTOOLS/PB_Cztypeset.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "../PBblacs.h"
1717
#include "../PBblas.h"
1818

19-
PBTYP_T * PB_Cztypeset()
19+
PBTYP_T * PB_Cztypeset(void)
2020
{
2121
/*
2222
* Purpose

PBLAS/SRC/PTOOLS/PB_freebuf_.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "../PBblacs.h"
1717
#include "../PBblas.h"
1818

19-
void PB_freebuf_()
19+
void PB_freebuf_(void)
2020
{
2121
/*
2222
* Purpose

REDIST/SRC/pcgemr.c

Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -244,23 +244,16 @@ extern void Cpcgemr2d();
244244
#include <assert.h>
245245
#define DESCLEN 9
246246
void
247-
fortran_mr2d(m, n, A, ia, ja, desc_A,
248-
B, ib, jb, desc_B)
249-
Int *ia, *ib, *ja, *jb, *m, *n;
250-
Int desc_A[DESCLEN], desc_B[DESCLEN];
251-
complex *A, *B;
247+
fortran_mr2d(Int *m, Int *n, complex *A, Int *ia, Int *ja, Int desc_A[DESCLEN],
248+
complex *B, Int *ib, Int *jb, Int desc_B[DESCLEN])
252249
{
253250
Cpcgemr2do(*m, *n, A, *ia, *ja, (MDESC *) desc_A,
254251
B, *ib, *jb, (MDESC *) desc_B);
255252
return;
256253
}
257254
void
258-
fortran_mr2dnew(m, n, A, ia, ja, desc_A,
259-
B, ib, jb, desc_B, gcontext)
260-
Int *ia, *ib, *ja, *jb, *m, *n;
261-
Int desc_A[DESCLEN], desc_B[DESCLEN];
262-
complex *A, *B;
263-
Int *gcontext;
255+
fortran_mr2dnew(Int *m, Int *n, complex *A, Int *ia, Int *ja, Int desc_A[DESCLEN],
256+
complex *B, Int *ib, Int *jb, Int desc_B[DESCLEN], Int *gcontext)
264257
{
265258
Cpcgemr2d(*m, *n, A, *ia, *ja, (MDESC *) desc_A,
266259
B, *ib, *jb, (MDESC *) desc_B, *gcontext);
@@ -572,9 +565,7 @@ Cpcgemr2d(m, n,
572565
free(param);
573566
}/* distrib */
574567
static2 void
575-
init_chenille(mypnum, nprocs, n0, proc0, n1, proc1, psend, precv, myrang)
576-
Int nprocs, mypnum, n0, n1;
577-
Int *proc0, *proc1, **psend, **precv, *myrang;
568+
init_chenille(Int mypnum, Int nprocs, Int n0, Int *proc0, Int n1, Int *proc1, Int **psend, Int **precv, Int *myrang)
578569
{
579570
Int ns, nr, i, tot;
580571
Int *sender, *recver, *g0, *g1;
@@ -645,11 +636,7 @@ Int _m,_n,_lda,_ldb; \
645636
} \
646637
}
647638
static2 Int
648-
block2buff(vi, vinb, hi, hinb, ptra, ma, buff)
649-
Int hinb, vinb;
650-
IDESC *hi, *vi;
651-
MDESC *ma;
652-
complex *buff, *ptra;
639+
block2buff(IDESC *vi, Int vinb, IDESC *hi, Int hinb, complex *ptra, MDESC *ma, complex *buff)
653640
{
654641
Int h, v, sizebuff;
655642
complex *ptr2;
@@ -667,11 +654,7 @@ block2buff(vi, vinb, hi, hinb, ptra, ma, buff)
667654
return sizebuff;
668655
}
669656
static2 void
670-
buff2block(vi, vinb, hi, hinb, buff, ptrb, mb)
671-
Int hinb, vinb;
672-
IDESC *hi, *vi;
673-
MDESC *mb;
674-
complex *buff, *ptrb;
657+
buff2block(IDESC *vi, Int vinb, IDESC *hi, Int hinb, complex *buff, complex *ptrb, MDESC *mb)
675658
{
676659
Int h, v, sizebuff;
677660
complex *ptr2;
@@ -688,9 +671,7 @@ buff2block(vi, vinb, hi, hinb, buff, ptrb, mb)
688671
}
689672
}
690673
static2 Int
691-
inter_len(hinb, hi, vinb, vi)
692-
Int hinb, vinb;
693-
IDESC *hi, *vi;
674+
inter_len(Int hinb, IDESC *hi, Int vinb, IDESC *vi)
694675
{
695676
Int hlen, vlen, h, v;
696677
hlen = 0;
@@ -702,9 +683,7 @@ inter_len(hinb, hi, vinb, vi)
702683
return hlen * vlen;
703684
}
704685
void
705-
Clacpy(m, n, a, lda, b, ldb)
706-
complex *a, *b;
707-
Int m, n, lda, ldb;
686+
Clacpy(Int m, Int n, complex *a, Int lda, complex *b, Int ldb)
708687
{
709688
Int i, j;
710689
lda -= m;
@@ -718,8 +697,7 @@ Clacpy(m, n, a, lda, b, ldb)
718697
}
719698
}
720699
static2 void
721-
gridreshape(ctxtp)
722-
Int *ctxtp;
700+
gridreshape(Int *ctxtp)
723701
{
724702
Int ori, final; /* original context, and new context created, with
725703
* line form */

REDIST/SRC/pcgemr2.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,7 @@ extern void Cpcgemr2d();
113113
/************************************************************************/
114114
/* Set the memory space with the malloc function */
115115
void
116-
setmemory(adpointer, blocksize)
117-
complex **adpointer;
118-
Int blocksize;
116+
setmemory(complex **adpointer, Int blocksize)
119117
{
120118
assert(blocksize >= 0);
121119
if (blocksize == 0) {
@@ -128,8 +126,7 @@ setmemory(adpointer, blocksize)
128126
/******************************************************************/
129127
/* Free the memory space after the malloc */
130128
void
131-
freememory(ptrtobefreed)
132-
complex *ptrtobefreed;
129+
freememory(complex *ptrtobefreed)
133130
{
134131
if (ptrtobefreed == NULL)
135132
return;

REDIST/SRC/pctrmr.c

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -259,25 +259,16 @@ extern void Cpctrmr2d();
259259
#include <assert.h>
260260
#define DESCLEN 9
261261
void
262-
fortran_mr2d(uplo, diag, m, n, A, ia, ja, desc_A,
263-
B, ib, jb, desc_B)
264-
char *uplo, *diag;
265-
Int *ia, *ib, *ja, *jb, *m, *n;
266-
Int desc_A[DESCLEN], desc_B[DESCLEN];
267-
complex *A, *B;
262+
fortran_mr2d(char *uplo, char *diag, Int *m, Int *n, complex *A, Int *ia, Int *ja, Int desc_A[DESCLEN],
263+
complex *B, Int *ib, Int *jb, Int desc_B[DESCLEN])
268264
{
269265
Cpctrmr2do(uplo, diag, *m, *n, A, *ia, *ja, (MDESC *) desc_A,
270266
B, *ib, *jb, (MDESC *) desc_B);
271267
return;
272268
}
273269
void
274-
fortran_mr2dnew(uplo, diag, m, n, A, ia, ja, desc_A,
275-
B, ib, jb, desc_B, gcontext)
276-
char *uplo, *diag;
277-
Int *ia, *ib, *ja, *jb, *m, *n;
278-
Int desc_A[DESCLEN], desc_B[DESCLEN];
279-
complex *A, *B;
280-
Int *gcontext;
270+
fortran_mr2dnew(char *uplo, char *diag, Int *m, Int *n, complex *A, Int *ia, Int *ja, Int desc_A[DESCLEN],
271+
complex *B, Int *ib, Int *jb, Int desc_B[DESCLEN], Int *gcontext)
281272
{
282273
Cpctrmr2d(uplo, diag, *m, *n, A, *ia, *ja, (MDESC *) desc_A,
283274
B, *ib, *jb, (MDESC *) desc_B, *gcontext);
@@ -596,9 +587,7 @@ Cpctrmr2d(uplo, diag, m, n,
596587
free(param);
597588
}/* distrib */
598589
static2 void
599-
init_chenille(mypnum, nprocs, n0, proc0, n1, proc1, psend, precv, myrang)
600-
Int nprocs, mypnum, n0, n1;
601-
Int *proc0, *proc1, **psend, **precv, *myrang;
590+
init_chenille(Int mypnum, Int nprocs, Int n0, Int *proc0, Int n1, Int *proc1, Int **psend, Int **precv, Int *myrang)
602591
{
603592
Int ns, nr, i, tot;
604593
Int *sender, *recver, *g0, *g1;
@@ -652,9 +641,7 @@ init_chenille(mypnum, nprocs, n0, proc0, n1, proc1, psend, precv, myrang)
652641
}
653642
}
654643
void
655-
Clacpy(m, n, a, lda, b, ldb)
656-
complex *a, *b;
657-
Int m, n, lda, ldb;
644+
Clacpy(Int m, Int n, complex *a, Int lda, complex *b, Int ldb)
658645
{
659646
Int i, j;
660647
lda -= m;
@@ -668,8 +655,7 @@ Clacpy(m, n, a, lda, b, ldb)
668655
}
669656
}
670657
static2 void
671-
gridreshape(ctxtp)
672-
Int *ctxtp;
658+
gridreshape(Int *ctxtp)
673659
{
674660
Int ori, final; /* original context, and new context created, with
675661
* line form */

0 commit comments

Comments
 (0)