Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
72315e7b
Commit
72315e7b
authored
Dec 04, 2019
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16045 from YashasSamaga:cuda4dnn-hotfix-log1p-expm1
parents
1633c29f
fbb3f64a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
math.hpp
modules/dnn/src/cuda/math.hpp
+4
-4
No files found.
modules/dnn/src/cuda/math.hpp
View file @
72315e7b
...
...
@@ -26,8 +26,8 @@ namespace cv { namespace dnn { namespace cuda4dnn { namespace csl { namespace de
template
<>
inline
__device__
double
exp
(
double
val
)
{
return
::
exp
(
val
);
}
template
<
class
T
>
__device__
T
expm1
(
T
val
);
template
<>
inline
__device__
__half
expm1
(
__half
val
)
{
return
hexp
(
val
)
+
__half
(
1
);
}
template
<>
inline
__device__
__half2
expm1
(
__half2
val
)
{
return
h2exp
(
val
)
+
__half2
(
1
,
1
);
}
template
<>
inline
__device__
__half
expm1
(
__half
val
)
{
return
hexp
(
val
)
-
__half
(
1
);
}
template
<>
inline
__device__
__half2
expm1
(
__half2
val
)
{
return
h2exp
(
val
)
-
__half2
(
1
,
1
);
}
template
<>
inline
__device__
float
expm1
(
float
val
)
{
return
expm1f
(
val
);
}
template
<>
inline
__device__
double
expm1
(
double
val
)
{
return
::
expm1
(
val
);
}
...
...
@@ -50,8 +50,8 @@ namespace cv { namespace dnn { namespace cuda4dnn { namespace csl { namespace de
template
<>
inline
__device__
double
min
(
double
x
,
double
y
)
{
return
fmin
(
x
,
y
);
}
template
<
class
T
>
__device__
T
log1p
(
T
val
);
template
<>
inline
__device__
__half
log1p
(
__half
val
)
{
return
hlog
(
val
)
+
__half
(
1
);
}
template
<>
inline
__device__
__half2
log1p
(
__half2
val
)
{
return
h2log
(
val
)
+
__half2
(
1
,
1
);
}
template
<>
inline
__device__
__half
log1p
(
__half
val
)
{
return
hlog
(
__half
(
1
)
+
val
);
}
template
<>
inline
__device__
__half2
log1p
(
__half2
val
)
{
return
h2log
(
__half2
(
1
,
1
)
+
val
);
}
template
<>
inline
__device__
float
log1p
(
float
val
)
{
return
log1pf
(
val
);
}
template
<
class
T
>
__device__
T
log1pexp
(
T
val
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment