1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-16 19:22:46 -05:00

Restored OclCache.

This commit is contained in:
XMRig
2019-08-27 06:31:40 +07:00
parent 47b8cb6044
commit ec1839d580
27 changed files with 290 additions and 72 deletions

View File

@@ -573,7 +573,7 @@ __kernel void cn1_monero(__global uint4 *Scratchpad, __global ulong *states, uin
if (gIdx < Threads)
# endif
{
#pragma unroll UNROLL_FACTOR
#pragma unroll CN_UNROLL
for (int i = 0; i < ITERATIONS; ++i) {
ulong c[2];
@@ -686,7 +686,7 @@ __kernel void cn1_v2_monero(__global uint4 *Scratchpad, __global ulong *states,
uint2 division_result = as_uint2(states[12]);
uint sqrt_result = as_uint2(states[13]).s0;
#pragma unroll UNROLL_FACTOR
#pragma unroll CN_UNROLL
for(int i = 0; i < ITERATIONS; ++i)
{
# ifdef __NV_CL_C_VERSION
@@ -846,7 +846,7 @@ __kernel void cn1_v2_half(__global uint4 *Scratchpad, __global ulong *states, ui
uint2 division_result = as_uint2(states[12]);
uint sqrt_result = as_uint2(states[13]).s0;
#pragma unroll UNROLL_FACTOR
#pragma unroll CN_UNROLL
for(int i = 0; i < 0x40000; ++i)
{
# ifdef __NV_CL_C_VERSION
@@ -1074,7 +1074,7 @@ __kernel void cn1_tube(__global uint4 *Scratchpad, __global ulong *states, uint
{
uint idx0 = a[0];
#pragma unroll UNROLL_FACTOR
#pragma unroll CN_UNROLL
for (int i = 0; i < ITERATIONS; ++i) {
ulong c[2];
@@ -1171,7 +1171,7 @@ __kernel void cn1(__global uint4 *Scratchpad, __global ulong *states, uint varia
{
uint idx0 = a[0];
#pragma unroll UNROLL_FACTOR
#pragma unroll CN_UNROLL
for (int i = 0; i < ITERATIONS; ++i) {
ulong c[2];

View File

@@ -75,7 +75,7 @@ __kernel void cn1_v2_rwz(__global uint4 *Scratchpad, __global ulong *states, uin
uint2 division_result = as_uint2(states[12]);
uint sqrt_result = as_uint2(states[13]).s0;
#pragma unroll UNROLL_FACTOR
#pragma unroll CN_UNROLL
for(int i = 0; i < 0x60000; ++i)
{
# ifdef __NV_CL_C_VERSION
@@ -235,7 +235,7 @@ __kernel void cn1_v2_zls(__global uint4 *Scratchpad, __global ulong *states, uin
uint2 division_result = as_uint2(states[12]);
uint sqrt_result = as_uint2(states[13]).s0;
#pragma unroll UNROLL_FACTOR
#pragma unroll CN_UNROLL
for(int i = 0; i < 0x60000; ++i)
{
# ifdef __NV_CL_C_VERSION
@@ -395,7 +395,7 @@ __kernel void cn1_v2_double(__global uint4 *Scratchpad, __global ulong *states,
uint2 division_result = as_uint2(states[12]);
uint sqrt_result = as_uint2(states[13]).s0;
#pragma unroll UNROLL_FACTOR
#pragma unroll CN_UNROLL
for(int i = 0; i < 0x100000; ++i)
{
# ifdef __NV_CL_C_VERSION

View File

@@ -199,7 +199,7 @@ struct SharedMemChunk
float4 va[16];
};
__attribute__((reqd_work_group_size(WORKSIZE_GPU * 16, 1, 1)))
__attribute__((reqd_work_group_size(WORKSIZE * 16, 1, 1)))
__kernel void cn1_cn_gpu(__global int *lpad_in, __global int *spad, uint numThreads)
{
const uint gIdx = getIdx();
@@ -214,7 +214,7 @@ __kernel void cn1_cn_gpu(__global int *lpad_in, __global int *spad, uint numThre
__global int* lpad = (__global int*)((__global char*)lpad_in + MEMORY * (gIdx/16));
__local struct SharedMemChunk smem_in[WORKSIZE_GPU];
__local struct SharedMemChunk smem_in[WORKSIZE];
__local struct SharedMemChunk* smem = smem_in + chunk;
uint tid = get_local_id(0) % 16;

View File

@@ -66,7 +66,7 @@ __kernel void cn1_cryptonight_r_N(__global uint4 *Scratchpad, __global ulong *st
uint r2 = as_uint2(states[13]).s0;
uint r3 = as_uint2(states[13]).s1;
#pragma unroll UNROLL_FACTOR
#pragma unroll CN_UNROLL
for(int i = 0; i < ITERATIONS; ++i)
{
# ifdef __NV_CL_C_VERSION