mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 15:27:53 +00:00
e0b0a6c030
This patch is an initial attempt to re-structure cgminer source code from its monolithic design (with nearly all code being concentrated in main.c) to a more modular one. In this first stage, the conditionally compiled functions for GPU and CPU mining were extracted into dedicated files: * device-cpu.h and device-cpu.c covering WANT_CPUMINE functions * device-gpu.h and device-gpu.c covering HAVE_OPENCL functions The main.c file is left untouched as reference, while the remainder without the extracted parts is located in cgminer.c. The Makefile.am has been updated to use the re-structured source files for the build. Above pure re-structuring *NO* functional modifications were made. The sources were tested to compile and run on on a current Linux system with working CPU and GPU mining (Bitforce not tested due to loack of hardware).
28 lines
777 B
C
28 lines
777 B
C
#ifndef __DEVICE_GPU_H__
|
|
#define __DEVICE_GPU_H__
|
|
|
|
#include "miner.h"
|
|
|
|
|
|
extern char *print_ndevs_and_exit(int *ndevs);
|
|
extern void *reinit_gpu(void *userdata);
|
|
extern char *set_gpu_engine(char *arg);
|
|
extern char *set_gpu_fan(char *arg);
|
|
extern char *set_gpu_memclock(char *arg);
|
|
extern char *set_gpu_memdiff(char *arg);
|
|
extern char *set_gpu_powertune(char *arg);
|
|
extern char *set_gpu_vddc(char *arg);
|
|
extern char *set_temp_cutoff(char *arg);
|
|
extern char *set_temp_overheat(char *arg);
|
|
extern char *set_temp_target(char *arg);
|
|
extern char *set_intensity(char *arg);
|
|
extern char *set_vector(const char *arg, int *i);
|
|
void manage_gpu(void);
|
|
extern void pause_dynamic_threads(int gpu);
|
|
|
|
extern bool have_opencl;
|
|
|
|
extern struct device_api opencl_api;
|
|
|
|
#endif /* __DEVICE_GPU_H__ */
|