Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
azure-cloud-mining-script
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Recolic
azure-cloud-mining-script
Commits
53652d35
There was an error fetching the commit references. Please try again later.
Commit
53652d35
authored
6 years ago
by
psychocrypt
Browse files
Options
Downloads
Patches
Plain Diff
CPU: fix logical error
Fix wrong warning about unknown ASM type
parent
b0ccccf3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xmrstak/backend/cpu/minethd.cpp
+30
-29
30 additions, 29 deletions
xmrstak/backend/cpu/minethd.cpp
with
30 additions
and
29 deletions
xmrstak/backend/cpu/minethd.cpp
+
30
−
29
View file @
53652d35
...
...
@@ -586,35 +586,36 @@ minethd::cn_hash_fun minethd::func_multi_selector(bool bHaveAes, bool bNoPrefetc
auto
selected_function
=
func_table
[
algv
<<
2
|
digit
.
to_ulong
()
];
// check for asm optimized version for cryptonight_v8
if
(
N
<=
2
&&
algo
==
cryptonight_monero_v8
&&
bHaveAes
)
{
std
::
string
selected_asm
=
asm_version_str
;
if
(
selected_asm
==
"auto"
)
selected_asm
=
cpu
::
getAsmName
(
N
);
if
(
selected_asm
!=
"off"
)
{
if
(
selected_asm
==
"intel_avx"
)
{
// Intel Ivy Bridge (Xeon v2, Core i7/i5/i3 3xxx, Pentium G2xxx, Celeron G1xxx)
if
(
N
==
1
)
selected_function
=
Cryptonight_hash_asm
<
1u
,
0u
>::
template
hash
<
cryptonight_monero_v8
>;
else
if
(
N
==
2
)
selected_function
=
Cryptonight_hash_asm
<
2u
,
0u
>::
template
hash
<
cryptonight_monero_v8
>;
}
// supports only 1 thread per hash
if
(
N
==
1
&&
selected_asm
==
"amd_avx"
)
{
// AMD Ryzen (1xxx and 2xxx series)
selected_function
=
Cryptonight_hash_asm
<
1u
,
1u
>::
template
hash
<
cryptonight_monero_v8
>;
}
if
(
asm_version_str
==
"auto"
&&
(
selected_asm
!=
"intel_avx"
||
selected_asm
!=
"amd_avx"
))
printer
::
inst
()
->
print_msg
(
L3
,
"Switch to assembler version for '%s' cpu's"
,
selected_asm
.
c_str
());
else
if
(
selected_asm
!=
"intel_avx"
||
selected_asm
!=
"amd_avx"
)
// unknown asm type
printer
::
inst
()
->
print_msg
(
L1
,
"Assembler '%s' unknown, fallback to non asm version of cryptonight_v8"
,
selected_asm
.
c_str
());
}
}
// check for asm optimized version for cryptonight_v8
if
(
N
<=
2
&&
algo
==
cryptonight_monero_v8
&&
bHaveAes
)
{
std
::
string
selected_asm
=
asm_version_str
;
if
(
selected_asm
==
"auto"
)
selected_asm
=
cpu
::
getAsmName
(
N
);
if
(
selected_asm
!=
"off"
)
{
if
(
selected_asm
==
"intel_avx"
)
{
// Intel Ivy Bridge (Xeon v2, Core i7/i5/i3 3xxx, Pentium G2xxx, Celeron G1xxx)
if
(
N
==
1
)
selected_function
=
Cryptonight_hash_asm
<
1u
,
0u
>::
template
hash
<
cryptonight_monero_v8
>;
else
if
(
N
==
2
)
selected_function
=
Cryptonight_hash_asm
<
2u
,
0u
>::
template
hash
<
cryptonight_monero_v8
>;
}
// supports only 1 thread per hash
if
(
N
==
1
&&
selected_asm
==
"amd_avx"
)
{
// AMD Ryzen (1xxx and 2xxx series)
selected_function
=
Cryptonight_hash_asm
<
1u
,
1u
>::
template
hash
<
cryptonight_monero_v8
>;
}
if
(
asm_version_str
==
"auto"
&&
(
selected_asm
!=
"intel_avx"
||
selected_asm
!=
"amd_avx"
))
printer
::
inst
()
->
print_msg
(
L3
,
"Switch to assembler version for '%s' cpu's"
,
selected_asm
.
c_str
());
else
if
(
selected_asm
!=
"intel_avx"
&&
selected_asm
!=
"amd_avx"
)
// unknown asm type
printer
::
inst
()
->
print_msg
(
L1
,
"Assembler '%s' unknown, fallback to non asm version of cryptonight_v8"
,
selected_asm
.
c_str
());
}
}
return
selected_function
;
}
...
...
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