Vulkan視頻解碼decode顯示display之同步

在ReleaseDisplayedPicture函數中消耗圖片資源并且顯示display完成,設置兩個標志m_hasConsummerSignalFence = true 和m_hasConsummerSignalSemaphore = true
? ? virtual int32_t ReleaseDisplayedPicture(DecodedFrameRelease** pDecodedFramesRelease, uint32_t numFramesToRelease)
? ? {
? ? ? ? std::lock_guard<std::mutex> lock(m_displayQueueMutex);
? ? ? ? for (uint32_t i = 0; i < numFramesToRelease; i++) {
? ? ? ? ? ? const DecodedFrameRelease* pDecodedFrameRelease = pDecodedFramesRelease[i];
? ? ? ? ? ? int picId = pDecodedFrameRelease->pictureIndex;
? ? ? ? ? ? assert((picId >= 0) && ((uint32_t)picId < m_perFrameDecodeImageSet.size()));

? ? ? ? ? ? assert(m_perFrameDecodeImageSet[picId].m_decodeOrder == pDecodedFrameRelease->decodeOrder);
? ? ? ? ? ? assert(m_perFrameDecodeImageSet[picId].m_displayOrder == pDecodedFrameRelease->displayOrder);

? ? ? ? ? ? assert(m_ownedByDisplayMask & (1 << picId));
? ? ? ? ? ? m_ownedByDisplayMask &= ~(1 << picId);
? ? ? ? ? ? m_perFrameDecodeImageSet[picId].m_inDecodeQueue = false;
? ? ? ? ? ? m_perFrameDecodeImageSet[picId].m_ownedByConsummer = false;
? ? ? ? ? ? m_perFrameDecodeImageSet[picId].Release();

? ? ? ? ? ? m_perFrameDecodeImageSet[picId].m_hasConsummerSignalFence = pDecodedFrameRelease->hasConsummerSignalFence;
? ? ? ? ? ? m_perFrameDecodeImageSet[picId].m_hasConsummerSignalSemaphore = pDecodedFrameRelease->hasConsummerSignalSemaphore;

? ? ? ? }
? ? ? ? return 0;
? ? }

ReleaseDisplayedPicture被ReleaseFrame調用,pLastDecodedFrame就是當前已經解碼的幀

.....................................

? ? ? ? m_videoQueue->ReleaseFrame(pLastDecodedFrame);

? ? ? ? pLastDecodedFrame->Reset();

? ? ? ? bool endOfStream = false;
? ? ? ? int32_t numVideoFrames = 0;

? ? ? ? numVideoFrames = m_videoQueue->GetNextFrame(pLastDecodedFrame, &endOfStream);

.............................................

//-----------------------------------------------------------------------

這兩個標志一旦設置為true,在QueuePictureForDecode函數中,將設置pFrameSynchronizationInfo->frameConsumerDoneFence和 pFrameSynchronizationInfo->frameConsumerDoneSemaphore,返回后使用,同時重置兩個標志為false

? ? virtual int32_t QueuePictureForDecode(int8_t picId, VkParserDecodePictureInfo* pDecodePictureInfo,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ReferencedObjectsInfo* pReferencedObjectsInfo,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? FrameSynchronizationInfo* pFrameSynchronizationInfo)
? ? {
? ? ? ? if (pFrameSynchronizationInfo->hasFrameCompleteSignalFence) {
? ? ? ? ? ? pFrameSynchronizationInfo->frameCompleteFence = m_perFrameDecodeImageSet[picId].m_frameCompleteFence;
? ? ? ? ? ? if (pFrameSynchronizationInfo->frameCompleteFence) {
? ? ? ? ? ? ? ? m_perFrameDecodeImageSet[picId].m_hasFrameCompleteSignalFence = true;
? ? ? ? ? ? }
? ? ? ? }

? ? ? ? if (m_perFrameDecodeImageSet[picId].m_hasConsummerSignalFence) {
? ? ? ? ? ? pFrameSynchronizationInfo->frameConsumerDoneFence = m_perFrameDecodeImageSet[picId].m_frameConsumerDoneFence;
? ? ? ? ? ? m_perFrameDecodeImageSet[picId].m_hasConsummerSignalFence = false;
? ? ? ? }

? ? ? ? if (pFrameSynchronizationInfo->hasFrameCompleteSignalSemaphore) {
? ? ? ? ? ? pFrameSynchronizationInfo->frameCompleteSemaphore = m_perFrameDecodeImageSet[picId].m_frameCompleteSemaphore;
? ? ? ? ? ? if (pFrameSynchronizationInfo->frameCompleteSemaphore) {
? ? ? ? ? ? ? ? m_perFrameDecodeImageSet[picId].m_hasFrameCompleteSignalSemaphore = true;
? ? ? ? ? ? }
? ? ? ? }

? ? ? ? if (m_perFrameDecodeImageSet[picId].m_hasConsummerSignalSemaphore) {
? ? ? ? ? ? pFrameSynchronizationInfo->frameConsumerDoneSemaphore = m_perFrameDecodeImageSet[picId].m_frameConsumerDoneSemaphore;
? ? ? ? ? ? m_perFrameDecodeImageSet[picId].m_hasConsummerSignalSemaphore = false;
? ? ? ? }
.................

}

返回后如何使用pFrameSynchronizationInfo->frameConsumerDoneFence和 pFrameSynchronizationInfo->frameConsumerDoneSemaphore,代碼如下:

? ? VkFence frameCompleteFence = frameSynchronizationInfo.frameCompleteFence;
? ? VkSemaphore frameCompleteSemaphore = frameSynchronizationInfo.frameCompleteSemaphore;
? ? VkSemaphore frameConsumerDoneSemaphore = frameSynchronizationInfo.frameConsumerDoneSemaphore;

? ? uint32_t waitSemaphoreCount = 0;
? ? if (frameConsumerDoneSemaphore != VK_NULL_HANDLE) {
? ? ? ?
waitSemaphores[waitSemaphoreCount] = frameConsumerDoneSemaphore;
? ? ? ? waitSemaphoreCount++;
? ? }

? ? VkSubmitInfo submitInfo = { VK_STRUCTURE_TYPE_SUBMIT_INFO, nullptr };
? ? const VkPipelineStageFlags videoDecodeSubmitWaitStages = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT;
? ? submitInfo.pNext = (m_hwLoadBalancingTimelineSemaphore != VK_NULL_HANDLE) ? &timelineSemaphoreInfos : nullptr;
? ? submitInfo.waitSemaphoreCount = waitSemaphoreCount;
? ? submitInfo.pWaitSemaphores = waitSemaphores;
? ? submitInfo.pWaitDstStageMask = &videoDecodeSubmitWaitStages;
? ? submitInfo.commandBufferCount = 1;
? ? submitInfo.pCommandBuffers = &frameDataSlot.commandBuffer;
? ? submitInfo.signalSemaphoreCount = signalSemaphoreCount;
? ? submitInfo.pSignalSemaphores = signalSemaphores;

? ? assert(VK_NOT_READY == m_vkDevCtx->GetFenceStatus(*m_vkDevCtx, videoDecodeCompleteFence));
? ? VkResult result = m_vkDevCtx->MultiThreadedQueueSubmit(VulkanDeviceContext::DECODE, m_currentVideoQueueIndx,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?1, &submitInfo, videoDecodeCompleteFence);

拷貝pictureIndex視頻幀,并進行等待解碼完成并且設置顯示完成信號

? ? virtual int32_t DequeueDecodedPicture(VulkanDecodedFrame* pDecodedFrame)
? ? {


? ? ? ? ? ? if (m_perFrameDecodeImageSet[pictureIndex].m_hasFrameCompleteSignalFence) {
? ? ? ? ? ? ? ? pDecodedFrame->frameCompleteFence = m_perFrameDecodeImageSet[pictureIndex].m_frameCompleteFence;
? ? ? ? ? ? ? ? m_perFrameDecodeImageSet[pictureIndex].m_hasFrameCompleteSignalFence = false;
? ? ? ? ? ? } else {
? ? ? ? ? ? ? ? pDecodedFrame->frameCompleteFence = VkFence();
? ? ? ? ? ? }

? ? ? ? ? ? if (m_perFrameDecodeImageSet[pictureIndex].m_hasFrameCompleteSignalSemaphore) {
? ? ? ? ? ? ? ? pDecodedFrame->frameCompleteSemaphore = m_perFrameDecodeImageSet[pictureIndex].m_frameCompleteSemaphore;
? ? ? ? ? ? ? ? m_perFrameDecodeImageSet[pictureIndex].m_hasFrameCompleteSignalSemaphore = false;
? ? ? ? ? ? } else {
? ? ? ? ? ? ? ? pDecodedFrame->frameCompleteSemaphore = VkSemaphore();
? ? ? ? ? ? }

? ? ? ? ? ? pDecodedFrame->frameConsumerDoneFence = m_perFrameDecodeImageSet[pictureIndex].m_frameConsumerDoneFence;
? ? ? ? ? ? pDecodedFrame->frameConsumerDoneSemaphore = m_perFrameDecodeImageSet[pictureIndex].m_frameConsumerDoneSemaphore;

? ? ? ? ? ? pDecodedFrame->timestamp = m_perFrameDecodeImageSet[pictureIndex].m_timestamp;
? ? ? ? ? ? pDecodedFrame->decodeOrder = m_perFrameDecodeImageSet[pictureIndex].m_decodeOrder;
? ? ? ? ? ? pDecodedFrame->displayOrder = m_perFrameDecodeImageSet[pictureIndex].m_displayOrder;

? ? ? ? ? ? pDecodedFrame->queryPool = m_queryPool;
? ? ? ? ? ? pDecodedFrame->startQueryId = pictureIndex;
? ? ? ? ? ? pDecodedFrame->numQueries = 1;

}

//pDecodedFrame傳遞給DrawFrame最后一個參數pLastDecodedFrame

? ? VkResult result = DrawFrame(renderIndex,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? waitSemaphoreCount,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? pWaitSemaphores,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? signalSemaphoreCount,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? pSignalSemaphores,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? pLastDecodedFrame)

VkResult VulkanFrame<FrameDataType>::DrawFrame( int32_t ? ? ? ? ? ?renderIndex,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? uint32_t ? ? ? ? ? waitSemaphoreCount,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? const VkSemaphore* pWaitSemaphores,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? uint32_t ? ? ? ? ? signalSemaphoreCount,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? const VkSemaphore* pSignalSemaphores,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? FrameDataType* ? ? inFrame)

{


? ? const uint32_t maxWaitSemaphores = 2;
? ? uint32_t numWaitSemaphores = 0;
? ? VkSemaphore waitSemaphores[maxWaitSemaphores] = {};

? ? assert(waitSemaphoreCount <= 1);
? ? if ((waitSemaphoreCount > 0) && (pWaitSemaphores != nullptr)) {

//這個是等待上一次present完成
? ? ? ? waitSemaphores[numWaitSemaphores++] = *pWaitSemaphores;
? ? }

? ? if (inFrame && (inFrame->frameCompleteSemaphore != VkSemaphore())) {

//等待解碼完成信號
? ? ? ? waitSemaphores[numWaitSemaphores++] = inFrame->frameCompleteSemaphore;
? ? }
? ? assert(numWaitSemaphores <= maxWaitSemaphores);

? ? const uint32_t maxSignalSemaphores = 2;
? ? uint32_t numSignalSemaphores = 0;
? ? VkSemaphore signalSemaphores[maxSignalSemaphores] = {};

? ? assert(signalSemaphoreCount <= 1);
? ? if ((signalSemaphoreCount > 0) && (pSignalSemaphores != nullptr)) {
? ? ? ? signalSemaphores[numSignalSemaphores++] = *pSignalSemaphores;
? ? }

? ? if (inFrame && (inFrame->frameConsumerDoneSemaphore != VkSemaphore())) {

//顯示完成消費信號激活,這樣這個圖片資源才能被用來繼續解碼新視頻幀,解碼函數中需要等待這個frameConsumerDoneSemaphore有信號才能使用這個圖片資源解碼
? ? ? ? signalSemaphores[numSignalSemaphores++] = inFrame->frameConsumerDoneSemaphore;
? ? ? ? inFrame->hasConsummerSignalSemaphore = true;
? ? }
? ? assert(numSignalSemaphores <= maxSignalSemaphores);

? ? if (frameConsumerDoneFence != VkFence()) {
? ? ? ? inFrame->hasConsummerSignalFence = true;
? ? }


? ? // Wait for the image to be owned and signal for render completion
? ? VkPipelineStageFlags primaryCmdSubmitWaitStages[2] = { VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT };
? ? VkSubmitInfo primaryCmdSubmitInfo = VkSubmitInfo();
? ? primaryCmdSubmitInfo.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
? ? primaryCmdSubmitInfo.pWaitDstStageMask = primaryCmdSubmitWaitStages;
? ? primaryCmdSubmitInfo.commandBufferCount = 1;

? ? primaryCmdSubmitInfo.waitSemaphoreCount = numWaitSemaphores;
? ? primaryCmdSubmitInfo.pWaitSemaphores = numWaitSemaphores ? waitSemaphores : NULL;
? ? primaryCmdSubmitInfo.pCommandBuffers = pPerDrawContext->commandBuffer.GetCommandBuffer();

? ? primaryCmdSubmitInfo.signalSemaphoreCount = numSignalSemaphores;
? ? primaryCmdSubmitInfo.pSignalSemaphores = numSignalSemaphores ? signalSemaphores : NULL;

? ? // For fence/sync debugging
? ? if (false && inFrame && inFrame->frameCompleteFence) {
? ? ? ? result = m_vkDevCtx->WaitForFences(*m_vkDevCtx, 1, &inFrame->frameCompleteFence, true, 100 * 1000 * 1000);
? ? ? ? assert(result == VK_SUCCESS);
? ? ? ? if (result != VK_SUCCESS) {
? ? ? ? ? ? fprintf(stderr, "\nERROR: WaitForFences() result: 0x%x\n", result);
? ? ? ? }
? ? ? ? result = m_vkDevCtx->GetFenceStatus(*m_vkDevCtx, inFrame->frameCompleteFence);
? ? ? ? assert(result == VK_SUCCESS);
? ? ? ? if (result != VK_SUCCESS) {
? ? ? ? ? ? fprintf(stderr, "\nERROR: GetFenceStatus() result: 0x%x\n", result);
? ? ? ? }
? ? }

? ? result = m_vkDevCtx->MultiThreadedQueueSubmit(VulkanDeviceContext::GRAPHICS, 0, 1, &primaryCmdSubmitInfo, frameConsumerDoneFence);
? ? if (result != VK_SUCCESS) {
? ? ? ? assert(result == VK_SUCCESS);
? ? ? ? fprintf(stderr, "\nERROR: MultiThreadedQueueSubmit() result: 0x%x\n", result);
? ? ? ? return result;
? ? }

? ? if (false && (frameConsumerDoneFence != VkFence())) { // For fence/sync debugging
? ? ? ? const uint64_t fenceTimeout = 100 * 1000 * 1000 /* 100 mSec */;
? ? ? ? result = m_vkDevCtx->WaitForFences(*m_vkDevCtx, 1, &frameConsumerDoneFence, true, fenceTimeout);
? ? ? ? assert(result == VK_SUCCESS);
? ? ? ? if (result != VK_SUCCESS) {
? ? ? ? ? ? fprintf(stderr, "\nERROR: WaitForFences() result: 0x%x\n", result);
? ? ? ? }
? ? ? ? result = m_vkDevCtx->GetFenceStatus(*m_vkDevCtx, frameConsumerDoneFence);
? ? ? ? assert(result == VK_SUCCESS);
? ? ? ? if (result != VK_SUCCESS) {
? ? ? ? ? ? fprintf(stderr, "\nERROR: GetFenceStatus() result: 0x%x\n", result);
? ? ? ? }
? ? }

#if 0 // for testing VK_KHR_external_fence_fd
? ? int fd = -1; // VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT
? ? const VkFenceGetFdInfoKHR getFdInfo = ?{ VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR, NULL, data.lastDecodedFrame.frameConsumerDoneFence, VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT};
? ? res = m_vkDevCtx->GetFenceFdKHR(*m_vkDevCtx, &getFdInfo, &fd);
? ? close(fd);
#endif

? ? m_frameDataIndex = (m_frameDataIndex + 1) % m_frameData.size();

? ? return result;

}

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/pingmian/72458.shtml
繁體地址,請注明出處:http://hk.pswp.cn/pingmian/72458.shtml
英文地址,請注明出處:http://en.pswp.cn/pingmian/72458.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

網絡空間安全(32)Kali MSF基本介紹

前言 Metasploit Framework&#xff08;簡稱MSF&#xff09;是一款功能強大的開源安全漏洞檢測工具&#xff0c;被廣泛應用于滲透測試中。它內置了數千個已知的軟件漏洞&#xff0c;并持續更新以應對新興的安全威脅。MSF不僅限于漏洞利用&#xff0c;還包括信息收集、漏洞探測和…

設計模式學習記錄

設計模式23種 創建型抽象工廠模式工廠模式生成器模式原型模式單例模式 結構型適配器模式橋接模式組合模式裝飾模式外觀模式享元模式代理模式 行為型責任鏈模式命令模式解釋器模式迭代器模式中介者模式備忘錄模式觀察者模式狀態模式策略模式模版方法模式訪問者模式 創建型 與對…

2.5 python接口編程

在現代軟件開發的復雜生態系統中&#xff0c;不同系統、模塊之間的交互協作至關重要。接口編程作為一種關鍵機制&#xff0c;定義了組件之間的通信規范與交互方式。Python 憑借其卓越的靈活性、豐富的庫資源以及簡潔易讀的語法&#xff0c;在接口編程領域占據了重要地位&#x…

mesh開發解析

開源的Mesh網絡協議棧及相關項目&#xff1a; 1.B.A.T.M.A.N.(Better Approach to Mobile Ad-hoc Networking)? 簡介&#xff1a;B.A.T.M.A.N.是一種用于多跳自組織網絡的路由協議&#xff0c;適用于無線Mesh網絡。它通過優化數據傳輸路徑&#xff0c;確保網絡的高可靠性和動…

PyTorch PINN實戰:用深度學習求解微分方程

在人工智能與計算數學的交匯點&#xff0c;物理信息神經網絡&#xff08;Physics-Informed Neural Networks&#xff0c;PINN&#xff09;正引領著一場求解微分方程的革命。傳統上&#xff0c;微分方程是描述自然現象和工程問題中各種關系的重要工具&#xff0c;但其求解往往依…

【WiFi 7核心技術及未來挑戰】

作為剛剛開始從事這一領域的人&#xff0c;淺淺學習了一下WiFi 7&#xff08;IEEE 802.11be&#xff09;。Wi-Fi 7發展迅速&#xff0c;提供前所未有的速度、更低的延遲和更高的可靠性。但從頻譜政策到能效挑戰&#xff0c;再到成本&#xff0c;仍有許多問題亟待解決。 Wi-Fi 7…

Oracle Linux Server 7.9安裝fail2ban

yum search oracle-epel-release yum install oracle-epel-release-el7 search fail2ban yum install fail2ban nano /etc/fail2ban/jail.d/00-firewalld.conf # defalut這里是設定全局設置&#xff0c;如果下面的監控沒有設置就以全局設置的值設置。 [DEFAULT] # 用于指定哪…

目標在哪里?——尋找人生的意義與方向

在職場中&#xff0c;許多人都會經歷這樣的困惑&#xff1a;工作看似順利&#xff0c;卻逐漸失去了成就感和成長感。一位在500強企業工作的學員就遇到了這樣的問題。她曾考慮過轉型做培訓&#xff0c;但苦于找不到明確的切入點&#xff0c;對未來的目標感到迷茫。她不禁問自己&…

C++類與對象——拷貝構造與運算符重載

拷貝構造函數和賦值運算符重載就是C類默認六個函數之二。 拷貝構造函數&#xff1a; 如果?個構造函數的第?個參數是自身類類型的引用&#xff0c;且任何額外的參數都有默認值&#xff0c;則此構造函數 也叫做拷貝構造函數&#xff0c;也就是說拷貝構造是?個特殊的構造函數…

破碎的誓言

破碎的誓言 在秋風的呢喃中&#xff0c;落葉輕嘆&#xff0c; 昔日的誓言&#xff0c;如煙消散。 你的眼眸&#xff0c;曾是我星辰的指引&#xff0c; 如今&#xff0c;卻成了最深的迷惘。 欺騙的利刃&#xff0c;刺穿了信任的堡壘&#xff0c; 我的心&#xff0c;如裂開…

AD畫板學習

AD畫板 01 課程簡介及學習目標 &#xff08;1&#xff09;能熟練的新建項目文件、原理圖文件、PCB文件且修改文件名&#xff0c;并知道文件保存的位置&#xff1b; &#xff08;2&#xff09;會設置原理圖編輯器的工作環境&#xff0c;會自底向上繪制層次原理圖&#xff1b; …

Linux:進程程序替換

目錄 前言 一 進程程序替換的概念 二 進程程序替換的原理 三 為什么需要進行進程程序替換 四 如何進行進程程序替換 1. 進程替換函數 ? execl()函數 ?execv()函數 ?execlp()函數 ?execle()函數 ?execve()* 前言 一般情況下&#xff0c;對應的語言寫的程序只…

基于變分推理與 Best?of?N 策略的元 Prompt 自動生成與優化框架

摘要 本文提出了一種融合變分推理與 Best?of?N 策略的元 Prompt 自動生成與優化框架&#xff0c;通過高度參數化的模板、隨機擾動采樣及多指標評分機制&#xff0c;實現從初始提示生成到最終輸出的動態優化。同時&#xff0c;針對實際應用中對自適應參數調整、深層語義理解、…

Umi-OCR 全家桶

介紹&#xff1a; 下載 訪問官網地址 https://github.com/hiroi-sora/umi-ocrhttps://github.com/hiroi-sora/umi-ocr 點擊下載&#xff08;.exe 文件 安裝即可&#xff09; 桌面使用 安裝完畢后去安裝路徑下點擊 Umi-OCR.exe &#xff08;默認不會生成桌面的快捷方式&…

2023南京理工大學計算機復試上機真題

2023南京理工大學計算機復試上機真題 2023南京理工大學計算機復試機試真題 歷年南京理工大學計算機復試上機真題 在線評測&#xff1a;傳送門&#xff1a;pgcode.cn 括號匹配二 題目描述 苗苗今天剛剛學會使用括號&#xff0c;不過他分不清小括號&#xff0c;中括號&#…

Conda 常規用法指南

Conda 常規用法指南 1. Conda 簡介 Conda 是一個開源的包管理和環境管理系統&#xff0c;主要用于 Python 和其他編程語言的開發環境。它能夠方便地安裝、更新和管理依賴項&#xff0c;使得不同項目可以使用不同的 Python 版本和庫。 2. Conda 環境管理 2.1 創建新的環境 conda…

非零初始條件系統的傳遞函數分析

非零初始條件系統的傳遞函數分析 在傳遞函數的定義中&#xff0c;通常假設系統滿足零初始條件。然而在實際應用中&#xff0c;很多系統需要處理非零初始狀態。為了探討這一問題&#xff0c;我們以一個一階微分方程為例進行分析。 一、一階系統的分析 考慮以下一階微分方程&a…

centos7安裝時采用的默認分區(比如:/dev/sda3的對應掛載點是/),如何對系統擴容?

?非LVM分區擴容方案? 若 /dev/sda3 是?非LVM分區?且存儲重要數據&#xff0c;可通過 ?直接擴展分區容量? ?調整文件系統? 實現擴容&#xff0c;無需重建LVM或格式化分區?。以下是具體步驟&#xff1a; ?1. 擴展物理磁盤&#xff08;虛擬機場景&#xff09;? ?關…

Axios簡單說明,快速上手

Ajax&#xff1a;異步的JavaScript和XML 作用&#xff1a; 數據交換異步交互 Axios&#xff1a;就是對原生Ajax進行封裝&#xff0c;簡化書寫&#xff0c;快速開發 使用邏輯&#xff1a; 首先要安裝Axios&#xff0c;可以通過npm在項目中安裝&#xff1a; 打開命令行工具…

模型評估——acc、P、R、F值、交叉驗證、K折交叉驗證

模型評估&#xff1a;對預測函數地預測精度的評估。 多重回歸&#xff1a;涉及三個及其以上的變量的回歸問題。 評估模型的方法&#xff1a; 交叉驗證&#xff1a;將數據集分成測試集和訓練集&#xff0c;可以采用3&#xff1a;7或者2&#xff1a;8的比例方式進行劃分&#xff…