modified pointer host to const in magma_buffer and modifie cpu->cpu version on magma