Newer
Older
/* diffmodels.cuh
Tim Behrens, Saad Jbabdi, Stam Sotiropoulos, Moises Hernandez - FMRIB Image Analysis Group
Copyright (C) 2005 University of Oxford */
/* CCOPYRIGHT */
Moises Fernandez
committed
#include <device_vector.h>
void fit_PVM_single( //INPUT
const vector<ColumnVector> datam_vec,
const vector<Matrix> bvecs_vec,
const vector<Matrix> bvals_vec,
thrust::device_vector<float> datam_gpu,
thrust::device_vector<float> bvecs_gpu,
thrust::device_vector<float> bvals_gpu,
Moises Fernandez
committed
int ndirections,
int nfib,
Moises Fernandez
committed
bool gradnonlin,
Moises Fernandez
committed
//OUTPUT
thrust::device_vector<float>& params_gpu);
Moises Fernandez
committed
void fit_PVM_single_c( //INPUT
const vector<ColumnVector> datam_vec,
const vector<Matrix> bvecs_vec,
const vector<Matrix> bvals_vec,
thrust::device_vector<float> datam_gpu,
thrust::device_vector<float> bvecs_gpu,
thrust::device_vector<float> bvals_gpu,
Moises Fernandez
committed
int ndirections,
int nfib,
Moises Fernandez
committed
bool gradnonlin,
Moises Fernandez
committed
//OUTPUT
thrust::device_vector<float>& params_gpu);
Moises Fernandez
committed
void fit_PVM_multi( //INPUT
thrust::device_vector<float> datam_gpu,
thrust::device_vector<float> bvecs_gpu,
thrust::device_vector<float> bvals_gpu,
Moises Fernandez
committed
int nvox,
Moises Fernandez
committed
int nfib,
Moises Fernandez
committed
bool m_include_f0,
Moises Fernandez
committed
bool gradnonlin,
Moises Fernandez
committed
//OUTPUT
thrust::device_vector<float>& params_gpu);
Moises Fernandez
committed
void calculate_tau( //INPUT
thrust::device_vector<float> datam_gpu,
thrust::device_vector<float> params_gpu,
thrust::device_vector<float> bvecs_gpu,
thrust::device_vector<float> bvals_gpu,
thrust::host_vector<int> vox_repeat,
Moises Fernandez
committed
int nfib,
int model,
bool m_include_f0,
bool nonlin,
Moises Fernandez
committed
bool gradnonlin,
Moises Fernandez
committed
//OUTPUT
thrust::host_vector<float>& tau);
__device__ void cf_PVM_single( //INPUT
const float* params,
const float* data,
const float* bvecs,
const float* bvals,
const int ndirections,
const int nfib,
Moises Fernandez
committed
const int nparams,
const bool m_include_f0,
float* reduction,
float* fs,
float* x,
float* _d,
float* sumf,
Moises Fernandez
committed
__device__ void grad_PVM_single( //INPUT
const float* params,
const float* data,
const float* bvecs,
const float* bvals,
const int ndirections,
const int nfib,
Moises Fernandez
committed
const int nparams,
const bool m_include_f0,
float* J,
float* reduction,
float* fs,
float* x,
float* _d,
float* sumf,
Moises Fernandez
committed
__device__ void hess_PVM_single( //INPUT
const float* params,
const float* bvecs,
const float* bvals,
const int ndirections,
const int nfib,
Moises Fernandez
committed
const int nparams,
const bool m_include_f0,
float* J,
float* reduction,
float* fs,
float* x,
float* _d,
float* sumf,
Moises Fernandez
committed
//OUTPUT
Moises Fernandez
committed
__device__ void cf_PVM_single_c( //INPUT
const float* params,
const float* data,
const float* bvecs,
const float* bvals,
const int ndirections,
const int nfib,
Moises Fernandez
committed
const int nparams,
const bool m_include_f0,
float* reduction,
float* fs,
float* x,
float* _d,
float* sumf,
Moises Fernandez
committed
__device__ void grad_PVM_single_c( //INPUT
const float* params,
const float* data,
const float* bvecs,
const float* bvals,
const int ndirections,
const int nfib,
Moises Fernandez
committed
const int nparams,
const bool m_include_f0,
float* J,
float* reduction,
float* fs,
float* f_deriv,
float* x,
float* _d,
float* sumf,
Moises Fernandez
committed
//OUTPUT
Moises Fernandez
committed
__device__ void hess_PVM_single_c( //INPUT
const float* params,
const float* bvecs,
const float* bvals,
const int ndirections,
const int nfib,
Moises Fernandez
committed
const int nparams,
const bool m_include_f0,
float* J,
float* reduction,
float* fs,
float* f_deriv,
float* x,
float* _d,
float* sumf,
Moises Fernandez
committed
//OUTPUT
Moises Fernandez
committed
__device__ void cf_PVM_multi( //INPUT
const float* params,
const float* data,
const float* bvecs,
const float* bvals,
const int ndirections,
const int nfib,
Moises Fernandez
committed
const int nparams,
const bool m_include_f0,
float* reduction,
float* fs,
float* x,
float* _a,
float* _b,
float* sumf,
Moises Fernandez
committed
__device__ void grad_PVM_multi( //INPUT
const float* params,
const float* data,
const float* bvecs,
const float* bvals,
const int ndirections,
const int nfib,
Moises Fernandez
committed
const int nparams,
const bool m_include_f0,
float* J,
float* reduction,
float* fs,
float* x,
float* _a,
float* _b,
float* sumf,
Moises Fernandez
committed
//OUTPUT
Moises Fernandez
committed
__device__ void hess_PVM_multi( //INPUT
const float* params,
const float* bvecs,
const float* bvals,
const int ndirections,
const int nfib,
Moises Fernandez
committed
const int nparams,
const bool m_include_f0,
float* J,
float* reduction,
float* fs,
float* x,
float* _a,
float* _b,
float* sumf,
Moises Fernandez
committed
//OUTPUT