If I understood correctly, here you want to ensure that the type of the buffer you pass is really native, i.e. that the user is using e.g. `NativeDoubleBuffer` and otherwise you throw. The rationale is that you don't want to convert other types of buffers because it might be expensive?

I would say this is fine, as long as you provide a method on other types of buffers that converts into a `NativeDoubleBuffer`. The client then has to be explicit about the conversion.