I have a config file that looking like this
"gpu_thread_num" : 6,
"gpu_threads_conf" : [
{ "index" : 0, "intensity" : 1000, "worksize" : 8, "affine_to_cpu" : false },
{ "index" : 1, "intensity" : 1000, "worksize" : 8, "affine_to_cpu" : false },
{ "index" : 2, "intensity" : 1000, "worksize" : 8, "affine_to_cpu" : false },
{ "index" : 3, "intensity" : 1000, "worksize" : 8, "affine_to_cpu" : false },
{ "index" : 4, "intensity" : 1000, "worksize" : 8, "affine_to_cpu" : false },
{ "index" : 5, "intensity" : 1000, "worksize" : 8, "affine_to_cpu" : false },
],
The number of lines in "gpu_threads_conf" always must be equal to "gpu_thread_num" and this num changing from time to time depend on number of GPU's connected. I have a start.sh script that checks this number and change "gpu_thread_num" with sed, but i can't figure out how to change "gpu_threads_conf".
I lost my hope trying to figure out how to do it myself and really need your help.
jqto process it.