# Linear Algebra User Q-functions often perform small (1x1, 2x2, or 3x3) linear algebra operations (determinant, matrix-vector product, etc.) at every Q-point. For good performance, it is important to use specialized versions of these operations for the given size. If the matrix or vector is given in a statically sized container (e.g. using [StaticArrays.jl](https://github.com/JuliaArrays/StaticArrays.jl/)) then this happens automatically. However, if the matrix is not statically sized, and instead is given as, for example, a view into a larger array, then LibCEED.jl provides some convenient specialized functions. In order to allow for generic code, the [`CeedDim`](@ref) struct is used for dispatch. An object `D = CeedDim(dim)` can be created, and passed as a second argument to functions like `det` to choose the specialized implementations. In this case, `dim` should be known as a compile-time constant, otherwise it will result in a type instability, and give poor performance. For example: ```@repl using LibCEED, LinearAlgebra dim = 3; J = rand(dim, dim); det(J) # Slow! det(J, CeedDim(dim)) # Fast! ``` ```@docs CeedDim det(J, ::CeedDim{1}) setvoigt getvoigt ```