mirror of
				https://github.com/ml-explore/mlx.git
				synced 2025-10-31 16:21:27 +08:00 
			
		
		
		
	
		
			
				
	
	
	
		
			286 B
		
	
	
	
	
	
	
	
			
		
		
	
	
			286 B
		
	
	
	
	
	
	
	
Build and Run
Install MLX with Python:
pip install mlx>=0.22
Build the C++ example:
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
Run the C++ example:
./build/example
which should output:
array([2, 4, 6], dtype=int32)
