Toast++
1.0.2 (r.539)
Forward and inverse modelling in optical tomography
Main Page
Related Pages
Modules
Classes
Files
File List
libmath
vector_cusp.h
1
// -*-C++-*-
2
// ==========================================================================
3
// Module mathlib
4
// File vector_cusp.h
5
// Declaration of template class cuspTVector ('CUSP template vector')
6
// ==========================================================================
7
8
#ifndef __VECTOR_CUSP_H
9
#define __VECTOR_CUSP_H
10
11
#include "vector.h"
12
#include <thrust/extrema.h>
13
#include <cusp/csr_matrix.h>
14
15
// ==========================================================================
16
// Nonmember declarations
17
18
template
<
class
VT>
class
cuspTVector
;
19
20
// ==========================================================================
21
// class cuspTVector
22
23
template
<
class
VT>
class
cuspTVector
:
public
TVector
<VT> {
24
public
:
25
cuspTVector
();
26
27
cuspTVector
(
int
dim, VT *values);
28
29
// Copy from vector in host memory
30
void
Set (
const
TVector<VT>
&v);
31
32
// Return vector in host memory format
33
TVector<VT>
&Get ();
34
35
cuspTVector<VT>
&operator= (
const
cuspTVector<VT>
&v);
36
37
protected
:
38
void
MapHostToDev ();
39
void
MapDevToHost ();
40
cusp::array1d<VT,cusp::device_memory> dv;
41
};
42
43
#endif // !__VECTOR_CUSP_H
TVector
Templated vector class.
Definition:
vector.h:39
cuspTVector
Definition:
vector_cusp.h:18
Generated on Tue Sep 2 2014 17:14:26 for Toast++ by
1.8.6