|
@ -233,9 +233,9 @@ bool ethash_cl_miner::init( |
|
|
m_workgroup_size = ((workgroup_size + 7) / 8) * 8; |
|
|
m_workgroup_size = ((workgroup_size + 7) / 8) * 8; |
|
|
|
|
|
|
|
|
// patch source code
|
|
|
// patch source code
|
|
|
std::ifstream t("ethash_cl_miner_kernel.cl"); |
|
|
// note: ETHASH_CL_MINER_KERNEL is simply ethash_cl_miner_kernel.cl compiled
|
|
|
std::string code((std::istreambuf_iterator<char>(t)), |
|
|
// into a byte array by bin2h.cmake. There is no need to load the file by hand in runtime
|
|
|
std::istreambuf_iterator<char>()); |
|
|
std::string code(ETHASH_CL_MINER_KERNEL, ETHASH_CL_MINER_KERNEL + ETHASH_CL_MINER_KERNEL_SIZE); |
|
|
add_definition(code, "GROUP_SIZE", m_workgroup_size); |
|
|
add_definition(code, "GROUP_SIZE", m_workgroup_size); |
|
|
add_definition(code, "DAG_SIZE", (unsigned)(_dagSize / ETHASH_MIX_BYTES)); |
|
|
add_definition(code, "DAG_SIZE", (unsigned)(_dagSize / ETHASH_MIX_BYTES)); |
|
|
add_definition(code, "ACCESSES", ETHASH_ACCESSES); |
|
|
add_definition(code, "ACCESSES", ETHASH_ACCESSES); |
|
|