Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Dubský Jan
asgn
Commits
0dda479e
Commit
0dda479e
authored
Apr 08, 2020
by
Bednárek David RNDr. Ph.D.
Browse files
bsearch: complexity and ranges set to match 2018-2
parent
9a906365
Changes
2
Hide whitespace changes
Inline
Side-by-side
asgn/bsearchasgn.hpp
View file @
0dda479e
...
...
@@ -208,9 +208,9 @@ namespace bsearchmain {
return
fmwkng
::
logarithmic
(
0x40
,
#ifdef NDEBUG
0x10000
,
0x10000
0
,
#else
0x4000
0
,
0x4000
,
#endif
#ifdef NDEBUG
0x4
...
...
@@ -227,11 +227,11 @@ namespace bsearchmain {
static
auto
code_name
()
{
return
"bsearchmain::osize"
;
}
static
auto
enumerator
()
{
return
fmwkng
::
logarithmic
(
0x
10
00
,
0x
4
00
,
#ifdef NDEBUG
0x
10
0000
,
0x
4
0000
,
#else
0x
10
000
,
0x
4
000
,
#endif
0x10
);
...
...
@@ -268,7 +268,7 @@ namespace bsearchmain {
template
<
typename
CTX
>
static
auto
complexity
(
CTX
&&
ctx
)
{
return
(
std
::
uint_fast64_t
)
log2
(
fmwkng
::
get
<
isize
>
(
ctx
))
*
fmwkng
::
get
<
osize
>
(
ctx
);
return
(
std
::
uint_fast64_t
)
log2
(
fmwkng
::
get
<
isize
>
(
ctx
))
*
fmwkng
::
get
<
osize
>
(
ctx
)
+
fmwkng
::
get
<
isize
>
(
ctx
)
;
}
static
constexpr
fmwkng
::
average_t
minimum_count
=
#ifdef NDEBUG
...
...
asgn/bsearchmain.cpp
View file @
0dda479e
...
...
@@ -66,11 +66,11 @@ namespace bsearchmain {
get
<
isize
>
(
ctx3
));
bsearchsol
::
bsearch_inner
<
policy
>
idata
(
igen
.
inner_data
(),
igen
.
inner_size
());
//
#ifdef NDEBUG
#ifdef NDEBUG
for_parallel
(
ctx3
,
run_thread_ftor
<
policy
>
(
igen
,
idata
));
//
#else
//
run_thread_ftor<policy>(igen, idata)(ctx3);
//
#endif
#else
run_thread_ftor
<
policy
>
(
igen
,
idata
)(
ctx3
);
#endif
}
}
};
...
...
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