Code of regressions functions must be in C, Compliable by clang-cl and visual c++. -- 2
Budget: $250 – $750 USD
- Code of regression functions must be in C, Compilable by clang-cl and visual c++.
- No third party libraries for the functions. Except for standard C libraries.
- Since its C, no exceptions thrown.
- Each function would have its own .c and .h file.
- Each function should be documented on the header (.h) file.
- Avoid inlines. Separate implementation from declaration.
- Macros are ok, as long as they are inside the c file. No macros in headers.
- Each one will have an structure that determine the inputs, outputs and parameters.
- In order to save memory space, inputs and outputs will be in floats.
- The size of the output will be the same size as the size of the input.
- While input and output is in floats, calculation should be done in doubles to minimize floating point mistakes.
- Any setting needed must be on its own structure.
- Return (int)0 on success. Error code on failure. You determine the error codes. But should be on an enumerator.
-----------------------------------
Example header.
-----------------------------------
#pragma once
/**
* @brief Declares simple moving average calculation.
*/
#ifdef __cplusplus
extern "C" {
#endif
/// Parameters to CalcSMA function.
struct sma_args {
unsigned int period; ///< Period of Simple moving average.
const float * input; ///< Input.
float * output; ///< Output.
unsigned count; ///< Number of items on both input and output buffer.
unsigned start; ///< Start of output.
};
/// Enumerator of possible errors for an SMA.
enum sma_error {
sma_error_none = 0, ///< No error.
sma_error_invalid_arguments, ///< Invalid arguments. passed.
sma_error_buffer_too_small, ///< Buffer is too small for calculation.
};
/**
* Calculates simple moving average.
* @param pArgs @see sma_args
* @return 0 on success. Error code on failure. @see sma_error
*/
int CalcSMA(struct sma_args * pArgs);
#ifdef __cplusplus
} extern "C"
#endif
THE UI CAN BE DONE PYTHON ANY TOOL
- No third party libraries for the functions. Except for standard C libraries.
- Since its C, no exceptions thrown.
- Each function would have its own .c and .h file.
- Each function should be documented on the header (.h) file.
- Avoid inlines. Separate implementation from declaration.
- Macros are ok, as long as they are inside the c file. No macros in headers.
- Each one will have an structure that determine the inputs, outputs and parameters.
- In order to save memory space, inputs and outputs will be in floats.
- The size of the output will be the same size as the size of the input.
- While input and output is in floats, calculation should be done in doubles to minimize floating point mistakes.
- Any setting needed must be on its own structure.
- Return (int)0 on success. Error code on failure. You determine the error codes. But should be on an enumerator.
-----------------------------------
Example header.
-----------------------------------
#pragma once
/**
* @brief Declares simple moving average calculation.
*/
#ifdef __cplusplus
extern "C" {
#endif
/// Parameters to CalcSMA function.
struct sma_args {
unsigned int period; ///< Period of Simple moving average.
const float * input; ///< Input.
float * output; ///< Output.
unsigned count; ///< Number of items on both input and output buffer.
unsigned start; ///< Start of output.
};
/// Enumerator of possible errors for an SMA.
enum sma_error {
sma_error_none = 0, ///< No error.
sma_error_invalid_arguments, ///< Invalid arguments. passed.
sma_error_buffer_too_small, ///< Buffer is too small for calculation.
};
/**
* Calculates simple moving average.
* @param pArgs @see sma_args
* @return 0 on success. Error code on failure. @see sma_error
*/
int CalcSMA(struct sma_args * pArgs);
#ifdef __cplusplus
} extern "C"
#endif
THE UI CAN BE DONE PYTHON ANY TOOL