linking ispc binaries.

Started by danz68, October 08, 2019, 02:57:33 PM

Previous topic - Next topic

danz68

Hi there,

Is it any possibility to link object files generated by ISPC
(https://ispc.github.io/ispc.html) with PellesC suite?

Same question for linking Microsoft libraries.

Thank you.


TimoVJL

#1
While waiting experts.

ispc generate normal object files, like PE-COFF.
tested simple example.#include <stdio.h>
#include <stdlib.h>
// Include the header file that the ispc compiler generates
#include "simple_ispc.h"
//using namespace ispc;
#pragma comment(linker, "simple_ispc.o")

int main(void) {
    float vin[16], vout[16];

    // Initialize input buffer
    for (int i = 0; i < 16; ++i)
        vin[i] = (float)i;

    // Call simple() function from simple.ispc file
    simple(vin, vout, 16);

    // Print results
    for (int i = 0; i < 16; ++i)
        printf("%d: simple(%f) = %f\n", i, vin[i], vout[i]);

    return 0;
}
May the source be with you

danz68

These are great news.

I tried a similar test (custom code though), making a DLL and error was there.
(don't remember now error or code, I tried a couple of times then I gave up. It must be something else wrong).

Any new version since 9.00 Aug 2018?

Pelle

/Pelle