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
5b80d11f
Commit
5b80d11f
authored
6 months ago
by
cmaffeo2
Browse files
Options
Downloads
Patches
Plain Diff
Use ::cuda::std:numeric_limits in device Vector3 code
parent
ba457586
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
src/Types/Vector3.h
+11
-2
11 additions, 2 deletions
src/Types/Vector3.h
with
11 additions
and
2 deletions
src/Types/Vector3.h
+
11
−
2
View file @
5b80d11f
...
...
@@ -9,6 +9,15 @@
#include
<type_traits>
// for std::common_type<T,U>
#include
<sstream>
#ifdef __CUDA_ARCH__
#include
<cuda/std/limits>
template
<
typename
T
>
using
numeric_limits
=
::
cuda
::
std
::
numeric_limits
<
T
>
;
#else
template
<
typename
T
>
using
numeric_limits
=
::
std
::
numeric_limits
<
T
>
;
#endif
/**
* 3D vector utility class with common operations implemented on CPU and GPU.
*
...
...
@@ -217,8 +226,8 @@ public:
}
// Numeric limits
HOST
DEVICE
static
inline
T
highest
()
{
return
std
::
numeric_limits
<
T
>::
max
();
}
HOST
DEVICE
static
inline
T
lowest
()
{
return
std
::
numeric_limits
<
T
>::
lowest
();
}
HOST
DEVICE
static
inline
T
highest
()
{
return
numeric_limits
<
T
>::
max
();
}
HOST
DEVICE
static
inline
T
lowest
()
{
return
numeric_limits
<
T
>::
lowest
();
}
// String
HOST
DEVICE
inline
void
print
()
const
{
...
...
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