text: //==============================================================================
  //
  //  Copyright (c) 2017-2019 Qualcomm Technologies, Inc.
  //  All Rights Reserved.
  //  Confidential and Proprietary - Qualcomm Technologies, Inc.
  //
  //==============================================================================
  
  #include <vector>
  #include <string>
  #include <unordered_map>
  
  #include "SNPE/SNPE.hpp"
  #include "DlSystem/IUserBuffer.hpp"
  #include "DlSystem/UserBufferMap.hpp"
  
  typedef unsigned int GLuint;
  
  // Helper function to fill a single entry of the UserBufferMap with the given user-backed buffer
  void createUserBuffer(zdl::DlSystem::UserBufferMap& userBufferMap,
                        std::unordered_map<std::string, std::vector<uint8_t>>& applicationBuffers,
                        std::vector<std::unique_ptr<zdl::DlSystem::IUserBuffer>>& snpeUserBackedBuffers,
                        std::unique_ptr<zdl::SNPE::SNPE>& snpe,
                        const char * name,
                        const bool isTf8Buffer);
  
  // Create a UserBufferMap of the SNPE network inputs
  void createInputBufferMap(zdl::DlSystem::UserBufferMap& inputMap,
                            std::unordered_map<std::string, std::vector<uint8_t>>& applicationBuffers,
                            std::vector<std::unique_ptr<zdl::DlSystem::IUserBuffer>>& snpeUserBackedBuffers,
                            std::unique_ptr<zdl::SNPE::SNPE>& snpe,
                            const bool isTf8Buffer);
  
  // Create a UserBufferMap of the SNPE network outputs
  void createOutputBufferMap(zdl::DlSystem::UserBufferMap& outputMap,
                             std::unordered_map<std::string, std::vector<uint8_t>>& applicationBuffers,
                             std::vector<std::unique_ptr<zdl::DlSystem::IUserBuffer>>& snpeUserBackedBuffers,
                             std::unique_ptr<zdl::SNPE::SNPE>& snpe,
                             const bool isTf8Buffer);
  
  void createUserBuffer(zdl::DlSystem::UserBufferMap& userBufferMap,
                        std::unordered_map<std::string, GLuint>& applicationBuffers,
                        std::vector<std::unique_ptr<zdl::DlSystem::IUserBuffer>>& snpeUserBackedBuffers,
                        std::unique_ptr<zdl::SNPE::SNPE>& snpe,
                        const char * name);
  
  void createInputBufferMap(zdl::DlSystem::UserBufferMap& inputMap,
                            std::unordered_map<std::string, GLuint>& applicationBuffers,
                            std::vector<std::unique_ptr<zdl::DlSystem::IUserBuffer>>& snpeUserBackedBuffers,
                            std::unique_ptr<zdl::SNPE::SNPE>& snpe);
  