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
21463c59
There was an error fetching the commit references. Please try again later.
Commit
21463c59
authored
7 years ago
by
psychocrypt
Browse files
Options
Downloads
Patches
Plain Diff
use call prefix to load backends
parent
d80cc906
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
xmrstak/backend/plugin.hpp
+2
-1
2 additions, 1 deletion
xmrstak/backend/plugin.hpp
xmrstak/cli/cli-miner.cpp
+5
-3
5 additions, 3 deletions
xmrstak/cli/cli-miner.cpp
xmrstak/params.hpp
+3
-0
3 additions, 0 deletions
xmrstak/params.hpp
with
10 additions
and
4 deletions
xmrstak/backend/plugin.hpp
+
2
−
1
View file @
21463c59
#pragma once
#include
"xmrstak/misc/environment.hpp"
#include
"xmrstak/params.hpp"
#include
<thread>
#include
<atomic>
...
...
@@ -36,7 +37,7 @@ struct plugin
return
;
}
#else
libBackend
=
dlopen
((
std
::
string
(
".
/lib"
)
+
libName
+
".so"
).
c_str
(),
RTLD_LAZY
);
libBackend
=
dlopen
((
params
::
inst
().
executablePrefix
+
"
/lib"
+
libName
+
".so"
).
c_str
(),
RTLD_LAZY
);
if
(
!
libBackend
)
{
std
::
cerr
<<
"WARNING: "
<<
m_backendName
<<
" cannot load backend library: "
<<
dlerror
()
<<
std
::
endl
;
...
...
This diff is collapsed.
Click to expand it.
xmrstak/cli/cli-miner.cpp
+
5
−
3
View file @
21463c59
...
...
@@ -60,7 +60,8 @@ void help()
using
namespace
std
;
using
namespace
xmrstak
;
cout
<<
"Usage: "
<<
params
::
inst
().
executablePrefix
<<
" [--help|-h] [--benchmark] [-c CONFIGFILE] [CONFIG FILE]"
<<
endl
;
cout
<<
"Usage: "
<<
params
::
inst
().
binaryName
<<
" [OPTIONS] [CONFIG FILE]"
<<
endl
;
}
int
main
(
int
argc
,
char
*
argv
[])
...
...
@@ -85,8 +86,9 @@ int main(int argc, char *argv[])
// try windows "\"
pos
=
pathWithName
.
rfind
(
"
\\
"
);
}
params
::
inst
().
executablePrefix
=
std
::
string
(
pathWithName
,
0
,
pos
);
params
::
inst
().
binaryName
=
std
::
string
(
pathWithName
,
pos
+
1
,
std
::
string
::
npos
);
if
(
params
::
inst
().
binaryName
.
compare
(
pathWithName
)
!=
0
)
params
::
inst
().
executablePrefix
=
std
::
string
(
pathWithName
,
0
,
pos
);
for
(
int
i
=
1
;
i
<
argc
;
++
i
)
{
...
...
This diff is collapsed.
Click to expand it.
xmrstak/params.hpp
+
3
−
0
View file @
21463c59
...
...
@@ -19,6 +19,7 @@ struct params
}
std
::
string
executablePrefix
;
std
::
string
binaryName
;
bool
useAMD
;
bool
useNVIDIA
;
bool
useCPU
;
...
...
@@ -33,6 +34,8 @@ struct params
std
::
string
configFileCPU
;
params
()
:
binaryName
(
"xmr-stak"
),
executablePrefix
(
"./"
),
useAMD
(
true
),
useNVIDIA
(
true
),
useCPU
(
true
),
...
...
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