I want to use some of the vector data types defined in Metal (such as
Those types are in
<simd/SIMD.h> for C and C++ (and by extension, for Objective-C and Objective-C++).
They're actually the same types, with the same data layout, and the same associated functions, as those that you use from a Metal shader. So using them in CPU-side code where you expect to interface with Metal is a great idea. For example, you can define your own struct for vertex shader input in a C++ header file, then import that header and use the same struct definition in both your CPU code and the shader.
Note that the names differ a bit: e.g.
vector_uint2 in C, but
simd::uint2 in C++.