Block-Structured AMR Software Framework
AMReX_VisMFBuffer.H
Go to the documentation of this file.
1 #ifndef AMREX_VISMF_BUFFER_H_
2 #define AMREX_VISMF_BUFFER_H_
3 #include <AMReX_Config.H>
4 
5 #include <AMReX_BLassert.H>
6 #include <AMReX_Extension.H>
7 #include <AMReX_INT.H>
8 #include <AMReX_Vector.H>
9 
10 namespace amrex {
11 
13 {
14 public:
16  enum { IO_Buffer_Size = 262144 * 8 };
18 #ifdef BL_SETBUF_SIGNED_CHAR
19  using Setbuf_Char_Type = signed char;
20 #else
21  using Setbuf_Char_Type = char;
22 #endif
25 
26  static Long GetIOBufferSize () { return ioBufferSize; }
27  static void SetIOBufferSize (Long iobuffersize) {
28  BL_ASSERT(iobuffersize > 0);
29  ioBufferSize = iobuffersize;
30  }
31 
32  static void ClearBuffer (IO_Buffer& buf) {
33  IO_Buffer().swap(buf);
34  }
35 
36 protected:
37 
38  static AMREX_EXPORT Long ioBufferSize;
39 };
40 
41 }
42 
43 #endif
#define BL_ASSERT(EX)
Definition: AMReX_BLassert.H:39
#define AMREX_EXPORT
Definition: AMReX_Extension.H:191
Definition: AMReX_VisMFBuffer.H:13
static Long GetIOBufferSize()
Definition: AMReX_VisMFBuffer.H:26
Vector< Setbuf_Char_Type > IO_Buffer
A simple character buffer for setbuf() usage.
Definition: AMReX_VisMFBuffer.H:24
char Setbuf_Char_Type
The type of a char buffer required by [p]setbuf().
Definition: AMReX_VisMFBuffer.H:21
static void SetIOBufferSize(Long iobuffersize)
Definition: AMReX_VisMFBuffer.H:27
static void ClearBuffer(IO_Buffer &buf)
Definition: AMReX_VisMFBuffer.H:32
@ IO_Buffer_Size
Definition: AMReX_VisMFBuffer.H:16
static AMREX_EXPORT Long ioBufferSize
-— the settable buffer size
Definition: AMReX_VisMFBuffer.H:38
Definition: AMReX_Amr.cpp:49