If you're looking for the function call SetMatrixWithEitherD3D9OrD3D11(...) there ain't no such thing. They are different APIs and they have different methods to accomplish things.
If you choose D3D9, use D3D9 methods. If you choose D3D11, use D3D11 methods.
This, in particular, is the answer to your question. The point is that you would need to build a small wrapper layer to abstract this particular feature away in order to communize the two APIs.