Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
ftl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Nicolas Pope
ftl
Merge requests
!119
Implements
#182
splatting
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Implements
#182
splatting
feature/182/splats
into
master
Overview
0
Commits
19
Pipelines
1
Changes
6
Merged
Nicolas Pope
requested to merge
feature/182/splats
into
master
5 years ago
Overview
0
Commits
19
Pipelines
1
Changes
6
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
0e5c9d46
19 commits,
5 years ago
6 files
+
424
−
352
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Some changes are not shown
For a faster browsing experience, some files are collapsed by default.
Expand all files
Files
6
Search (e.g. *.vue) (Ctrl+P)
components/renderers/cpp/include/ftl/cuda/warp.hpp
0 → 100644
+
48
−
0
Options
#ifndef _FTL_CUDA_WARP_HPP_
#define _FTL_CUDA_WARP_HPP_
#ifndef WARP_SIZE
#define WARP_SIZE 32
#endif
#define FULL_MASK 0xffffffff
namespace
ftl
{
namespace
cuda
{
__device__
inline
float
warpMin
(
float
e
)
{
for
(
int
i
=
WARP_SIZE
/
2
;
i
>
0
;
i
/=
2
)
{
const
float
other
=
__shfl_xor_sync
(
FULL_MASK
,
e
,
i
,
WARP_SIZE
);
e
=
min
(
e
,
other
);
}
return
e
;
}
__device__
inline
float
warpMax
(
float
e
)
{
for
(
int
i
=
WARP_SIZE
/
2
;
i
>
0
;
i
/=
2
)
{
const
float
other
=
__shfl_xor_sync
(
FULL_MASK
,
e
,
i
,
WARP_SIZE
);
e
=
max
(
e
,
other
);
}
return
e
;
}
__device__
inline
float
warpSum
(
float
e
)
{
for
(
int
i
=
WARP_SIZE
/
2
;
i
>
0
;
i
/=
2
)
{
const
float
other
=
__shfl_xor_sync
(
FULL_MASK
,
e
,
i
,
WARP_SIZE
);
e
+=
other
;
}
return
e
;
}
__device__
inline
int
warpSum
(
int
e
)
{
for
(
int
i
=
WARP_SIZE
/
2
;
i
>
0
;
i
/=
2
)
{
const
float
other
=
__shfl_xor_sync
(
FULL_MASK
,
e
,
i
,
WARP_SIZE
);
e
+=
other
;
}
return
e
;
}
}
}
#endif // _FTL_CUDA_WARP_HPP_
Loading