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
d5949511
There was an error fetching the commit references. Please try again later.
Commit
d5949511
authored
7 years ago
by
fireice-uk
Browse files
Options
Downloads
Patches
Plain Diff
Make sure all singletons are set to null and make env a global ptr
parent
b40f937b
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/amd/minethd.cpp
+1
-1
1 addition, 1 deletion
xmrstak/backend/amd/minethd.cpp
xmrstak/backend/nvidia/minethd.cpp
+1
-1
1 addition, 1 deletion
xmrstak/backend/nvidia/minethd.cpp
xmrstak/misc/environment.hpp
+18
-23
18 additions, 23 deletions
xmrstak/misc/environment.hpp
with
20 additions
and
25 deletions
xmrstak/backend/amd/minethd.cpp
+
1
−
1
View file @
d5949511
...
@@ -65,7 +65,7 @@ __declspec(dllexport)
...
@@ -65,7 +65,7 @@ __declspec(dllexport)
#endif
#endif
std
::
vector
<
iBackend
*>*
xmrstak_start_backend
(
uint32_t
threadOffset
,
miner_work
&
pWork
,
environment
&
env
)
std
::
vector
<
iBackend
*>*
xmrstak_start_backend
(
uint32_t
threadOffset
,
miner_work
&
pWork
,
environment
&
env
)
{
{
environment
::
inst
(
)
=
env
;
environment
::
inst
(
&
env
)
;
return
amd
::
minethd
::
thread_starter
(
threadOffset
,
pWork
);
return
amd
::
minethd
::
thread_starter
(
threadOffset
,
pWork
);
}
}
}
// extern "C"
}
// extern "C"
...
...
This diff is collapsed.
Click to expand it.
xmrstak/backend/nvidia/minethd.cpp
+
1
−
1
View file @
d5949511
...
@@ -112,7 +112,7 @@ __declspec(dllexport)
...
@@ -112,7 +112,7 @@ __declspec(dllexport)
#endif
#endif
std
::
vector
<
iBackend
*>*
xmrstak_start_backend
(
uint32_t
threadOffset
,
miner_work
&
pWork
,
environment
&
env
)
std
::
vector
<
iBackend
*>*
xmrstak_start_backend
(
uint32_t
threadOffset
,
miner_work
&
pWork
,
environment
&
env
)
{
{
environment
::
inst
(
)
=
env
;
environment
::
inst
(
&
env
)
;
return
nvidia
::
minethd
::
thread_starter
(
threadOffset
,
pWork
);
return
nvidia
::
minethd
::
thread_starter
(
threadOffset
,
pWork
);
}
}
}
// extern "C"
}
// extern "C"
...
...
This diff is collapsed.
Click to expand it.
xmrstak/misc/environment.hpp
+
18
−
23
View file @
d5949511
...
@@ -12,35 +12,30 @@ class params;
...
@@ -12,35 +12,30 @@ class params;
struct
environment
struct
environment
{
{
static
inline
environment
&
inst
(
environment
*
init
=
nullptr
)
static
environment
&
inst
()
{
static
environment
env
;
return
env
;
}
environment
&
operator
=
(
const
environment
&
env
)
{
{
this
->
pPrinter
=
env
.
pPrinter
;
static
environment
*
env
=
nullptr
;
this
->
pglobalStates
=
env
.
pglobalStates
;
this
->
pJconfConfig
=
env
.
pJconfConfig
;
this
->
pExecutor
=
env
.
pExecutor
;
this
->
pParams
=
env
.
pParams
;
return
*
this
;
}
if
(
env
==
nullptr
)
{
if
(
init
!=
nullptr
)
env
=
new
environment
;
else
env
=
init
;
}
environment
()
:
pPrinter
(
nullptr
),
pglobalStates
(
nullptr
)
return
*
env
;
{
}
}
environment
()
{
}
printer
*
pPrinter
;
printer
*
pPrinter
=
nullptr
;
globalStates
*
pglobalStates
;
globalStates
*
pglobalStates
=
nullptr
;
jconf
*
pJconfConfig
;
jconf
*
pJconfConfig
=
nullptr
;
executor
*
pExecutor
;
executor
*
pExecutor
=
nullptr
;
params
*
pParams
;
params
*
pParams
=
nullptr
;
};
};
}
// namepsace xmrstak
}
// namepsace xmrstak
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