Esempio n. 1
0
/**
 * Create an operator (without strides)
 */
const struct operator_s* operator_generic_create(unsigned int N, const unsigned int D[N],
			const long* dims[N], operator_data_t* data, operator_fun_t apply, operator_del_t del)
{
	const long* strs[N];

	for (unsigned int i = 0; i < N; i++)
		strs[i] = MD_STRIDES(D[i], dims[i], CFL_SIZE);

	return operator_generic_create2(N, D, dims, strs, data, apply, del);
}
Esempio n. 2
0
File: ops.c Progetto: nckz/bart
/**
 * Create an operator (without strides)
 */
const struct operator_s* operator_generic_create(unsigned int N, const unsigned int D[N],
			const long* dims[N], void* data, operator_fun_t apply, operator_del_t del)
{
	const long* strs[N];

	for (unsigned int i = 0; i < N; i++) {

		long* ptr = alloca(D[i] * sizeof(long));
		md_calc_strides(D[i], ptr, dims[i], CFL_SIZE);
		strs[i] = ptr;
	}

	return operator_generic_create2(N, D, dims, strs, data, apply, del);
}