NO

Author Topic: linking ispc binaries.  (Read 6018 times)

danz68

  • Guest
linking ispc binaries.
« on: October 08, 2019, 02:57:33 PM »
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.


Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: linking ispc binaries.
« Reply #1 on: October 08, 2019, 03:32:00 PM »
While waiting experts.

ispc generate normal object files, like PE-COFF.
tested simple example.
Code: [Select]
#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;
}
« Last Edit: October 08, 2019, 10:03:43 PM by TimoVJL »
May the source be with you

danz68

  • Guest
Re: linking ispc binaries.
« Reply #2 on: October 09, 2019, 12:50:55 PM »
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?

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: linking ispc binaries.
« Reply #3 on: October 13, 2019, 10:26:24 PM »
While waiting experts.
I'm waiting too...
/Pelle