Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arbd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tbgl
tools
arbd
Commits
62fbcbde
Commit
62fbcbde
authored
5 years ago
by
cmaffeo2
Browse files
Options
Downloads
Patches
Plain Diff
Removed gsl from RigidBody::Boltzmann
parent
0b88c2a4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Makefile
+1
-1
1 addition, 1 deletion
src/Makefile
src/RandomGsl.h
+0
-76
0 additions, 76 deletions
src/RandomGsl.h
with
1 addition
and
77 deletions
src/Makefile
+
1
−
1
View file @
62fbcbde
...
...
@@ -64,7 +64,7 @@ $(foreach SM,$(SMS), $(eval NV_FLAGS += -gencode arch=compute_$(SM),code=sm_$(SM
$(
foreach
SM,
$(
SMPTXS
)
,
$(
eval
NV_FLAGS +
=
-gencode
arch
=
compute_
$(
SM
)
,code
=
compute_
$(
SM
))
)
NVLD_FLAGS
:=
$(
NV_FLAGS
)
--device-link
LD_FLAGS
=
-L
$(
LIBRARY
)
-lgsl
-lcurand
-lcudart
-lcudadevrt
-Wl
,-rpath,
$(
LIBRARY
)
LD_FLAGS
=
-L
$(
LIBRARY
)
-lcurand
-lcudart
-lcudadevrt
-Wl
,-rpath,
$(
LIBRARY
)
### Sources
CC_SRC
:=
$(
wildcard
*
.cpp
)
...
...
This diff is collapsed.
Click to expand it.
src/RandomGsl.h
deleted
100644 → 0
+
0
−
76
View file @
0b88c2a4
/////////////////////////////////////////////////////////////////////////
// Author: Jeff Comer <jcomer2@illinois.edu>
#ifndef RANDOMGSL_H
#define RANDOMGSL_H
#include
<gsl/gsl_rng.h>
#include
<gsl/gsl_randist.h>
#include
"useful.h"
class
Random
{
private:
gsl_rng
*
gslRando
;
public:
// default constructor
Random
()
{
init
(
0
);
}
// constructor with seed
Random
(
unsigned
long
seed
)
{
init
(
seed
);
}
~
Random
()
{
gsl_rng_free
(
gslRando
);
}
// reinitialize with seed
void
init
(
unsigned
long
seed
)
{
gslRando
=
gsl_rng_alloc
(
gsl_rng_mt19937
);
gsl_rng_set
(
gslRando
,
seed
);
}
// return a number uniformly distributed between 0 and 1
float
uniform
()
{
return
gsl_rng_uniform
(
gslRando
);
}
long
poisson
(
float
lambda
)
{
return
gsl_ran_poisson
(
gslRando
,
lambda
);
}
// return a number from a standard gaussian distribution
float
gaussian
()
{
return
gsl_ran_ugaussian
(
gslRando
);
}
// return a vector of gaussian random numbers
Vector3
gaussian_vector
()
{
return
Vector3
(
gaussian
(),
gaussian
(),
gaussian
()
);
}
// return a random long
long
integer
()
{
return
gsl_rng_get
(
gslRando
);
}
// randomly order an array of whatever
template
<
class
Elem
>
void
reorder
(
Elem
*
a
,
int
n
)
{
for
(
int
i
=
0
;
i
<
(
n
-
1
);
i
++
)
{
int
ie
=
i
+
(
integer
()
%
(
n
-
i
));
if
(
ie
==
i
)
continue
;
// Swap.
const
Elem
e
=
a
[
ie
];
a
[
ie
]
=
a
[
i
];
a
[
i
]
=
e
;
}
}
};
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment