OpenCL gostcoin miner
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
826 B

14 years ago
#ifndef __OCL_H__
#define __OCL_H__
#ifdef __APPLE_CC__
#include <OpenCL/opencl.h>
#else
14 years ago
#include <CL/cl.h>
#endif
14 years ago
#define MAXTHREADS 256000
14 years ago
typedef struct {
cl_context context;
cl_kernel kernel;
cl_command_queue commandQueue;
cl_program program;
cl_mem inputBuffer;
cl_mem outputBuffer;
} _clState;
typedef struct {
uint32_t data[20];
uint32_t target[8];
} dev_blk_ctx;
struct work_t {
unsigned char data[128];
unsigned char hash1[64];
unsigned char midstate[32];
unsigned char target[32];
unsigned char hash[32];
uint32_t output[MAXTHREADS];
uint32_t res_nonce;
uint32_t valid;
uint32_t ready;
dev_blk_ctx blk;
};
14 years ago
extern char *file_contents(const char *filename, int *length);
extern int clDevicesNum();
extern _clState *initCl(int gpu, char *name, size_t nameSize);
#endif /* __OCL_H__ */