PhasicFlow
v0.1
www.cemf.ir
VectorSingleAlgorithms.hpp
Go to the documentation of this file.
1
/*------------------------------- phasicFlow ---------------------------------
2
O C enter of
3
O O E ngineering and
4
O O M ultiscale modeling of
5
OOOOOOO F luid flow
6
------------------------------------------------------------------------------
7
Copyright (C): www.cemf.ir
8
email: hamid.r.norouzi AT gmail.com
9
------------------------------------------------------------------------------
10
Licence:
11
This file is part of phasicFlow code. It is a free software for simulating
12
granular and multiphase flows. You can redistribute it and/or modify it under
13
the terms of GNU General Public License v3 or any other later versions.
14
15
phasicFlow is distributed to help others in their research in the field of
16
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
17
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18
19
-----------------------------------------------------------------------------*/
20
21
22
#ifndef __VectorSingleMath_hpp__
23
#define __VectorSingleMath_hpp__
24
25
26
27
28
namespace
pFlow
29
{
30
31
template
<
typename
T,
typename
MemorySpace>
32
INLINE_FUNCTION_H
33
size_t
count
(
const
VectorSingle<T,MemorySpace>
& vec,
const
T& val)
34
{
35
return
count
( vec.
deviceVectorAll
(), 0, vec.
size
(), val);
36
}
37
38
template
<
class
T,
class
MemorySpace>
39
INLINE_FUNCTION_H
T
min
(
const
VectorSingle<T,MemorySpace>
& vec)
40
{
41
return
min
(
42
vec.
deviceVectorAll
(),
43
0, vec.
size
()
44
);
45
}
46
47
template
<
class
T,
class
MemorySpace>
48
INLINE_FUNCTION_H
T
max
(
const
VectorSingle<T, MemorySpace>
& vec)
49
{
50
return
min
(
51
vec.
deviceVectorAll
(),
52
0, vec.
size
()
53
);
54
}
55
56
57
58
}
59
60
61
#endif // __VectorSingleMath_hpp__
pFlow
Definition:
demComponent.hpp:28
INLINE_FUNCTION_H
#define INLINE_FUNCTION_H
Definition:
pFlowMacros.hpp:53
pFlow::count
auto count(const Vector< T, Allocator > &vec, const T &val)
Definition:
VectorAlgorithm.hpp:26
pFlow::VectorSingle
Definition:
VectorSingle.hpp:45
pFlow::max
T max(const Vector< T, Allocator > &v)
Definition:
VectorMath.hpp:164
pFlow::VectorSingle::size
INLINE_FUNCTION_H size_t size() const
Definition:
VectorSingle.hpp:360
pFlow::VectorSingle::deviceVectorAll
INLINE_FUNCTION_H viewType & deviceVectorAll()
Definition:
VectorSingle.hpp:295
pFlow::min
T min(const Vector< T, Allocator > &v)
Definition:
VectorMath.hpp:138
src
phasicFlow
containers
VectorHD
VectorSingleAlgorithms.hpp
Generated by
1.8.17