Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
L
libcruft-util
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
Service Desk
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
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
Danny Robson
libcruft-util
Commits
e1d56395
There was an error fetching the commit references. Please try again later.
Commit
e1d56395
authored
5 years ago
by
Danny Robson
Browse files
Options
Downloads
Patches
Plain Diff
build: remove buzstats tool
parent
4cc20526
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+1
-1
1 addition, 1 deletion
CMakeLists.txt
tools/buzstats.cpp
+0
-32
0 additions, 32 deletions
tools/buzstats.cpp
with
1 addition
and
33 deletions
CMakeLists.txt
+
1
−
1
View file @
e1d56395
...
...
@@ -542,7 +542,7 @@ endif ()
###############################################################################
foreach
(
tool
buzstats
cpuid poisson macro scratch
)
foreach
(
tool cpuid poisson macro scratch
)
add_executable
(
util_
${
tool
}
tools/
${
tool
}
.cpp
)
set_target_properties
(
util_
${
tool
}
PROPERTIES OUTPUT_NAME
${
tool
}
)
target_link_libraries
(
util_
${
tool
}
cruft
)
...
...
This diff is collapsed.
Click to expand it.
tools/buzstats.cpp
deleted
100644 → 0
+
0
−
32
View file @
4cc20526
#include
"hash/buzhash.hpp"
#include
"io.hpp"
#include
<iostream>
int
main
(
int
argc
,
char
const
**
argv
)
{
(
void
)
argc
;
cruft
::
mapped_file
src
(
argv
[
1
]);
cruft
::
view
bytes
(
src
);
static
constexpr
std
::
size_t
BITS
=
16
;
std
::
vector
<
std
::
size_t
>
counts
(
BITS
,
0
);
static
constexpr
std
::
size_t
WINDOW
=
48
;
cruft
::
hash
::
buzhash
<
u64
>
h
(
WINDOW
,
bytes
);
for
(
auto
const
&
val
:
bytes
.
consume
(
WINDOW
))
{
auto
const
res
=
h
(
&
val
);
std
::
size_t
mask
=
~
u64
(
0
)
>>
(
64
-
BITS
);
for
(
std
::
size_t
i
=
0
;
i
<
BITS
;
++
i
)
{
if
((
res
&
mask
)
==
0
)
counts
[
i
]
++
;
mask
>>=
1
;
}
}
for
(
auto
const
&
i
:
counts
)
std
::
cout
<<
i
<<
'\n'
;
}
\ No newline at end of file
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