CUDA Programming by Shane Cook

CUDA Programming by Shane Cook

Author:Shane Cook
Language: eng
Format: epub
ISBN: 9780124159884
Publisher: Elsevier Inc.
Published: 2012-10-30T16:00:00+00:00


// Increment this run’s count

results_processed++;

}

}

}

}

return results_processed;

}

The collect result function simply iterates over all devices and each stream of every device and calls the process_result function to try to process any available results.

__host__ bool process_result(const u32 device_num,

const u32 stream_num,

const size_t chunk_size)

{

bool result;

bool stop_event_hit = (cudaEventQuery(memcpy_from_stop_event[device_num][stream_num]) == cudaSuccess);

// Space is avaiable if network_out_idx is not

// more than the total queue length behind

bool output_space_avail = ((completed_idx - network_out_idx) < MAX_OUT_QUEUED_PACKETS);



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.