Commit 29cc0c1b authored by Daniel Campora's avatar Daniel Campora
Browse files

Replaced all stream / event by context.

parent d2669b6f
......@@ -187,8 +187,7 @@ An algorithm must define **two methods**: `set_arguments_size` and `operator()`.
const RuntimeOptions&,
const Constants&,
HostBuffers&,
cudaStream_t&,
cudaEvent_t&) const;
const Allen::Context& context) const;
private:
Property<saxpy_scale_factor_t> m_saxpy_factor {this, 2.f};
......@@ -241,8 +240,7 @@ void saxpy::saxpy_t::operator()(
const RuntimeOptions&,
const Constants&,
HostBuffers&,
cudaStream_t& stream,
cudaEvent_t&) const
const Allen::Context& context) const
{
global_function(saxpy)(
dim3(1),
......
......@@ -42,8 +42,7 @@ namespace pv_beamline_calculate_denom {
const RuntimeOptions&,
const Constants&,
HostBuffers&,
cudaStream_t& stream,
cudaEvent_t&) const;
const Allen::Context& context) const;
private:
Property<block_dim_t> m_block_dim {this, {{256, 1, 1}}};
......
......@@ -38,8 +38,7 @@ namespace pv_beamline_cleanup {
const RuntimeOptions&,
const Constants&,
HostBuffers& host_buffers,
cudaStream_t& stream,
cudaEvent_t&) const;
const Allen::Context& context) const;
private:
Property<block_dim_t> m_block_dim {this, {{32, 1, 1}}};
......
......@@ -42,8 +42,7 @@ namespace pv_beamline_extrapolate {
const RuntimeOptions&,
const Constants&,
HostBuffers&,
cudaStream_t& stream,
cudaEvent_t&) const;
const Allen::Context& context) const;
private:
Property<block_dim_t> m_block_dim {this, {{256, 1, 1}}};
......
......@@ -40,8 +40,7 @@ namespace pv_beamline_histo {
const RuntimeOptions&,
const Constants& constants,
HostBuffers&,
cudaStream_t& stream,
cudaEvent_t&) const;
const Allen::Context& context) const;
private:
Property<block_dim_t> m_block_dim {this, {{128, 1, 1}}};
......
......@@ -45,8 +45,7 @@ namespace pv_beamline_multi_fitter {
const RuntimeOptions&,
const Constants& constants,
HostBuffers&,
cudaStream_t& stream,
cudaEvent_t&) const;
const Allen::Context& context) const;
private:
Property<block_dim_y_t> m_block_dim_y {this, 4};
......
......@@ -38,8 +38,7 @@ namespace pv_beamline_peak {
const RuntimeOptions&,
const Constants&,
HostBuffers&,
cudaStream_t& stream,
cudaEvent_t&) const;
const Allen::Context& context) const;
private:
Property<block_dim_x_t> m_block_dim_x {this, 64};
......
......@@ -17,8 +17,7 @@ void pv_beamline_calculate_denom::pv_beamline_calculate_denom_t::operator()(
const RuntimeOptions&,
const Constants&,
HostBuffers&,
cudaStream_t& stream,
cudaEvent_t&) const
const Allen::Context& context) const
{
global_function(pv_beamline_calculate_denom)(
dim3(size<dev_event_list_t>(arguments)), property<block_dim_t>(), stream)(arguments);
......
......@@ -18,10 +18,9 @@ void pv_beamline_cleanup::pv_beamline_cleanup_t::operator()(
const RuntimeOptions&,
const Constants&,
HostBuffers& host_buffers,
cudaStream_t& stream,
cudaEvent_t&) const
const Allen::Context& context) const
{
initialize<dev_number_of_multi_final_vertices_t>(arguments, 0, stream);
initialize<dev_number_of_multi_final_vertices_t>(arguments, 0, context);
global_function(pv_beamline_cleanup)(dim3(size<dev_event_list_t>(arguments)), property<block_dim_t>(), stream)(
arguments);
......
......@@ -18,8 +18,7 @@ void pv_beamline_extrapolate::pv_beamline_extrapolate_t::operator()(
const RuntimeOptions&,
const Constants&,
HostBuffers&,
cudaStream_t& stream,
cudaEvent_t&) const
const Allen::Context& context) const
{
global_function(pv_beamline_extrapolate)(dim3(size<dev_event_list_t>(arguments)), property<block_dim_t>(), stream)(
arguments);
......
......@@ -20,8 +20,7 @@ void pv_beamline_histo::pv_beamline_histo_t::operator()(
const RuntimeOptions&,
const Constants& constants,
HostBuffers&,
cudaStream_t& stream,
cudaEvent_t&) const
const Allen::Context& context) const
{
global_function(pv_beamline_histo)(dim3(size<dev_event_list_t>(arguments)), property<block_dim_t>(), stream)(
arguments, constants.dev_beamline.data());
......
......@@ -19,10 +19,9 @@ void pv_beamline_multi_fitter::pv_beamline_multi_fitter_t::operator()(
const RuntimeOptions&,
const Constants& constants,
HostBuffers&,
cudaStream_t& stream,
cudaEvent_t&) const
const Allen::Context& context) const
{
initialize<dev_number_of_multi_fit_vertices_t>(arguments, 0, stream);
initialize<dev_number_of_multi_fit_vertices_t>(arguments, 0, context);
#ifdef TARGET_DEVICE_CUDA
const auto block_dimension = dim3(32, property<block_dim_y_t>());
......
......@@ -18,8 +18,7 @@ void pv_beamline_peak::pv_beamline_peak_t::operator()(
const RuntimeOptions&,
const Constants&,
HostBuffers&,
cudaStream_t& stream,
cudaEvent_t&) const
const Allen::Context& context) const
{
const auto grid_dim =
dim3((size<dev_event_list_t>(arguments) + property<block_dim_x_t>().get() - 1) / property<block_dim_x_t>().get());
......
......@@ -47,8 +47,7 @@ namespace fit_seeds {
const RuntimeOptions& runtime_options,
const Constants&,
HostBuffers& host_buffers,
cudaStream_t& stream,
cudaEvent_t&) const;
const Allen::Context& context) const;
private:
Property<block_dim_t> m_block_dim {this, {{256, 1, 1}}};
......
......@@ -51,8 +51,7 @@ namespace pv_get_seeds {
const RuntimeOptions& runtime_options,
const Constants&,
HostBuffers& host_buffers,
cudaStream_t& stream,
cudaEvent_t&) const;
const Allen::Context& context) const;
private:
Property<max_chi2_merge_t> m_chi2 {this, 25.f};
......
......@@ -18,8 +18,7 @@ void fit_seeds::pv_fit_seeds_t::operator()(
const RuntimeOptions& runtime_options,
const Constants&,
HostBuffers& host_buffers,
cudaStream_t& stream,
cudaEvent_t&) const
const Allen::Context& context) const
{
global_function(fit_seeds)(dim3(first<host_number_of_events_t>(arguments)), property<block_dim_t>(), stream)(
arguments);
......
......@@ -18,8 +18,7 @@ void pv_get_seeds::pv_get_seeds_t::operator()(
const RuntimeOptions& runtime_options,
const Constants&,
HostBuffers& host_buffers,
cudaStream_t& stream,
cudaEvent_t&) const
const Allen::Context& context) const
{
global_function(pv_get_seeds)(dim3(first<host_number_of_events_t>(arguments)), property<block_dim_t>(), stream)(
arguments);
......
......@@ -48,8 +48,7 @@ namespace scifi_consolidate_tracks {
const RuntimeOptions& runtime_options,
const Constants&,
HostBuffers& host_buffers,
cudaStream_t& stream,
cudaEvent_t&) const;
const Allen::Context& context) const;
private:
Property<block_dim_t> m_block_dim {this, {{256, 1, 1}}};
......
......@@ -35,8 +35,7 @@ namespace scifi_copy_track_hit_number {
const RuntimeOptions&,
const Constants&,
HostBuffers&,
cudaStream_t& stream,
cudaEvent_t&) const;
const Allen::Context& context) const;
private:
Property<block_dim_t> m_block_dim {this, {{512, 1, 1}}};
......
......@@ -21,8 +21,7 @@ void scifi_consolidate_tracks::scifi_consolidate_tracks_t::operator()(
const RuntimeOptions& runtime_options,
const Constants&,
HostBuffers& host_buffers,
cudaStream_t& stream,
cudaEvent_t&) const
const Allen::Context& context) const
{
global_function(scifi_consolidate_tracks)(dim3(size<dev_event_list_t>(arguments)), property<block_dim_t>(), stream)(
arguments);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment