forked from cbuchner1/CudaMiner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlegacy_kernel.h
31 lines (25 loc) · 1.16 KB
/
legacy_kernel.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef LEGACY_KERNEL_H
#define LEGACY_KERNEL_H
#include "salsa_kernel.h"
#define EXTRA_WARPS 0
class LegacyKernel : public KernelInterface
{
public:
LegacyKernel();
virtual void set_scratchbuf_constants(int MAXWARPS, uint32_t** h_V);
virtual bool run_kernel(dim3 grid, dim3 threads, int WARPS_PER_BLOCK, int thr_id, cudaStream_t stream, uint32_t* d_idata, uint32_t* d_odata, unsigned int N, unsigned int LOOKUP_GAP, bool interactive, bool benchmark, int texture_cache);
virtual bool bindtexture_1D(uint32_t *d_V, size_t size);
virtual bool bindtexture_2D(uint32_t *d_V, int width, int height, size_t pitch);
virtual bool unbindtexture_1D();
virtual bool unbindtexture_2D();
virtual char get_identifier() { return 'L'; };
#if EXTRA_WARPS
virtual int max_warps_per_block() { return 8; };
#else
virtual int max_warps_per_block() { return 3; };
#endif
virtual int get_texel_width() { return 2; };
virtual cudaSharedMemConfig shared_mem_config() { return cudaSharedMemBankSizeFourByte; }
virtual cudaFuncCache cache_config() { return cudaFuncCachePreferShared; }
};
#endif // #ifndef LEGACY_KERNEL_H