• I am not in C, it is theory and C++ [Hybrid Approaches from KOAN/Fortran-S]

    From Mild Shock@janburse@fastmail.fm to comp.lang.fortran on Wed Jul 29 12:45:43 2026
    From Newsgroup: comp.lang.fortran

    Hi,

    I am not in C, it is a theory and a C++
    cross post. But I originally started elsewhere.
    I am only reacting to a post that spilled

    from C, theory and C++ back to else where,
    since Rossy Boy extend the discussion.
    Yes the FORTRAN reference is interesting!

    See an older post of mine, where I tested
    exactly the Queues idea, and where they
    already mentiond hyprid approaches:

    Hi,

    You see it all boils down to find your inner peace
    by an immaculate inception of some queue datatype.

    KOAN/Fortran-S was an early 1990s research programming
    system for distributed-memory multiprocessors . Developed
    at ENS Lyon in the early 1990s . Often listed alongside
    other historical parallel programming efforts.

    The Message Passing: The research explicitly
    compared the SVM approach against message passing
    on the same hardware . The finding was that SVM
    could achieve good performance without the low-level

    complexity of managing explicit messages, though
    the best results often came from a hybrid approach (sic!)
    Here is an interesting baseline, from Java,
    a class ElevenSingle that only does:

    public static void run() {
    for (int A = 1; A < 192; A++) {
    int Y = (771-A)/3;
    for (int B = A; B < Y; B++) {
    int Z = (771-A-B)/2;
    for (int C = B; C < Z; C++) {
    int D = 711-A-B-C;
    if (A*B*C == 711000000/D &&
    711000000 % D == 0)
    System.out.println("A="+A+", B="+B+", C="+C+", D="+D);
    }
    }
    }
    }

    And then compare it to ElevenMulti, doing some
    Work Balancing Scheduler Tetris Game with 8 cores:

    ElevenSingle
    A=120, B=125, C=150, D=316
    6.628 ms

    ElevenMulti
    A=120, B=125, C=150, D=316
    1.941 ms

    Not great, not terrible!

    Bye


    Feel free to also do these more logic tiling
    experiments than signal processing experiments.
    I don't do signal process with pi-WAM.

    Bye

    Johann 'Myrkraverk' Oskarsson schrieb:
    On 29/07/2026 5:46 PM, Mild Shock wrote:
    Hi,

    Your strictness is your problem , not mine.
    The WebGPU / WGSL has explicitly an API
    for so called compute shaders.

    You can also combine compute shaders and
    render shaders. But to use compute shaders
    for AI acceration is not uncommon now.

    I know it's extremely common. I just don't do it myself.

    I don't even know what kind of GPU I have. That's as much I care about GPUs. I only need my GPU to handle OpenGL 4.6.

    Because we're in comp.lang.c, and I write my graphics in C, and not C++.
    Nor Fortran 77, like my copy of /Digital Image Processing/ by Gonzales & Woods. Just take a look at page 127, and bask in the glory of the /Fast Fourier Transform/ in Fortran 77.

    That said, I kind of like classic Fortran, like 77, IV; and recently I learned there was Fortran 66. I either didn't know that, or just
    completely forgot about it.


    Happy C coding, or Fortran 77!
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Mild Shock@janburse@fastmail.fm to comp.lang.fortran on Wed Jul 29 12:52:40 2026
    From Newsgroup: comp.lang.fortran

    Hi,

    Small correction, the code below should use <=
    in the for loops. But Java was extrem picky
    concerning JIT-ing of the for loops, refuse

    to JIT a <= based loop, so I rewrote a
    corrected solution that matches:

    7-11 cubic Solution by Pritchard & Gries https://www.cs.cornell.edu/gries/TechReports/83-574.pdf

    Into the following code:

    public static void run() {
    for (int A = 1; A < 193; A++) {
    int Y = (771-A)/3+1;
    for (int B = A; B < Y; B++) {
    int Z = (771-A-B)/2+1;
    for (int C = B; C < Z; C++) {
    int D = 711-A-B-C;
    if (A *B*C == 711000000/D && 711000000 % D == 0)
    /* System.out.println("A="+A+", B="+B+",
    C="+C+", D="+D) */ ;
    }
    }
    }
    }

    Bye

    Mild Shock schrieb:
    Hi,

    I am not in C, it is a theory and a C++
    cross post. But I originally started elsewhere.
    I am only reacting to a post that spilled

    from C, theory and C++ back to else where,
    since Rossy Boy extend the discussion.
    Yes the FORTRAN reference is interesting!

    See an older post of mine, where I tested
    exactly the Queues idea, and where they
    already mentiond hyprid approaches:

    Hi,

    You see it all boils down to find your inner peace
    by an immaculate inception of some queue datatype.

    KOAN/Fortran-S was an early 1990s research programming
    system for distributed-memory multiprocessors . Developed
    at ENS Lyon in the early 1990s . Often listed alongside
    other historical parallel programming efforts.

    The Message Passing: The research explicitly
    compared the SVM approach against message passing
    on the same hardware . The finding was that SVM
    could achieve good performance without the low-level

    complexity of managing explicit messages, though
    the best results often came from a hybrid approach (sic!)
    Here is an interesting baseline, from Java,
    a class ElevenSingle that only does:

    -a-a-a-a public static void run() {
    -a-a-a-a-a-a-a-a for (int A = 1; A < 192; A++) {
    -a-a-a-a-a-a-a-a-a-a-a-a int Y = (771-A)/3;
    -a-a-a-a-a-a-a-a-a-a-a-a for (int B = A; B < Y; B++) {
    -a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a int Z = (771-A-B)/2;
    -a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a for (int C = B; C < Z; C++) {
    -a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a int D = 711-A-B-C;
    -a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a if (A*B*C == 711000000/D &&
    -a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a 711000000 % D == 0)
    -a-a-a-a System.out.println("A="+A+", B="+B+", C="+C+", D="+D);
    -a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a }
    -a-a-a-a-a-a-a-a-a-a-a-a }
    -a-a-a-a-a-a-a-a }
    -a-a-a-a }

    And then compare it to ElevenMulti, doing some
    Work Balancing Scheduler Tetris Game with 8 cores:

    ElevenSingle
    A=120, B=125, C=150, D=316
    6.628 ms

    ElevenMulti
    A=120, B=125, C=150, D=316
    1.941 ms

    Not great, not terrible!

    Bye


    Feel free to also do these more logic tiling
    experiments than signal processing experiments.
    I don't do signal process with pi-WAM.

    Bye

    Johann 'Myrkraverk' Oskarsson schrieb:
    On 29/07/2026 5:46 PM, Mild Shock wrote:
    Hi,

    Your strictness is your problem , not mine.
    The WebGPU / WGSL has explicitly an API
    for so called compute shaders.

    You can also combine compute shaders and
    render shaders. But to use compute shaders
    for AI acceration is not uncommon now.

    I know it's extremely common.-a I just don't do it myself.

    I don't even know what kind of GPU I have.-a That's as much I care about GPUs.-a I only need my GPU to handle OpenGL 4.6.

    Because we're in comp.lang.c, and I write my graphics in C, and not C++. Nor Fortran 77, like my copy of /Digital Image Processing/ by Gonzales & Woods.-a Just take a look at page 127, and bask in the glory of the /Fast Fourier Transform/ in Fortran 77.

    That said, I kind of like classic Fortran, like 77, IV; and recently I learned there was Fortran 66.-a I either didn't know that, or just completely forgot about it.


    Happy C coding, or Fortran 77!

    --- Synchronet 3.22a-Linux NewsLink 1.2