Template Function heongpu::input_vector_storage_manager

Function Documentation

template<typename T, typename F>
void heongpu::input_vector_storage_manager(std::vector<T> &objects, F function, ExecutionOptions options, bool is_input_output_same)

Recursively manages the input storage for a vector of objects and conditionally transfers data to the appropriate location (e.g., device or host) before executing a function on each object.

Template Parameters:
  • T – The type of the objects in the vector to manage.

  • F – The callable type of the function to execute on each object.

Parameters:
  • objects – A vector of objects whose storage is being managed.

  • function – The callable function that will operate on each object in the vector.

  • options – A set of execution options defining storage behavior and stream configuration.

  • is_input_output_same – A flag indicating whether the input and output storage should remain consistent for each object.