Search:

Type: Posts; User: ordak

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    8
    Views
    3,902

    I want to try versatile Criterion...

    I want to try versatile Criterion testing library. We have three files test.c and add.c and add.h . Compile with:


    clang -lcriterion -Wall -Wextra -pedantic -std=c11 test.c add.c -o add

    First...
  2. Replies
    4
    Views
    2,704

    I found this from stackoverflow...

    I found this from stackoverflow:



    int bioskey(void)
    {
    //struct timeval tv = { 0L, 0L };
    fd_set fds;
    FD_ZERO(&fds);
    FD_SET(0, &fds);
  3. Replies
    4
    Views
    2,704

    Standard bioskey function

    Hi,

    I have faced the following code, can you help me to write a standard version of it:



    struct timeval tv;

    int bioskey() {
    fd_set readfds;
  4. It seems to me you have wrongly hard-coded this:...

    It seems to me you have wrongly hard-coded this:


    void my_quicksort(int arr[]){
    int low = 0;
    int high = 8;

    [...]
  5. Replies
    52
    Views
    9,648

    You may read my Sudoku solver...

    You may read my Sudoku solver too.
  6. Replies
    2
    Views
    1,571

    That part could be written as : for (int m...

    That part could be written as :



    for (int m = 0; m < ann->hidden; ++m) {
    int windex = m + (ann->hidden_layers ? (ann->hidden * (ann->hidden_layers - 1)) : 0);
    w[m+1]...
  7. Replies
    2
    Views
    1,571

    Quantizing genann ANN library

    Hi,

    I want to quantize genann library from double/float network type to int16_t . Still I have not got the right output , see this code :

    In genann.h


    typedef int16_t genann_t;
    #define...
  8. Replies
    2
    Views
    1,305

    This compilation passes and gives no error: ...

    This compilation passes and gives no error:


    gcc -Wall -Wextra -pedantic example_train.c -lfann -fopenmp -static -lm
    gcc -Wall -Wextra -pedantic example_run.c -lfixedfann -fopenmp -static -lm
  9. Replies
    2
    Views
    1,305

    Experimenting on this , I changed the file...

    Experimenting on this , I changed the file "fixedfann.h" to :


    typedef int16_t fann_type;//int fann_type;

    I have two demonstrating source files:

    example_train.c
  10. Replies
    2
    Views
    1,305

    Modifying FANN library

    Hi,

    I want to use Fast Artificial Neural Network Library (fann). This is a performance critical work. I want to use:


    typedef int16_t fann_type;

    In a header file.

    Also I want to...
  11. Thread: gprof in Linux

    by ordak
    Replies
    1
    Views
    1,106

    gprof in Linux

    Hi,

    I want to profile a multi source project via gprof. I was able to do it but there are issues here:

    The number of calls is not shown in output. Like:


    % cumulative self ...
  12. Replies
    6
    Views
    3,467

    At times , I use "KDbg" which is a GUI for GDB.

    At times , I use "KDbg" which is a GUI for GDB.
  13. Thread: TSP problem

    by ordak
    Replies
    8
    Views
    3,239

    Explaining the search problem more , these are...

    Explaining the search problem more , these are some states that are just repeated:



    ======
    si is 0 , dist is 0.0 step is 0
    0 : 5,2,1,-,-,-,-,-,-,-,
    1 : 3,2,0,-,-,-,-,-,-,-,
    2 :...
  14. Thread: TSP problem

    by ordak
    Replies
    8
    Views
    3,239

    This all_passed function is not used. Here is my...

    This all_passed function is not used. Here is my new version :



    bool all_passed(int *const path)
    {

    int i;
    if(path[0] != 0)
    return false;
  15. Thread: TSP problem

    by ordak
    Replies
    8
    Views
    3,239

    Here is how I compile this code: gcc -g...

    Here is how I compile this code:


    gcc -g -Wall -Wextra -pedantic -Werror -std=c11 try40.c `simple2d --libs` -lm -o try40.out
  16. Thread: TSP problem

    by ordak
    Replies
    8
    Views
    3,239

    Here it is: // Originally from: //...

    Here it is:



    // Originally from:
    // https://github.com/DubiousCactus/GeneticAlgorithm


    #include <assert.h>
    #include <math.h>
  17. Thread: TSP problem

    by ordak
    Replies
    8
    Views
    3,239

    I prefer to post the whole code. As a small...

    I prefer to post the whole code. As a small program to show the problem is difficult to produce. If you look at the output on terminal , you may spot the problem.
  18. Thread: TSP problem

    by ordak
    Replies
    8
    Views
    3,239

    TSP problem

    Hi,

    I have a traveling sales person (TSP) attempt code. That is based on some one else's code. The algorithm is based on "graph theory" and graphics library is "simple2d". The current problem is...
  19. Replies
    5
    Views
    1,608

    OK , I got the permit. I may intend to sell the...

    OK , I got the permit. I may intend to sell the resulting code online. Should I ask questions about code here on the forum or not ? Because that way the code would be accessible to many people ,...
  20. Replies
    5
    Views
    1,608

    The original code is on GitHub without any...

    The original code is on GitHub without any license.
  21. Replies
    5
    Views
    1,608

    Unlicensed code fork

    Hi,

    I have developed an unlicensed code base from some one else. It is about a famous problem in "math/computer science". The original algorithm is now a different one. Graphics library is...
  22. Thread: Shell commands

    by ordak
    Replies
    3
    Views
    1,853

    Thanks this works in case of error. In case of...

    Thanks this works in case of error. In case of only warning(s) , try40.out is executed anyway. Maybe turn warnings into errors ? Other solution ?
  23. Thread: Shell commands

    by ordak
    Replies
    3
    Views
    1,853

    Shell commands

    Hi,

    I have a shell file with this content:



    clear


    gcc -g -Wall -Wextra -pedantic -std=c11 try40.c -lm -o try40.out
  24. Replies
    6
    Views
    3,465

    On this laptop without optimization flags for...

    On this laptop without optimization flags for compiler , for last code I get total 47.25 sec comparing to total 50.52 sec for original quicksort ​in post #1.
  25. Replies
    6
    Views
    3,465

    I borrowed some code from quadsort...

    I borrowed some code from quadsort. Now here is a new version of custom quicksort:



    #include <stdio.h>
    #include <stdlib.h>
    #include <time.h>
    #include <stdbool.h>
    #include <stdint.h>
Results 1 to 25 of 138
Page 1 of 6 1 2 3 4