Navigation

Operators and Keywords

Function List:

C++ API

oct-locbuf.h File Reference

#include <cstddef>
#include "oct-cmplx.h"

Include dependency graph for oct-locbuf.h:

Go to the source code of this file.


Classes

class  octave_local_buffer< T >
class  octave_chunk_buffer
class  octave_local_buffer< T * >
class  octave_local_buffer< const T * >

Defines

#define octave_local_buffer_h   1
#define SPECIALIZE_POD_BUFFER(TYPE)
#define OCTAVE_LOCAL_BUFFER(T, buf, size)
#define OCTAVE_LOCAL_BUFFER_INIT(T, buf, size, value)

Functions

 SPECIALIZE_POD_BUFFER (bool)
 SPECIALIZE_POD_BUFFER (char)
 SPECIALIZE_POD_BUFFER (unsigned short)
 SPECIALIZE_POD_BUFFER (short)
 SPECIALIZE_POD_BUFFER (long)
 SPECIALIZE_POD_BUFFER (float)
 SPECIALIZE_POD_BUFFER (double)
 SPECIALIZE_POD_BUFFER (Complex)
 SPECIALIZE_POD_BUFFER (FloatComplex)

Define Documentation

#define OCTAVE_LOCAL_BUFFER ( T,
buf,
size   ) 

Value:

octave_local_buffer<T> _buffer_ ## buf (size); \
  T *buf = _buffer_ ## buf

#define octave_local_buffer_h   1

#define OCTAVE_LOCAL_BUFFER_INIT ( T,
buf,
size,
value   ) 

Value:

OCTAVE_LOCAL_BUFFER(T, buf, size); \
  for (size_t _buf_iter = 0, _buf_size = size; \
       _buf_iter < _buf_size; _buf_iter++) buf[_buf_iter] = value

#define SPECIALIZE_POD_BUFFER ( TYPE   ) 

Value:

template <> \
class octave_local_buffer<TYPE> : private octave_chunk_buffer \
{ \
public: \
  octave_local_buffer (size_t size) : octave_chunk_buffer (size * sizeof (TYPE)) { } \
  operator TYPE *() const { return reinterpret_cast<TYPE *> (this->data ()); } \
}


Function Documentation

SPECIALIZE_POD_BUFFER ( FloatComplex   ) 

SPECIALIZE_POD_BUFFER ( Complex   ) 

SPECIALIZE_POD_BUFFER ( double   ) 

SPECIALIZE_POD_BUFFER ( float   ) 

SPECIALIZE_POD_BUFFER ( long   ) 

SPECIALIZE_POD_BUFFER ( short   ) 

SPECIALIZE_POD_BUFFER ( unsigned  short  ) 

SPECIALIZE_POD_BUFFER ( char   ) 

SPECIALIZE_POD_BUFFER ( bool   )