mlx/mlx/backend/cuda/device/arange.cuh

16 lines
244 B
Plaintext
Raw Normal View History

2025-05-07 12:26:46 +08:00
// Copyright © 2025 Apple Inc.
namespace mlx::core::cu {
template <typename T>
struct Arange {
const T start;
const T step;
__device__ T operator()(uint32_t i) const {
return start + i * step;
}
};
} // namespace mlx::core::cu