dmlfw (Daniyal Machine Learning Framework)
example_dmlfw_mat_double.c

Example usage:

#include <stdio.h>
#include <stdlib.h>
#include <dmlfw_matrix.h>
#include <dmlfw_error.h>
int main(void) {
char err[512], dbg[512];
double val=0.0;
if (dmlfw_error()) {
dmlfw_get_error_string(err, sizeof(err));
dmlfw_get_debug_string(dbg, sizeof(dbg));
printf("Failed to create matrix: %s\nDebug info: %s\n", err, dbg);
return EXIT_FAILURE;
}
dmlfw_mat_double_set(mat, 0, 0, 1.23);
val = dmlfw_mat_double_get(mat, 0, 0);
printf("Value at (0,0): %lf\n", val);
return EXIT_SUCCESS;
}
int main()
Main function to execute batch gradient descent linear regression example.
Definition batch_gd.c:316
Centralized error handling interface for the framework.
void dmlfw_get_error_string(char *error_string, uint32_t size)
Copies the last error message into the provided character buffer.
uint8_t dmlfw_error(void)
Checks if the last framework call resulted in an error.
void dmlfw_get_debug_string(char *debug_string, uint32_t size)
Copies detailed debug information about the last error into the provided character buffer.
struct __dmlfw_mat_double dmlfw_mat_double
Opaque structure representing a double precision matrix.
Definition dmlfw_mat_double.h:73
void dmlfw_mat_double_set(dmlfw_mat_double *matrix, index_t row, index_t column, double value)
Sets value at a specific matrix position.
dmlfw_mat_double * dmlfw_mat_double_create_new(dimension_t rows, dimension_t columns)
Creates a new matrix with specified rows and columns.
double dmlfw_mat_double_get(dmlfw_mat_double *matrix, index_t row, index_t column)
Returns value at a specific matrix position.
void dmlfw_mat_double_destroy(dmlfw_mat_double *matrix)
Destroys a matrix and frees all associated memory.
Core matrix types and utilities for double and string data.