Metal Shader Language reference

I'm looking for the MSL reference for matrix functions. The following matrix functions are listed:


Matrix Functions

The functions in this section are in the Metal standard library and are defined in the header

<metal_matrix>
.
  • float determinant(floatnxn)
    half determinant(halfnxn)

    Computes the determinant of

    matrix
    , which must be a square matrix.
  • floatmxn transpose(floatnxm)
    halfmxn transpose(halfnxm)

    Transpose

    matrix
    .


I guess the header is the right reference but I'm not able to locate it.

Where is metal_matrix header and all other metal headers?


I couldn't decipher this from the command xcode generates as well:

CompileMetalFile sample/Shaders.metal

cd metalsamples/sample

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/usr/bin/metal -arch air64 -emit-llvm -c -gline-tables-only -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -ffast-math -serialize-diagnostics /Users/_name/Library/Developer/Xcode/DerivedData/sample-aefgcnngjrabhwdzalozuvcuywyu/Build/Intermediates/sample.build/Debug/sample.build/Metal/Shaders.dia -o /Users/_name/Library/Developer/Xcode/DerivedData/sample-aefgcnngjrabhwdzalozuvcuywyu/Build/Intermediates/sample.build/Debug/sample.build/Metal/Shaders.air -mmacosx-version-min=10.11 -std=osx-metal1.1 metalsamples/sample/Shaders.metal


Thanks

These headers contain no documentation, so you will probably not find them to be more illuminating than the Metal Shading Language Guide. If you have particular questions or problems, please feel free to ask.

I ran into this as I was converting a glsl shader into metal and couldn't find the replacement for inverse function.

https://www.opengl.org/sdk/docs/man/html/inverse.xhtml


I can compute this in the app and pass it to the shader but this lead me to searching for the reference.

Metal Shader Language reference
 
 
Q