mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [
git repo
]
Loading...
Searching...
No Matches
templateCurand.hpp
Go to the documentation of this file.
1
/** \file templateCurand.hpp
2
* \author Jared R. Males
3
* \brief A template interface to curand
4
* \ingroup cuda_files
5
*
6
*/
7
8
//***********************************************************************//
9
// Copyright 2019,2020 Jared R. Males (jaredmales@gmail.com)
10
//
11
// This file is part of mxlib.
12
//
13
// mxlib is free software: you can redistribute it and/or modify
14
// it under the terms of the GNU General Public License as published by
15
// the Free Software Foundation, either version 3 of the License, or
16
// (at your option) any later version.
17
//
18
// mxlib is distributed in the hope that it will be useful,
19
// but WITHOUT ANY WARRANTY; without even the implied warranty of
20
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
// GNU General Public License for more details.
22
//
23
// You should have received a copy of the GNU General Public License
24
// along with mxlib. If not, see <http://www.gnu.org/licenses/>.
25
//***********************************************************************//
26
27
#ifndef math_templateCurand_hpp
28
#define math_templateCurand_hpp
29
30
#include <cuda_runtime.h>
31
#include <curand.h>
32
33
namespace
mx
34
{
35
namespace
cuda
36
{
37
38
template
<
typename
realT>
39
curandStatus_t
40
curandGenerateNormal( curandGenerator_t generator, realT *outputPtr,
size_t
n, realT mean, realT stddev );
41
42
template
<>
43
curandStatus_t
44
curandGenerateNormal<float>( curandGenerator_t generator,
float
*outputPtr,
size_t
n,
float
mean,
float
stddev );
45
46
template
<>
47
curandStatus_t
48
curandGenerateNormal<double>( curandGenerator_t generator,
double
*outputPtr,
size_t
n,
double
mean,
double
stddev );
49
50
}
// namespace cuda
51
}
// namespace mx
52
53
#endif
// math_templateCurand_hpp
mx
The mxlib c++ namespace.
Definition
mxError.hpp:106
math
cuda
templateCurand.hpp
Generated on Wed Mar 5 2025 10:09:16 for mxlib by
1.9.8