Find Jobs
Hire Freelancers

C# project

$30-100 USD

Cancelado
Publicado hace más de 16 años

$30-100 USD

Pagado a la entrega
I have an application that takes a pointer to a function and returns the result of the function. I need to read the function in memory, save it as a file (as binary data is fine), and then read it in later, so that it can run it again. The 2 functions are: 1. Save function from memory 2. Load function from text file The specs are: typedef void (* FUNCTION_PTR) (float*, float**); int saveFunction (FUNCTION_PTR pToFunction, CString fileName) // this function takes the pointer to the function in memory and saves it as a file FUNCTION_PTR LoadFunction (CString fileName) // this function takes the filename, loads the file, loads the function into memory, and then returns a pointer to the funciton to run the function: (*pToFunction)(inputData, output); // This is how it works. I just added to explain. the function should occupy less than 10K of memory. here is an example of a function that we want to save and load the binary code for: #define TRUNC(x)(((x)>=0) ? floor(x) : ceil(x)) #define C_FPREM (_finite(f[0]/f[1]) ? f[0]-(TRUNC(f[0]/f[1])*f[1]) : f[0]/f[1]) #define C_F2XM1 (((fabs(f[0])<=1) && (!_isnan(f[0]))) ? (pow(2,f[0])-1) : ((!_finite(f[0]) && !_isnan(f[0]) && (f[0]<0)) ? -1 : f[0])) float DiscipulusCFunction(float v[]) { long double f[8]; long double tmp = 0; int cflag = 0; f[0]=f[1]=f[2]=f[3]=f[4]=f[5]=f[6]=f[7]=0; f[0]-=v[60]; cflag=(f[0] < f[2]); f[1]+=f[0]; f[0]+=v[31]; f[0]+=f[2]; if (!cflag) f[0] = f[2]; f[0]-=v[12]; f[0]/=f[0]; if (cflag) f[0] = f[0]; if (!cflag) f[0] = f[3]; f[0]+=f[1]; f[0]/=f[3]; f[0]/=v[61]; f[0]/=v[10]; cflag=(f[0] < f[1]); f[0]+=f[1]; cflag=(f[0] < f[2]); cflag=(f[0] < f[0]); f[0]+=f[0]; if (!_finite(f[0])) f[0]=0; return f[0]; } the first parameter that is passed is an array of inputs to function. it is an array of 64 floats. the second parameter is the output from the function. it says return f[0], but i call it with this code: (*pGeneticProgram)(g_StockData[currentDay], Outputs); myValue = Outputs[0]; so, i am not using the return value. it stores the return values in Outputs. I don't know why the function code only has one parameter. i guess that's not correct because i know the code i call it works. so i think it actually takes 2 parameters, the input array[64], and the output array[8]. if its easier to use the return value instead of modifying the outputs array, that's could work. but i don't know if that works so if you want to do it let me know and i will try it and see. also, there can be up to 2048 operations. (f[0]-=v[60]; is 1 operation). so i think that means the function could take up to 8k of memory, but i am not sure. feel free to ask me questions by PMB !!! also, the outputs array has 8 floats. if possible, let's save the data as a text file. if not, it can be saved as a binary file.
ID del proyecto: 210586

Información sobre el proyecto

4 propuestas
Proyecto remoto
Activo hace 16 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
4 freelancers están ofertando un promedio de $63 USD por este trabajo
Avatar del usuario
As far as I have understood something like JIT is necessary for you. $2000 and I shall made it for you.
$100 USD en 60 días
4,3 (8 comentarios)
5,8
5,8
Avatar del usuario
Hi, i m the best expert in C++ and polymorphism (dynamic coding). plz check PMB thanks
$90 USD en 3 días
5,0 (9 comentarios)
4,5
4,5
Avatar del usuario
I can help you but I'm not sure what you want to do. I understabd that you want to load some data into an array in future time (from any data or text file) is it true. I can help you a lot but explain me in details. If you want to load a function into memory in this curricumstances you need a dinamic link library - dll.I'm waiting for your answer.
$30 USD en 1 día
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
I can handle this project
$100 USD en 3 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
I'm working in c/c++ for a long time
$30 USD en 1 día
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de IRELAND
Belfast, Ireland
4,9
121
Forma de pago verificada
Miembro desde jul 29, 2007

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.