Add 4d Mat handling across generic and optimized backends, extend operator tests, and document supported input and output Mat dimensions.