mirror of
https://github.com/GOSTSec/ccminer
synced 2025-02-02 01:44:32 +00:00
xmr: vstudio warning fix about mpcount linkage
and move ptr type cast defines to common cuda helper
This commit is contained in:
parent
dc816b4673
commit
496052e47d
@ -141,7 +141,6 @@ static const __device__ __align__(16) uint32_t d_t_fn[1024] = {
|
|||||||
#define AS_UINT2(addr) *((uint2*)(addr))
|
#define AS_UINT2(addr) *((uint2*)(addr))
|
||||||
#define AS_UINT4(addr) *((uint4*)(addr))
|
#define AS_UINT4(addr) *((uint4*)(addr))
|
||||||
#define AS_UL2(addr) *((ulonglong2*)(addr))
|
#define AS_UL2(addr) *((ulonglong2*)(addr))
|
||||||
#define AS_UL4(addr) *((ulonglong4*)(addr))
|
|
||||||
|
|
||||||
#define t_fn0(x) (sharedMemory[x])
|
#define t_fn0(x) (sharedMemory[x])
|
||||||
#define t_fn1(x) (sharedMemory[0x100U | (x)])
|
#define t_fn1(x) (sharedMemory[0x100U | (x)])
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
extern "C" short device_map[MAX_GPUS];
|
extern "C" short device_map[MAX_GPUS];
|
||||||
extern "C" long device_sm[MAX_GPUS];
|
extern "C" long device_sm[MAX_GPUS];
|
||||||
extern short device_mpcount[MAX_GPUS];
|
extern "C" short device_mpcount[MAX_GPUS];
|
||||||
extern int cuda_arch[MAX_GPUS];
|
extern int cuda_arch[MAX_GPUS];
|
||||||
|
|
||||||
// common functions
|
// common functions
|
||||||
@ -77,6 +77,12 @@ extern const uint3 threadIdx;
|
|||||||
#define ROTR32(x, n) __funnelshift_r( (x), (x), (n) )
|
#define ROTR32(x, n) __funnelshift_r( (x), (x), (n) )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define AS_U32(addr) *((uint32_t*)(addr))
|
||||||
|
#define AS_U64(addr) *((uint64_t*)(addr))
|
||||||
|
#define AS_UINT2(addr) *((uint2*)(addr))
|
||||||
|
#define AS_UINT4(addr) *((uint4*)(addr))
|
||||||
|
#define AS_UL2(addr) *((ulonglong2*)(addr))
|
||||||
|
|
||||||
__device__ __forceinline__ uint64_t MAKE_ULONGLONG(uint32_t LO, uint32_t HI)
|
__device__ __forceinline__ uint64_t MAKE_ULONGLONG(uint32_t LO, uint32_t HI)
|
||||||
{
|
{
|
||||||
#if __CUDA_ARCH__ >= 130
|
#if __CUDA_ARCH__ >= 130
|
||||||
|
2
nvml.cpp
2
nvml.cpp
@ -2091,7 +2091,7 @@ void *monitor_thread(void *userdata)
|
|||||||
uint32_t fanpercent = 0, power = 0;
|
uint32_t fanpercent = 0, power = 0;
|
||||||
double tempC = 0, khs_per_watt = 0;
|
double tempC = 0, khs_per_watt = 0;
|
||||||
uint32_t counter = 0;
|
uint32_t counter = 0;
|
||||||
int max_loops = 2000;
|
int max_loops = 1000;
|
||||||
|
|
||||||
pthread_cond_wait(&cgpu->monitor.sampling_signal, &cgpu->monitor.lock);
|
pthread_cond_wait(&cgpu->monitor.sampling_signal, &cgpu->monitor.lock);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user