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