morousg / cvGPUSpeedup

A faster implementation of OpenCV-CUDA that uses OpenCV objects, and more!
Apache License 2.0
34 stars 5 forks source link

Improve fuseDF function when at least one of the DFs being fused is based on OperationTupleOperation #102

Closed morousg closed 1 month ago

morousg commented 1 month ago

The function fuseDF is a convenience function that creates a Read or Binary DeviceFunction, by creating an OperationTupleOperation based on the Operations of a sequence of DeviceFunctions being passed as parameters to fuseDF.

When one of those Operations it's an OperationTupleOperation, we are putting it inside of the OperationTupleOperation being created, as one Operation more in the OperationTuple.

This is suboptimal in terms of storage, since we are storing an instance of an OperationTuple, instead of only the internal elements of the OperationTuple.

With this issue, we want to refactor the implementation of fuseDF, by generating an OperationTupleOperation that is composed only by Operations that are not OperationTupleOperations.