<commit_before>/* Copyright 2013-2014. The Regents of the University of California.
 * All rights reserved. Use of this source code is governed by 
 * a BSD-style license which can be found in the LICENSE file.
 */
 
#ifndef __SENSE_H
#define __SENSE_H 1


#ifdef __cplusplus
extern "C" {
#endif


#include "misc/mri.h"
#include "iter/iter.h"
#include "iter/iter2.h"



/**
 * configuration parameters for sense reconstruction
 *
 * @param rvc TRUE for real-values constraints
 */
struct sense_conf {

	_Bool rvc;
	int rwiter;	// should be moved into a recon_lad
	float gamma;	// ..
	float cclambda;
};


extern const struct sense_conf sense_defaults;

struct operator_p_s;

#ifdef USE_CUDA
extern void sense_recon2_gpu(const struct sense_conf* conf, const long dims[DIMS], _Complex float* image,
			const struct linop_s* sense_op,
			const long pat_dims[DIMS], const _Complex float* pattern,
			italgo_fun2_t italgo, void* italgo_conf,
			unsigned int num_funs,
			const struct operator_p_s* thresh_op[num_funs],
			const struct linop_s* thresh_funs[num_funs],
			const long ksp_dims[DIMS], const _Complex float* kspace, const _Complex float* image_truth);

extern void sense_recon_gpu(const struct sense_conf* conf, const long dims[DIMS], _Complex float* image,
			const struct linop_s* sense_op,
			const long pat_dims[DIMS], const _Complex float* pattern,
			italgo_fun_t italgo, void* italgo_conf,
			const struct operator_p_s* thresh_op,
			const long ksp_dims[DIMS], const _Complex float* kspace, const _Complex float* image_truth);
#endif
extern void sense_recon(const struct sense_conf* conf, const long dims[DIMS], _Complex float* image,
			const struct linop_s* sense_op,
			const long pat_dims[DIMS], const _Complex float* pattern,
			italgo_fun_t italgo, void* italgo_conf,
			const struct operator_p_s* thresh_op,
			const long ksp_dims[DIMS], const _Complex float* kspace, const _Complex float* image_truth);

extern void sense_recon2(const struct sense_conf* conf, const long dims[DIMS], _Complex float* image,
			const struct linop_s* sense_op,
			const long pat_dims[DIMS], const _Complex float* pattern,
			italgo_fun2_t italgo, void* italgo_conf,
			unsigned int num_funs,
			const struct operator_p_s* thresh_op[num_funs],
			const struct linop_s* thresh_funs[num_funs],
			const long ksp_dims[DIMS], const _Complex float* kspace, const _Complex float* image_truth);

extern void debug_print_sense_conf(int debug_level, const struct sense_conf* conf);



#ifdef __cplusplus
}
#endif

#endif

<commit_msg>make headers more C++ friendly<commit_after>/* Copyright 2013-2014. The Regents of the University of California.
 * All rights reserved. Use of this source code is governed by 
 * a BSD-style license which can be found in the LICENSE file.
 */
 
#ifndef __SENSE_H
#define __SENSE_H 1

#include "misc/mri.h"
#include "iter/iter.h"
#include "iter/iter2.h"

#include "misc/cppwrap.h"




/**
 * configuration parameters for sense reconstruction
 *
 * @param rvc TRUE for real-values constraints
 */
struct sense_conf {

	_Bool rvc;
	int rwiter;	// should be moved into a recon_lad
	float gamma;	// ..
	float cclambda;
};


extern const struct sense_conf sense_defaults;

struct operator_p_s;

#ifdef USE_CUDA
extern void sense_recon2_gpu(const struct sense_conf* conf, const long dims[DIMS], _Complex float* image,
			const struct linop_s* sense_op,
			const long pat_dims[DIMS], const _Complex float* pattern,
			italgo_fun2_t italgo, void* italgo_conf,
			unsigned int num_funs,
			const struct operator_p_s* thresh_op[__VLA2(num_funs)],
			const struct linop_s* thresh_funs[__VLA2(num_funs)],
			const long ksp_dims[DIMS], const _Complex float* kspace, const _Complex float* image_truth);

extern void sense_recon_gpu(const struct sense_conf* conf, const long dims[DIMS], _Complex float* image,
			const struct linop_s* sense_op,
			const long pat_dims[DIMS], const _Complex float* pattern,
			italgo_fun_t italgo, void* italgo_conf,
			const struct operator_p_s* thresh_op,
			const long ksp_dims[DIMS], const _Complex float* kspace, const _Complex float* image_truth);
#endif
extern void sense_recon(const struct sense_conf* conf, const long dims[DIMS], _Complex float* image,
			const struct linop_s* sense_op,
			const long pat_dims[DIMS], const _Complex float* pattern,
			italgo_fun_t italgo, void* italgo_conf,
			const struct operator_p_s* thresh_op,
			const long ksp_dims[DIMS], const _Complex float* kspace, const _Complex float* image_truth);

extern void sense_recon2(const struct sense_conf* conf, const long dims[DIMS], _Complex float* image,
			const struct linop_s* sense_op,
			const long pat_dims[DIMS], const _Complex float* pattern,
			italgo_fun2_t italgo, void* italgo_conf,
			unsigned int num_funs,
			const struct operator_p_s* thresh_op[__VLA2(num_funs)],
			const struct linop_s* thresh_funs[__VLA2(num_funs)],
			const long ksp_dims[DIMS], const _Complex float* kspace, const _Complex float* image_truth);

extern void debug_print_sense_conf(int debug_level, const struct sense_conf* conf);



#include "misc/cppwrap.h"

#endif


{'fraction_non_alphanumeric': 0.08066102695258706, 'fraction_numerical': 0.0062954947865433795, 'mean_word_length': 4.995283018867925, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7203083', 'n_tokens_mistral': 1868, 'n_tokens_neox': 1742, 'n_words': 558}