Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fdt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
fdt
Commits
a5e7f009
Commit
a5e7f009
authored
12 years ago
by
Moises Fernandez
Browse files
Options
Downloads
Patches
Plain Diff
changed the pow(x,2) function with x*x
parent
d4a9f9f7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CUDA/diffmodels_utils.h
+5
-2
5 additions, 2 deletions
CUDA/diffmodels_utils.h
with
5 additions
and
2 deletions
CUDA/diffmodels_utils.h
+
5
−
2
View file @
a5e7f009
...
...
@@ -22,7 +22,11 @@
#define d2lambda_gpu(d) (sqrt(double(d)))
//defined in diffmodels.h
#define beta2f_gpu(beta) (pow(sin(double(beta)),2.0))
//#define beta2f_gpu(beta) (pow(sin(double(beta)),2.0))
__device__
inline
double
beta2f_gpu
(
double
beta
){
double
sinbeta
=
sin
(
beta
);
return
sinbeta
*
sinbeta
;
}
//defined in diffmodels.h
#define lambda2d_gpu(lambda) (lambda*lambda)
...
...
@@ -37,7 +41,6 @@ __device__ inline double x2f_gpu(double x){
return
abs
(
two_pi
*
atan
(
x
));
}
//defined in miscmaths.h
__device__
inline
int
sign_gpu
(
int
x
){
if
(
x
>
0
)
return
1
;
else
{
if
(
x
<
0
)
return
-
1
;
else
return
0
;
}
}
__device__
inline
int
sign_gpu
(
float
x
){
if
(
x
>
0
)
return
1
;
else
{
if
(
x
<
0
)
return
-
1
;
else
return
0
;
}
}
...
...
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