[][src]Crate ispc_rt

A small library meant to be used as a build dependency with Cargo for easily integrating ISPC code into Rust projects. The ispc_rt crate is specifically targetted at linking with a previously compiled ISPC library and generated bindings (built with ispc_compile), to allow end users to link ISPC code without needing the ISPC compiler or clang.

This crate also includes the various runtime components for the ISPC language, including the parallel task system and performance instrumentation.


pub use task::ISPCTaskFn;
pub use exec::TaskSystem;
pub use exec::Parallel;
pub use instrument::Instrument;
pub use instrument::SimpleInstrument;



Defines the trait that must be implemented by ISPC task execution systems and provides a default threaded one for use.


Defines the trait that must be implemented by ISPC instrumentation callbacks structs and provides a default one.


Defines structs for operating on ISPC task groups and getting chunks of a task to be scheduled on to threads



Convenience macro for generating the module to hold the raw/unsafe ISPC bindings.



A PackagedModule refers to an ISPC module which was previously built using ispc_compile, and is now distributed with the crate.



Print out a summary of performace data gathered from instrumenting ISPC. Must enable instrumenting to have this record and print data, see Config::instrument.


If you have implemented your own instrument for logging ISPC performance data you can use this function to provide it for use instead of the default one. This function must be called before calling into ISPC code, otherwise the instrumenter will already be set to the default.


If you have implemented your own task system you can provide it for use instead of the default threaded one. This must be done prior to calling ISPC code which spawns tasks otherwise the task system will have already been initialized to Parallel, which you can also see as an example for implementing a task system.