Skip to content

Reconsider allowing timers to be copied #64

@nsubtil

Description

@nsubtil

Lift GPU timers are "very stateful" and have a destructor with lots of side effects. This is proving problematic in several use cases. Firepony in particular seems to rely on host timers being copiable, which has forced a corresponding and hopefully temporary change in Lift to allow host timers to be copied (cuda timers remain uncopiable).

We should reconsider whether this is the best approach.

One possible alternative would be to rely on the Lift context to track timers and keep all non-POD data on that side, turning the timer object itself into a shallow handle to the actual timer. This also has the advantage of allowing CUDA timer objects to be pooled and reused on a per-GPU basis. The drawbacks are potential performance issues with starting/stopping timers, depending on how the timer vs. state approach is designed (start/stop may have to do an expensive names array lookup).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions