Main Page
Modules
Namespaces
Classes
Files
File List
File Members
include
armadillo_bits
podarray_bones.hpp
Go to the documentation of this file.
1
// Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
2
// Copyright (C) 2008-2010 Conrad Sanderson
3
//
4
// This file is part of the Armadillo C++ library.
5
// It is provided without any warranty of fitness
6
// for any purpose. You can redistribute this file
7
// and/or modify it under the terms of the GNU
8
// Lesser General Public License (LGPL) as published
9
// by the Free Software Foundation, either version 3
10
// of the License or (at your option) any later version.
11
// (see http://www.opensource.org/licenses for more info)
12
13
16
17
18
19
struct
podarray_prealloc_n_elem
20
{
21
static
const
uword
val
= 16;
22
};
23
24
25
27
28
template
<
typename
eT>
29
class
podarray
30
{
31
public
:
32
33
arma_aligned
const
uword
n_elem
;
34
arma_aligned
const
eT*
const
mem
;
35
36
37
protected
:
39
arma_aligned
eT mem_local[
podarray_prealloc_n_elem::val
];
40
41
42
public
:
43
44
inline
~
podarray
();
45
inline
podarray
();
46
47
inline
podarray
(
const
podarray
& x);
48
inline
const
podarray
& operator=(
const
podarray
& x);
49
50
arma_inline
explicit
podarray
(
const
uword
new_N);
51
52
arma_inline
explicit
podarray
(
const
eT* X,
const
uword
new_N);
53
54
arma_inline
eT& operator[] (
const
uword
i);
55
arma_inline
eT operator[] (
const
uword
i)
const
;
56
57
arma_inline
eT& operator() (
const
uword
i);
58
arma_inline
eT operator() (
const
uword
i)
const
;
59
60
inline
void
set_size(
const
uword
new_n_elem);
61
inline
void
reset();
62
63
inline
void
fill(
const
eT
val
);
64
65
inline
void
zeros
();
66
inline
void
zeros
(
const
uword
new_n_elem);
67
68
arma_inline
eT* memptr();
69
arma_inline
const
eT* memptr()
const
;
70
71
arma_hot
inline
void
copy_row(
const
Mat<eT>
& A,
const
uword
row);
72
73
protected
:
74
75
inline
void
init(
const
uword
new_n_elem);
76
77
};
78
79
80
podarray::n_elem
arma_aligned const uword n_elem
number of elements held
Definition:
podarray_bones.hpp:33
podarray
A lightweight array for POD types. If the amount of memory requested is small, the stack is used...
Definition:
podarray_bones.hpp:29
podarray_prealloc_n_elem::val
static const uword val
Definition:
podarray_bones.hpp:21
uword
u32 uword
Definition:
typedef.hpp:85
podarray_prealloc_n_elem
Definition:
podarray_bones.hpp:19
arma_aligned
#define arma_aligned
Definition:
compiler_setup.hpp:20
Mat
Dense matrix class.
Definition:
forward_bones.hpp:19
arma_inline
#define arma_inline
Definition:
compiler_setup.hpp:19
zeros
arma_inline const Gen< vec::elem_type, gen_zeros > zeros(const uword n_elem)
Generate a vector with all elements set to zero.
Definition:
fn_zeros.hpp:21
podarray::mem
arma_aligned const eT *const mem
pointer to memory used by the object
Definition:
podarray_bones.hpp:34
arma_hot
#define arma_hot
Definition:
compiler_setup.hpp:15
armadillo_matrix
Author(s):
autogenerated on Fri Apr 16 2021 02:31:58