Skip to content
Snippets Groups Projects
Unverified Commit 63359986 authored by fireice-uk's avatar fireice-uk Committed by GitHub
Browse files

Merge pull request #2102 from psychocrypt/topic-compModeOpti

OpenCL: comp mode optimization
parents 1cb4f5e7 307dda83
No related branches found
No related tags found
No related merge requests found
......@@ -411,13 +411,16 @@ size_t InitOpenCLGpu(cl_context opencl_ctx, GpuContext* ctx, const char* source_
strided_index = 0;
}
// if intensity is a multiple of worksize than comp mode is not needed
int needCompMode = ctx->compMode && ctx->rawIntensity % ctx->workSize != 0 ? 1 : 0;
std::string options;
options += " -DITERATIONS=" + std::to_string(hashIterations);
options += " -DMASK=" + std::to_string(threadMemMask) + "U";
options += " -DWORKSIZE=" + std::to_string(ctx->workSize) + "U";
options += " -DSTRIDED_INDEX=" + std::to_string(strided_index);
options += " -DMEM_CHUNK_EXPONENT=" + std::to_string(mem_chunk_exp) + "U";
options += " -DCOMP_MODE=" + std::to_string(ctx->compMode ? 1u : 0u);
options += " -DCOMP_MODE=" + std::to_string(needCompMode);
options += " -DMEMORY=" + std::to_string(hashMemSize) + "LLU";
options += " -DALGO=" + std::to_string(miner_algo[ii]);
options += " -DCN_UNROLL=" + std::to_string(ctx->unroll);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment