#pragma once

#include "shared_indices.h"
#include <cuda_runtime.h>

namespace caspar {

void PinholeFixedPointResJacFirst(float* pose,
                                  unsigned int pose_num_alloc,
                                  SharedIndex* pose_indices,
                                  float* sensor_from_rig,
                                  unsigned int sensor_from_rig_num_alloc,
                                  float* calib,
                                  unsigned int calib_num_alloc,
                                  SharedIndex* calib_indices,
                                  float* pixel,
                                  unsigned int pixel_num_alloc,
                                  float* point,
                                  unsigned int point_num_alloc,
                                  float* out_res,
                                  unsigned int out_res_num_alloc,
                                  float* const out_rTr,
                                  float* out_pose_jac,
                                  unsigned int out_pose_jac_num_alloc,
                                  float* const out_pose_njtr,
                                  unsigned int out_pose_njtr_num_alloc,
                                  float* const out_pose_precond_diag,
                                  unsigned int out_pose_precond_diag_num_alloc,
                                  float* const out_pose_precond_tril,
                                  unsigned int out_pose_precond_tril_num_alloc,
                                  float* out_calib_jac,
                                  unsigned int out_calib_jac_num_alloc,
                                  float* const out_calib_njtr,
                                  unsigned int out_calib_njtr_num_alloc,
                                  float* const out_calib_precond_diag,
                                  unsigned int out_calib_precond_diag_num_alloc,
                                  float* const out_calib_precond_tril,
                                  unsigned int out_calib_precond_tril_num_alloc,
                                  size_t problem_size);

}  // namespace caspar