mirror of
https://github.com/ml-explore/mlx.git
synced 2025-09-01 04:24:36 +08:00
Add missing && when forwarding args (#925)
Without the && args would be copied and perfect forwarding won't work.
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
<< std::endl;
|
||||
|
||||
template <typename F, typename... Args>
|
||||
double time_fn(F fn, Args... args) {
|
||||
double time_fn(F fn, Args&&... args) {
|
||||
// warmup
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
eval(fn(std::forward<Args>(args)...));
|
||||
|
Reference in New Issue
Block a user