   ConstMatrixDynamic(ConstMatrixMemoryHandler<Type,_rows,_cols>& mem_handler)
   {
     data_ = mem_handler.get();
-    pitch_ = mem_handler.pitch();
   }
 
   __host__ __device__ __forceinline__

  /** Data access operator given a \a row and a \a col
   * @return unchangable value at \a (row,col)
   */
  //  __device__ __forceinline__
  //  const Type& ldg(int row, int col) const
  //  {
  //    return __ldg(&data_[col*rows_ + row]);
  //  }

  __device__ __forceinline__
  const Type& operator()(int row, int col) const
  {
    return __ldg(&data_[row*pitch_ + col]);
    //return data_[row*pitch_ + col];
    //return __ldg(&data_[row*cols_ + col]);
    //return data_[row*cols_ + col];
  }

  /** Data access operator given an \a index

    }
    else if(mem_type_ == MemoryType::DEVICE_MEMORY)
    {
      data_ = Memory::alloc(_rows*_cols);
      const cudaError cu_err =
          cudaMemcpy(data_,src,_rows*_cols*sizeof(Type)
                     ,cudaMemcpyHostToDevice);

      if (cu_err != cudaSuccess)
        IMP_CU_THROW_EXCEPTION("cudaMemcpy returned error code", cu_err);
