.TH "fi_direct" "7" "2017\-04\-13" "Libfabric Programmer\[aq]s Manual" "\@VERSION\@" .SH NAME .PP Direct fabric provider access .SH SYNOPSIS .IP .nf \f[C] \-DFABRIC_DIRECT #define\ FABRIC_DIRECT \f[] .fi .PP Fabric direct provides a mechanism for applications to compile against a specific fabric providers without going through the libfabric framework or function vector tables. This allows for extreme optimization via function inlining at the cost of supporting multiple providers or different versions of the same provider. .SH DESCRIPTION .PP The use of fabric direct is intended only for applications that require the absolute minimum software latency, and are willing to re\-compile for specific fabric hardware. Providers that support fabric direct implement their own versions of the static inline calls which are define in the libfabric header files, define selected enum values, and provide defines for compile\-time optimizations. Applications can then code against the standard libfabric calls, but link directly against the provider calls by defining FABRIC_DIRECT as part of their build. .PP In general, the use of fabric direct does not require application source code changes, and, instead, is limited to the build process. .PP Providers supporting fabric direct must install \[aq]direct\[aq] versions of all libfabric header files. For convenience, the libfabric sources contain sample header files that may be modified by a provider. The \[aq]direct\[aq] header file names have \[aq]fi_direct\[aq] as their prefix: fi_direct.h, fi_direct_endpoint.h, etc. .PP Direct providers are prohibited from overriding or modifying existing data structures. However, provider specific extensions are still available. In addition to provider direct function calls to provider code, a fabric direct provider may define zero of more of the following capability definitions. Applications can check for these capabilities in order to optimize code paths at compile time, versus relying on run\-time checks. .SH CAPABILITY DEFINITIONS .PP In order that application code may be optimized during compile time, direct providers must provide definitions for various capabilities and modes, if those capabilities are supported. The following #define values may be used by an application to test for provider support of supported features. .PP \f[I]FI_DIRECT_CONTEXT\f[] : The provider sets FI_CONTEXT or FI_CONTEXT2 for fi_info:mode. See fi_getinfo for additional details. When FI_DIRECT_CONTEXT is defined, applications should use struct fi_context in their definitions, even if FI_CONTEXT2 is set. .PP \f[I]FI_DIRECT_LOCAL_MR\f[] : The provider sets FI_LOCAL_MR for fi_info:mode. See fi_getinfo for additional details. .SH SEE ALSO .PP \f[C]fi_getinfo\f[](3), \f[C]fi_endpoint\f[](3), \f[C]fi_domain\f[](3) .SH AUTHORS OpenFabrics.