Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Host Implementation of Histogram APIs #1974

Merged
merged 66 commits into from
Jan 23, 2025
Merged
Changes from 1 commit
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
7bcd21e
histogram CPU initial implementation
danhoeflinger Nov 8, 2024
955f0e2
atomics histogram implementation
danhoeflinger Nov 8, 2024
ebcada6
clang format
danhoeflinger Nov 8, 2024
93dd493
comment about atomics
danhoeflinger Nov 8, 2024
4d95044
first draft of atomic increment (unchecked)
danhoeflinger Nov 12, 2024
a7fe8a1
atomics include and fix builtin
danhoeflinger Nov 12, 2024
6be0b7b
large case
danhoeflinger Nov 12, 2024
9e3f16c
fix threshold check
danhoeflinger Nov 15, 2024
0592c15
minor improvements
danhoeflinger Nov 19, 2024
6ac87a0
MSVC fixes
danhoeflinger Nov 20, 2024
af5defb
parallelize initialization of openMP temp histograms
danhoeflinger Nov 20, 2024
65c30af
removing unnecessary type casting
danhoeflinger Dec 13, 2024
eec36d5
improving accumulation of local histograms (simd)
danhoeflinger Dec 13, 2024
1faece5
Properly using IsVector
danhoeflinger Dec 14, 2024
a39accd
typo fix
danhoeflinger Dec 16, 2024
2cd184d
special handling thread zero to use global mem
danhoeflinger Dec 16, 2024
b3dd2a0
cleanup
danhoeflinger Dec 16, 2024
bff45d9
atomic version removal
danhoeflinger Dec 16, 2024
2c8cc04
Revert "cleanup"
danhoeflinger Dec 16, 2024
790121b
Revert "special handling thread zero to use global mem"
danhoeflinger Dec 16, 2024
0392f23
comments and cleanup
danhoeflinger Dec 16, 2024
4556399
handling coarser grained parallelism
danhoeflinger Dec 16, 2024
2fdea34
undo-ing broken thread restriction in openMP
danhoeflinger Dec 16, 2024
a0c016a
lift pattern up to algorithm_impl level
danhoeflinger Dec 18, 2024
e87ba02
cleanup unnecessary code
danhoeflinger Dec 18, 2024
9f74810
further cleanup / formatting
danhoeflinger Dec 18, 2024
e0ed14c
add grain size todo
danhoeflinger Dec 20, 2024
db2a474
more general thread local storage
danhoeflinger Dec 20, 2024
240447e
implement omp on demand tls
danhoeflinger Dec 30, 2024
741f8e3
formatting
danhoeflinger Dec 30, 2024
fd310b6
formatting
danhoeflinger Dec 30, 2024
6820340
comments and clarity
danhoeflinger Dec 30, 2024
4798d2c
bugfix for serial impl
danhoeflinger Dec 30, 2024
ce8b55f
removing debugging output
danhoeflinger Dec 30, 2024
5d1f6e8
formatting
danhoeflinger Dec 30, 2024
6630018
comment adjustment
danhoeflinger Dec 30, 2024
83a9f81
minor naming / formatting
danhoeflinger Dec 30, 2024
a3f1304
formatting
danhoeflinger Dec 30, 2024
14cca58
Address review feedback
danhoeflinger Jan 6, 2025
766f42c
formatting
danhoeflinger Jan 6, 2025
6425d37
address review feedback
danhoeflinger Jan 13, 2025
a590cac
address feedback
danhoeflinger Jan 13, 2025
dd35fc9
formatting
danhoeflinger Jan 13, 2025
455cf9c
Add comment about using `size()`
danhoeflinger Jan 13, 2025
8b094fe
fixing include errors
danhoeflinger Jan 13, 2025
7e1463e
formatting
danhoeflinger Jan 13, 2025
d9d4f08
adding const
danhoeflinger Jan 15, 2025
bebba5e
address feedback
danhoeflinger Jan 15, 2025
d494601
address feedback
danhoeflinger Jan 15, 2025
0a2847f
rename to __enumerable_thread_local_storage
danhoeflinger Jan 15, 2025
ee65630
address feedback
danhoeflinger Jan 21, 2025
f23132e
switching to == to be more clear of intention
danhoeflinger Jan 21, 2025
6606a80
restoring tbbmalloc as optional
danhoeflinger Jan 21, 2025
71ca3d8
simplifying construction of OMP
danhoeflinger Jan 21, 2025
c59a451
typo; missing underscores
danhoeflinger Jan 21, 2025
87e9780
Apply feedback
danhoeflinger Jan 22, 2025
d8f09aa
Remove large case as it is not needed for coverage
danhoeflinger Jan 22, 2025
2c114ee
moving histogram pattern to histogram_impl
danhoeflinger Jan 22, 2025
1b7f146
implement make function in backend
danhoeflinger Jan 22, 2025
a2fb53b
Adding comment for get_with_id
danhoeflinger Jan 22, 2025
397913f
clang format
danhoeflinger Jan 22, 2025
4db8104
rename make function
danhoeflinger Jan 22, 2025
66d15bc
fix includes
danhoeflinger Jan 22, 2025
1146bb6
rename variables away from global
danhoeflinger Jan 22, 2025
8b35ae6
clang format
danhoeflinger Jan 22, 2025
aa61385
simplify lambda using indices
danhoeflinger Jan 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Properly using IsVector
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
  • Loading branch information
danhoeflinger committed Jan 13, 2025
commit 1faece59b76327d442e293c3175f2178546fc94d
9 changes: 4 additions & 5 deletions include/oneapi/dpl/pstl/algorithm_impl.h
Original file line number Diff line number Diff line change
@@ -4370,13 +4370,12 @@ __pattern_histogram(__parallel_tag<_IsVector>, _ExecutionPolicy&& __exec, _Rando
__brick_histogram(__subrange_first, __subrange_last, __func, __histogram_first, _IsVector{});
},
[](auto __local_histogram_first, std::uint32_t __n, auto __histogram_accum_first) {
oneapi::dpl::__unseq_backend::__simd_walk_2(__local_histogram_first, __n, __histogram_accum_first,
oneapi::dpl::__internal::__pstl_assign());
__internal::__brick_walk2_n(__local_histogram_first, __n, __histogram_accum_first,
oneapi::dpl::__internal::__pstl_assign(), IsVector{});
},
[](auto __local_histogram_first, std::uint32_t __n, auto __histogram_accum_first) {
oneapi::dpl::__unseq_backend::__simd_walk_2(
__local_histogram_first, __n, __histogram_accum_first,
[](_HistogramValueT __x, _HistogramValueT& __y) { __y += __x; });
__internal::__brick_walk2_n(__local_histogram_first, __n, __histogram_accum_first,
[](_HistogramValueT __x, _HistogramValueT& __y) { __y += __x; }, IsVector{});
});
}
}