Turi Create  4.0
turi::function_closure_info Struct Reference

#include <model_server/lib/api/function_closure_info.hpp>

Detailed Description

Describes a function capture closure.

Defines a closure class describing a lambda closure. Contains 2 fields:

Parameters
native_fn_nameThe toolkit native function name
argumentsAn array of the same length as the toolkit native function. Each array element is an array of 2 elements [is_capture, value]
If is_capture == 1:
value contains the captured value
If is_capture == 0:
value contains a number denoting the lambda argument position.

Example:

lambda x, y: fn(10, x, x, y)

Then arguments will be

[1, 10], -->  is captured value. has value 10
[0, 0],  -->  is not captured value. is argument 0 of the lambda.
[0, 0],  -->  is not captured value. is argument 0 of the lambda.
[0, 1]   -->  is not captured value. is argument 1 of the lambda.

Definition at line 47 of file function_closure_info.hpp.


The documentation for this struct was generated from the following file: