device/gpu/api_internal/nn_device_api.cpp
/*
Opens interface: fills structure with function pointers that client/scheduler can use.

If succeeds returns non-negative value.
If fails returns negative error-code.[TODO]
*/
Opens interface: fills structure with function pointers that client/scheduler can use.
If succeeds returns non-negative value.
If fails returns negative error-code.[TODO]
Opens interface : fills structure with function pointers that client / scheduler can use . If succeeds returns non - negative value . If fails returns negative error - code . [ TODO ]
int32_t nn_device_interface_open(
    uint32_t version,               
    void *const device_interface    
) {
    if(!device_interface) return -2;
    switch(version) {
    default:
        return -1;
    case 0:
        std::memcpy(device_interface, &device_interface_0, sizeof(device_interface_0));
        return 0;
    }
}
int32_t nn_device_interface_open ( uint32_t version , void * const device_interface ) { if ( ! device_interface ) return -2 ; switch ( version ) { default : return -1 ; case 0 : std :: memcpy ( device_interface , & device_interface_0 , sizeof ( device_interface_0 ) ) ; return 0 ; } }
Opens interface: fills structure with function pointers that client/scheduler can use.
Opens interface : fills structure with function pointers that client / scheduler can use .
/* version of interface to create */ /* pointer to interface structure */