File: blacs_free_.c

package info (click to toggle)
scalapack 2.0.2-7
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 36,300 kB
  • sloc: fortran: 338,514; ansic: 75,307; makefile: 1,385; sh: 56
file content (24 lines) | stat: -rw-r--r-- 505 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "Bdef.h"

#if (INTFACE == C_CALL)
void Cblacs_freebuff(int ConTxt, int Wait)
#else
F_VOID_FUNC blacs_freebuff_(int *ConTxt, int *Wait)
#endif
{
   void BI_UpdateBuffs(BLACBUFF *);
   int BI_BuffIsFree(BLACBUFF *, int);
   extern BLACBUFF *BI_ReadyB, *BI_ActiveQ;

   if (Mpval(Wait))  /* wait for all buffers to be done */
   {
      while (BI_ActiveQ != NULL) BI_UpdateBuffs(NULL);
   }
   else BI_UpdateBuffs(NULL);

   if (BI_ReadyB)
   {
      free(BI_ReadyB);
      BI_ReadyB = NULL;
   }
}