chinese直男口爆体育生外卖, 99久久er热在这里只有精品99, 又色又爽又黄18禁美女裸身无遮挡, gogogo高清免费观看日本电视,私密按摩师高清版在线,人妻视频毛茸茸,91论坛 兴趣闲谈,欧美 亚洲 精品 8区,国产精品久久久久精品免费

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評論與回復
登錄后你可以
  • 下載海量資料
  • 學習在線課程
  • 觀看技術視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會員中心
創(chuàng)作中心

完善資料讓更多小伙伴認識你,還能領取20積分哦,立即完善>

3天內不再提示

基于OpenHarmony標準系統(tǒng)的C++公共基礎類庫案例:Semaphore

福州市凌睿智捷電子有限公司 ? 2025-02-10 18:08 ? 次閱讀
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

1、程序簡介

該程序是基于OpenHarmony標準系統(tǒng)的C++公共基礎類庫的線程處理:Sempahore。

本案例完成如下工作:

(1)無名信號量使用方法

定義1個無名信號量,1個供無名信號量管理的公共資源變量;

創(chuàng)建5個線程,每個線程做5次for循環(huán),for循環(huán)的內容是獲取無名信號量,并修改公共資源變量;

(2)有名信號量使用方法

定義1個有名信號量,1個供有名信號量管理的公共資源變量;

創(chuàng)建1個線程A,通過Open獲取信號量,做5次for循環(huán),for循環(huán)的內容是通過Wait獲取有名信號量,如果獲取成功則修改公共資源變量(即累加1),最后釋放信號量;

創(chuàng)建1個線程B,通過Open獲取信號量,做5次for循環(huán),for循環(huán)的內容是通過TryWait獲取有名信號量,如果獲取成功則修改公共資源變量(即累加10),最后釋放信號量;

創(chuàng)建1個線程C,通過Open獲取信號量,做5次for循環(huán),for循環(huán)的內容是通過TimedWait獲取有名信號量,如果獲取成功則修改公共資源變量(即累加100),最后釋放信號量;

2、基礎知識

C++公共基礎類庫為標準系統(tǒng)提供了一些常用的C++開發(fā)工具類,包括:

文件、路徑、字符串相關操作的能力增強接口

讀寫鎖、信號量、定時器、線程增強及線程池等接口

安全數(shù)據(jù)容器、數(shù)據(jù)序列化等接口

各子系統(tǒng)的錯誤碼相關定義

2.1、添加C++公共基礎類庫依賴

修改需調用模塊的BUILD.gn,在external_deps或deps中添加如下:

ohos_shared_library("xxxxx") { ... external_deps = [ ... # 動態(tài)庫依賴(可選) "c_utils:utils", # 靜態(tài)庫依賴(可選) "c_utils:utilsbase", # Rust動態(tài)庫依賴(可選) "c_utils:utils_rust", ] ...}

一般而言,我們只需要填寫"c_utils:utils"即可。

2.2、Semaphore頭文件

C++公共基礎類庫的Semaphore頭文件在://commonlibrary/c_utils/base/include/semaphore_ex.h

可在源代碼中添加如下:

#include

OpenHarmony信號量根據(jù)種類可以分為有名信號量和無名信號量,所以命令空間如下:

(1)無名信號量命名空間

OHOS::Semaphore

(2)有名信號量命名空間

OHOS::NamedSemaphore

2.3、OHOS::Samaphore接口說明

Semaphore為無名信號量。

2.3.1、Samaphore

構造函數(shù), 構造一個Samaphore對象。

Semaphore(int value = 1);

參數(shù)說明:

參數(shù)名稱類型參數(shù)說明
valueint信號量當前資源數(shù)量

2.3.2、~Semaphore

析構函數(shù)。

~Semaphore();

2.3.3、Wait

等待/獲取信號量(即信號量 -1)。

void Wait();

2.3.4、Post

釋放信號量(即信號量 +1)。

void Post();

2.4、OHOS::NamedSemaphore接口說明

NamedSemaphore為有名信號量。

2.4.1、NamedSemaphore

構造函數(shù), 構造NamedSemaphore對象。

NamedSemaphore(size_t size)NamedSemaphore(const std::string& name, size_t size)

參數(shù)說明:

參數(shù)名稱類型參數(shù)說明
namestd::string信號量名稱
sizesize_t信號量有效資源數(shù)量

2.4.2、~NamedSemaphore

析構函數(shù)。

~NamedSemaphore();

2.4.3、Create

創(chuàng)建并初始化有名信號量。

bool Create();

返回值說明:

類型返回值說明
booltrue表示成功,false表示失敗

2.4.4、Unlink

將有名信號量文件從系統(tǒng)中刪除。

bool Unlink();

返回值說明:

類型返回值說明
booltrue表示成功,false表示失敗

2.4.5、Open

打開一個已經(jīng)創(chuàng)建的有名信號量文件。

bool Open();

返回值說明:

類型返回值說明
booltrue表示成功,false表示失敗

2.4.6、Close

關閉有名信號量。

bool Close();

返回值說明:

類型返回值說明
booltrue表示成功,false表示失敗

2.4.7、Wait

等待/獲取信號量(信號量 -1)。

bool Wait();

返回值說明:

類型返回值說明
booltrue表示成功,false表示失敗

2.4.8、TryWait

等待/獲取信號量(信號量 -1)的接口;非阻塞版。

bool TryWait();

返回值說明:

類型返回值說明
booltrue表示成功,false表示失敗

2.4.9、TimedWait

等待/獲取信號量(信號量 -1);指定阻塞時間版。

bool TimedWait(const struct timespec& ts);

參數(shù)說明:

參數(shù)名稱類型參數(shù)說明
tsstruct timespec絕對時間。注意:ts是utc時間,不是相對時間。

返回值說明:

類型返回值說明
booltrue表示成功,false表示失敗

2.4.10、Post

釋放信號量(信號量 +1)。

bool Post();

返回值說明:

類型返回值說明
booltrue表示成功,false表示失敗

2.4.10、GetValue

獲取信號的值。

int GetValue() const;

返回值說明:

類型返回值說明
int返回當前信號量的值

3、程序解析

3.1、創(chuàng)建編譯引導

在//vendor/lockzhiner/rk3568/samples/BUILD.gn文件添加一行編譯引導語句。

import("http://build/ohos.gni")
group("samples") { deps = [ "a24_utils_semaphore:utils_semaphore", # 添加該行 ]}

"a24_utils_semaphore:utils_semaphore",該行語句表示引入?yún)⑴c編譯。

3.2、創(chuàng)建編譯項目

創(chuàng)建a24_utils_semaphore目錄,并添加如下文件:

a24_utils_semaphore├── utils_name_semaphore.cpp # 有名信號量案例├── utils_noname_semaphore.cpp # 無名信號量案例├── BUILD.gn # GN文件

3.3、創(chuàng)建BUILD.gn

編輯BUILD.gn文件。

添加2個可執(zhí)行程序,分別是:

utils_noname_semaphore:無名信號量使用案例

utils_name_semaphore:有名信號量使用案例

import("http://build/ohos.gni")
ohos_executable("utils_noname_semaphore") { sources = [ "utils_noname_semaphore.cpp" ] include_dirs = [ "http://commonlibrary/c_utils/base/include", "http://commonlibrary/c_utils/base:utils", "http://third_party/googletest:gtest_main", "http://third_party/googletest/googletest/include", ] external_deps = [ "c_utils:utils" ] part_name = "product_rk3568" install_enable = true}
ohos_executable("utils_name_semaphore") { sources = [ "utils_name_semaphore.cpp" ] include_dirs = [ "http://commonlibrary/c_utils/base/include", "http://commonlibrary/c_utils/base:utils", "http://third_party/googletest:gtest_main", "http://third_party/googletest/googletest/include", ] external_deps = [ "c_utils:utils" ] part_name = "product_rk3568" install_enable = true}
group("utils_semaphore") { deps = [ ":utils_noname_semaphore", ":utils_name_semaphore", ]}

注意:

(1)BUILD.gn中所有的TAB鍵必須轉化為空格,否則會報錯。如果自己不知道如何規(guī)范化,可以:

# 安裝gn工具sudo apt-get install ninja-buildsudo apt install generate-ninja# 規(guī)范化BUILD.gngn format BUILD.gn

3.4、無名信號量使用案例

3.4.1、添加信號量頭文件

#include

3.4.2、創(chuàng)建無名信號量以及公共資源變量

static int m_count = 0; // 公共資源變量static OHOS::Semaphore m_sem(1); // 無名信號量

3.4.3、創(chuàng)建線程池

OHOS::ThreadPoolthreads("noname_semaphore_threads");

3.4.4、設置線程池

OHOS::ThreadPool threads("noname_semaphore_threads");

3.4.5、啟動線程

for (int i = 0; i < threads_start; i++) { string str_name = "thread_" + to_string(i); auto task = std::bind(func, str_name); threads.AddTask(task); sleep(1);}

3.4.6、編寫子線程代碼

循環(huán)5次,每次循環(huán)調用信號量Wait()等待獲取信號量。如果獲取信號量后,將公共資源變量累加,調用信號量Post()釋放信號量。

void func(const string &name){ for (int i = 0; i < 5; i++) { cout << name << ": Sema Wait..." << endl; m_sem.Wait(); cout << name << ": Sema Wait Successful" << endl; m_count += 1; m_sem.Post(); cout << name << ": Sema Post" << endl; sleep(1); }}

3.5、有名信號量使用案例

3.5.1、添加信號量頭文件

#include

3.5.2、創(chuàng)建有名信號量

首先定義有名信號量,然后通過Create()創(chuàng)建全局有名信號量。

int main(int argc, char **argv){ OHOS::NamedSemaphore sem(STRING_NAME_SEMAPHORE, 1); ...... if (!sem.Create()) { cout << "NamedSemaphore.Create() failed\n"; return -1; } ......}

3.5.3、創(chuàng)建線程池

通過OHOS::ThreadPool定義線程池,調用SetMaxTaskNum()設置線程池最大線程數(shù),并調用Start()設置當前啟動多少個線程。

int main(int argc, char **argv){ OHOS::ThreadPool threads("name_semaphore_threads"); int threads_start = 3; ...... threads.SetMaxTaskNum(128); threads.Start(threads_start); ......}

3.5.4、啟動子線程A、B和C

int main(int argc, char **argv){ ...... // 啟動線程A str_name = "thread_a"; auto task_a = std::bind(funcA, str_name); threads.AddTask(task_a); // 啟動線程B str_name = "thread_b"; auto task_b = std::bind(funcB, str_name); threads.AddTask(task_b);
// 啟動線程A str_name = "thread_c"; auto task_c = std::bind(funcC, str_name); threads.AddTask(task_c); threads.Stop(); cout << "threads stop" << endl; return 0;}

3.5.5、編寫子線程A

首先定義有名信號量,信號量數(shù)目可以隨意設置。

其次,通過Open()打開有名信號量,可以與main()的有名信號量共享同一個信號量。

最后,通過Wait()和Post()來獲取釋放信號量。

static void funcA(const string &name){ OHOS::NamedSemaphore sem(STRING_NAME_SEMAPHORE, 1);
cout << get_curtime() << ", " << name << ": start\n";
// 打開一個已經(jīng)創(chuàng)建的有名信號量文件 if (!sem.Open()) { cout << get_curtime() << ", " << name << ": sema open failed" << endl; return; } for (int i = 0; i < 5; i++) { cout << get_curtime() << ", " << name << ": sema wait..." << endl; sem.Wait(); cout << get_curtime() << ", " << name << ": sema wait success" << endl; m_count += 1; usleep(1000 * 1000 * 1); cout << get_curtime() << ", " << name << ": sema count = " << m_count << endl; sem.Post(); cout << get_curtime() << ", " << name << ": sema post and sleep 1 sec" << endl; sleep(1); }
cout << get_curtime() << ", " << name << ": end" << endl;}

3.5.6、編寫子線程B

首先定義有名信號量,信號量數(shù)目可以隨意設置。

其次,通過Open()打開有名信號量,可以與main()的有名信號量共享同一個信號量。

最后,通過TryWait()和Post()來獲取釋放信號量。

static void funcB(const string &name){ OHOS::NamedSemaphore sem(STRING_NAME_SEMAPHORE, 1);
cout << get_curtime() << ", " << name << ": start\n"; // 打開一個已經(jīng)創(chuàng)建的有名信號量文件 if (!sem.Open()) { cout << get_curtime() << ", " << name << ": sema open failed" << endl; return; }
for (int i = 0; i < 5; i++) { cout << get_curtime() << ", " << name << ": sema trywait..." << endl; if (sem.TryWait()) { cout << get_curtime() << ", " << name << ": sema trywait success" << endl; m_count += 10; usleep(1000 * 1000 * 1); cout << get_curtime() << ", " << name << ": sema count = " << m_count << endl; sem.Post(); cout << get_curtime() << ", " << name << ": sema post and sleep 1 sec" << endl; } else { cout << get_curtime() << ", " << name << ": sema tryWait failed and sleep 1 sec" << endl; } sleep(1); }
cout << get_curtime() << ", " << name << ": end" << endl;}

3.5.7、編寫子線程C

首先定義有名信號量,信號量數(shù)目可以隨意設置。

其次,通過Open()打開有名信號量,可以與main()的有名信號量共享同一個信號量。

最后,通過TimedWait()和Post()來獲取釋放信號量。

static void funcC(const string &name){ OHOS::NamedSemaphore sem(STRING_NAME_SEMAPHORE, 1); struct timespec ts;
cout << get_curtime() << ", " << name << ": start\n";
// 打開一個已經(jīng)創(chuàng)建的有名信號量文件 if (!sem.Open()) { cout << get_curtime() << ", " << name << ": sema open failed" << endl; return; } for (int i = 0; i < 5; i++) { clock_gettime(CLOCK_REALTIME, &ts); // 超時等待時間,1秒 ts.tv_sec += 1; cout << get_curtime() << ", " << name << ": sema timedwait 1 sec..." << endl; if (sem.TimedWait(ts)) { cout << get_curtime() << ", " << name << ": sema timedwait success" << endl; m_count += 100; usleep(1000 * 100); cout << get_curtime() << ", " << name << ": sema count = " << m_count << endl; sem.Post(); cout << get_curtime() << ", " << name << ": sema post" << endl; } else { cout << get_curtime() << ", " << name << ": sema timedwait failed and sleep 1 sec" << endl; sleep(1); } }
cout << get_curtime() << ", " << name << ": end" << endl;
}

4、編譯步驟

進入OpenHarmony編譯環(huán)境,運行如下命令:

hb build -f

將鏡像燒錄到開發(fā)板中。

5、運行結果

5.1、無名信號量

運行結果如下:

# utils_noname_semaphorethread_0: Sema Wait...thread_0: Sema Wait Successfulthread_0: Sema Postthread_1: Sema Wait...thread_1: Sema Wait Successfulthread_1: Sema Postthread_0: Sema Wait...thread_0: Sema Wait Successfulthread_0: Sema Postthread_2: Sema Wait...thread_2: Sema Wait Successfulthread_2: Sema Postthread_0: Sema Wait...thread_0: Sema Wait Successfulthread_0: Sema Postthread_1: Sema Wait...thread_1: Sema Wait Successfulthread_1: Sema Postthread_3: Sema Wait...thread_3: Sema Wait Successfulthread_3: Sema Postthread_2: Sema Wait...thread_0: Sema Wait Successfulthread_2: Sema Wait...thread_2: Sema Postthread_1: Sema Wait...thread_0: Sema Wait Successfulthread_0: Sema Postthread_1: Sema Wait Successfulthread_1: Sema Postthread_4: Sema Wait...thread_4: Sema Wait Successfulthread_4: Sema Postthread_3: Sema Wait...thread_3: Sema Wait Successfulthread_3: Sema Postthread_2: Sema Wait...thread_2: Sema Wait Successfulthread_2: Sema Postthread_0: Sema Wait...thread_0: Sema Wait Successfulthread_0: Sema Postthread_1: Sema Wait...thread_1: Sema Wait Successfulthread_1: Sema Postthread_4: Sema Wait...thread_4: Sema Wait Successfulthread_4: Sema Postthread_3: Sema Wait...thread_3: Sema Wait Successfulthread_3: Sema Postthread_2: Sema Wait...thread_2: Sema Wait Successfulthread_2: Sema Postthread_1: Sema Wait...thread_1: Sema Wait Successfulthread_1: Sema Postthread_4: Sema Wait...thread_4: Sema Wait Successfulthread_4: Sema Postthread_3: Sema Wait...thread_3: Sema Wait Successfulthread_3: Sema Postthread_2: Sema Wait...thread_2: Sema Wait Successfulthread_2: Sema Postthread_4: Sema Wait...thread_4: Sema Wait Successfulthread_4: Sema Postthread_3: Sema Wait...thread_3: Sema Wait Successfulthread_3: Sema Postthread_4: Sema Wait...thread_4: Sema Wait Successfulthread_4: Sema Postthreads stop#

5.2、有名信號量

運行結果如下:

# utils_name_semaphore2017-8-5 1924, thread_a: start2017-8-5 19:43:24, thread_b: start2017-8-5 19:43:24, thread_c: start2017-8-5 19:43:24, thread_a: sema wait...2017-8-5 19:43:24, thread_a: sema wait success2017-8-5 19:43:24, thread_b: sema trywait...2017-8-5 19:43:24, thread_b: sema tryWait failed and sleep 1 sec2017-8-5 19:43:24, thread_c: sema timedwait 1 sec...2017-8-5 19:43:25, thread_a: sema count = 12017-8-5 19:43:25, thread_c: sema timedwait failed and sleep 1 sec2017-8-5 19:43:25, thread_a: sema post and sleep 1 sec2017-8-5 19:43:25, thread_b: sema trywait...2017-8-5 19:43:25, thread_b: sema trywait success2017-8-5 19:43:26, thread_a: sema wait...2017-8-5 19:43:26, thread_c: sema timedwait 1 sec...2017-8-5 19:43:26, thread_b: sema count = 112017-8-5 19:43:26, thread_b: sema post and sleep 1 sec2017-8-5 19:43:26, thread_a: sema wait success2017-8-5 19:43:27, thread_c: sema timedwait failed and sleep 1 sec2017-8-5 19:43:27, thread_b: sema trywait...2017-8-5 19:43:27, thread_b: sema tryWait failed and sleep 1 sec2017-8-5 19:43:27, thread_a: sema count = 122017-8-5 19:43:27, thread_a: sema post and sleep 1 sec2017-8-5 19:43:28, thread_c: sema timedwait 1 sec...2017-8-5 19:43:28, thread_c: sema timedwait success2017-8-5 19:43:28, thread_b: sema trywait...2017-8-5 19:43:28, thread_a: sema wait...2017-8-5 19:43:28, thread_b: sema tryWait failed and sleep 1 sec2017-8-5 19:43:28, thread_c: sema count = 1122017-8-5 19:43:28, thread_c: sema post2017-8-5 19:43:28, thread_c: sema timedwait 1 sec...2017-8-5 19:43:28, thread_a: sema wait success2017-8-5 19:43:29, thread_b: sema trywait...2017-8-5 19:43:29, thread_b: sema tryWait failed and sleep 1 sec2017-8-5 19:43:29, thread_c: sema timedwait failed and sleep 1 sec2017-8-5 19:43:29, thread_a: sema count = 1132017-8-5 19:43:29, thread_a: sema post and sleep 1 sec2017-8-5 19:43:30, thread_b: sema close2017-8-5 19:43:30, thread_c: sema timedwait 1 sec...2017-8-5 19:43:30, thread_c: sema timedwait success2017-8-5 19:43:30, thread_a: sema wait...2017-8-5 19:43:31, thread_c: sema count = 2132017-8-5 19:43:31, thread_c: sema post2017-8-5 19:43:31, thread_c: sema close2017-8-5 19:43:31, thread_a: sema wait success2017-8-5 19:43:32, thread_a: sema count = 2142017-8-5 19:43:32, thread_a: sema post and sleep 1 sec2017-8-5 19:43:33, thread_a: sema wait...2017-8-5 19:43:33, thread_a: sema wait success2017-8-5 19:43:34, thread_a: sema count = 2152017-8-5 19:43:34, thread_a: sema post and sleep 1 sec2017-8-5 19:43:35, thread_a: sema closethreads stop#

聲明:本文內容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權轉載。文章觀點僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場。文章及其配圖僅供工程師學習之用,如有內容侵權或者其他違規(guī)問題,請聯(lián)系本站處理。 舉報投訴
  • 編譯
    +關注

    關注

    0

    文章

    691

    瀏覽量

    35013
  • 線程
    +關注

    關注

    0

    文章

    508

    瀏覽量

    20794
  • OpenHarmony
    +關注

    關注

    33

    文章

    3941

    瀏覽量

    20914
收藏 人收藏
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

    評論

    相關推薦
    熱點推薦

    #OpenHarmony 系統(tǒng)概述

    OpenHarmony
    視美泰
    發(fā)布于 :2026年01月16日 09:39:20

    C語言與C++的區(qū)別及聯(lián)系

    并沒有錯。 C++一開始被本賈尼·斯特勞斯特盧普(Bjarne Stroustrup)發(fā)明時,起初被稱為“C with Classes”,即「帶C」。 很明顯,它是在
    發(fā)表于 12-24 07:23

    CC++之間的聯(lián)系

    控制能力,這一點與C語言相似,使得它們在系統(tǒng)編程、嵌入式系統(tǒng)等領域都得到廣泛應用。 3、發(fā)展歷程: C++正是在C語言的基礎上逐步發(fā)展起
    發(fā)表于 12-11 06:51

    C語言和C++之間的區(qū)別是什么

    (inheritance)、多態(tài)(polymorphism)等面向對象編程概念。程序員可以通過定義來創(chuàng)建對象,并利用的實例進行操作。 2、類型系統(tǒng)與安全性: C++具有更為嚴格
    發(fā)表于 12-11 06:23

    標準C的區(qū)別

    因為針對Arm的嵌入式系統(tǒng),通常存儲(代碼)資源相對較小,為了使其能用上標準函數(shù),工程師就針對Arm嵌入式系統(tǒng),對標準C
    發(fā)表于 12-09 07:49

    OpenHarmony TSC 2025年度技術課題發(fā)布(截至10月)

    、學者們揭榜課題、參與分解課題,共同推動開源鴻蒙終端操作系統(tǒng)的技術突破與生態(tài)繁榮。詳見下表: 挑戰(zhàn)方向 挑戰(zhàn)課題 挑戰(zhàn)方向1:以用戶為中心、場景感知的應用軟件新形態(tài) 面向OpenHarmony平臺的C/
    的頭像 發(fā)表于 11-05 19:12 ?1192次閱讀

    技能+1!如何在樹莓派上使用C++控制GPIO?

    和PiGPIO等,C++可用于編程控制樹莓派的GPIO引腳。它提供了更好的性能和控制能力,非常適合對速度和精度要求較高的硬件項目。在樹莓派社區(qū)中,關于“Python
    的頭像 發(fā)表于 08-06 15:33 ?3889次閱讀
    技能+1!如何在樹莓派上使用<b class='flag-5'>C++</b>控制GPIO?

    C++ 與 Python:樹莓派上哪種語言更優(yōu)?

    Python是樹莓派上的首選編程語言,我們的大部分教程都使用它。然而,C++在物聯(lián)網(wǎng)項目中同樣廣受歡迎且功能強大。那么,在樹莓派項目中選擇哪種語言更合適呢?Python因其簡潔性、豐富的和資源而被
    的頭像 發(fā)表于 07-24 15:32 ?773次閱讀
    <b class='flag-5'>C++</b> 與 Python:樹莓派上哪種語言更優(yōu)?

    【重要通知】OpenHarmony主干平臺開發(fā)板選型提報倒計時(參考工具發(fā)布)

    各位伙伴好: 鑒于當前開源鴻蒙標準系統(tǒng)的主線驗證平臺(RK3568)在性能上已難以滿足未來幾年的發(fā)展需求。為確保系統(tǒng)持續(xù)演進,現(xiàn)啟動下一代主力驗證平臺的規(guī)劃工作。 經(jīng)過初步調研,我們篩選出四個候選
    發(fā)表于 07-24 09:17

    OpenHarmony 2025年度技術課題發(fā)布

    課題共計6道。熱切期待各界的專家、學者們揭榜課題、參與分解課題,共同推動OpenHarmony終端操作系統(tǒng)的技術突破與生態(tài)繁榮。詳見下表: 挑戰(zhàn)方向 挑戰(zhàn)課題 挑戰(zhàn)方向1:以用戶為中心、場景感知的應用軟件新形態(tài) 面向OpenHarmon
    的頭像 發(fā)表于 07-23 20:57 ?677次閱讀

    基于LockAI視覺識別模塊:C++目標檢測

    本文檔基于瑞芯微RV1106的LockAI凌智視覺識別模塊,通過C++語言做的目標檢測實驗。本文檔展示了如何使用lockzhiner_vision_module::PaddleDet進行目標檢測,并通過lockzhiner_vision_module::Visualiz
    的頭像 發(fā)表于 06-06 13:56 ?730次閱讀
    基于LockAI視覺識別模塊:<b class='flag-5'>C++</b>目標檢測

    貢獻 OpenHarmony 關鍵配置

    # 貢獻 OpenHarmony 關鍵配置 #自研框架#ArkUI-X#三方框架#OpenHarmony#HarmonyOS ## 創(chuàng)建第三方 - 打開 DevEco Stud
    發(fā)表于 05-28 13:46

    一文帶你了解KaihongOS標準系統(tǒng)的技術架構、子系統(tǒng)、系統(tǒng)應用、典型特性以及支持的設備類型

    分布式軟總線子系統(tǒng) 2.10.1 子系統(tǒng)概述 KaihongOS標準系統(tǒng)軟件是基于OpenHarmony開發(fā)的新時代萬物互聯(lián)的操作系統(tǒng)
    發(fā)表于 04-23 07:17

    C++學到什么程度可以找工作?

    管理、引用、面向對象編程(與對象、繼承、多態(tài))、模板和STL(標準模板)等。 2. **數(shù)據(jù)結構與算法**:能夠高效地實現(xiàn)并使用各種數(shù)據(jù)結構(如數(shù)組、鏈表、棧、隊列、樹、圖等)和算法(如排序、查找
    發(fā)表于 03-13 10:19

    基于OpenHarmony標準系統(tǒng)C++公共基礎案例:ThreadPoll

    1、程序簡介該程序是基于OpenHarmony標準系統(tǒng)C++公共基礎的線程池處理:Thre
    的頭像 發(fā)表于 02-10 18:09 ?751次閱讀
    基于<b class='flag-5'>OpenHarmony</b><b class='flag-5'>標準系統(tǒng)</b>的<b class='flag-5'>C++</b><b class='flag-5'>公共</b>基礎<b class='flag-5'>類</b><b class='flag-5'>庫</b>案例:ThreadPoll