mirror of
https://github.com/ml-explore/mlx.git
synced 2025-07-15 21:21:16 +08:00

* try cpp 20 for compile * unary, binary, ternary in jit * nits * fix gather/scatter * fix rebase * reorg compile * add ternary to compile * jit copy * jit compile flag * fix build * use linked function for ternary * some nits * docs + circle min size build * docs + circle min size build * fix extension * fix no cpu build * improve includes
11 lines
172 B
C++
11 lines
172 B
C++
// Copyright © 2023-2024 Apple Inc.
|
|
|
|
#pragma once
|
|
|
|
struct Select {
|
|
template <typename T>
|
|
T operator()(bool condition, T x, T y) {
|
|
return condition ? x : y;
|
|
}
|
|
};
|