Is it possible to let LibraryLink return multiple results?

I have used the LibraryLink wrapper for some days. In general, there is only one result retruned by the LibraryFunction[]. Below is a simple example:

DLLEXPORT int add1(WolframLibraryData libData, mint Argc, MArgument *Args, MArgument Res) {     mint I0;     mint I1;     I0 = MArgument_getInteger(Args[0]);     I1 = I0 + 1;     MArgument_setInteger(Res, I1);     return LIBRARY_NO _ERROR; } 

However, in pratical applications, multiple results may also occur. For instance, I have a C function elevate_bspline_degree(), which has the following decalration:

void elevate_bspline_degree(double *Pw, double *U, int p) 

This function mainly elevates the degree of the B-spline from p to p + 1, and calculate the new control points and new knots vector via the pointer variables Pw and U, respectively. Lastly, Corresponding value will be returned by Pw and U.

Replay

Category: librarylink Time: 2016-07-30 Views: 0
Tags: librarylink

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.143 (s). 12 q(s)