多核编程与并行计算实验报告 (1)(2)
发布时间:2021-06-07
发布时间:2021-06-07
多核编程与并行计算
//
#include "stdafx.h"
#include <windows.h>
#include <process.h>
#include <iostream>
#include <fstream>
using namespace std;
void ThreadFunc1(PVOID param)
{
}
void ThreadFunc2(PVOID param)
{
}
int main()
{
}
int i=0; _beginthread(ThreadFunc1,0,NULL); _beginthread(ThreadFunc2,0,NULL); Sleep(3000); cout<<"end"<<endl; return 0; while(1) { } Sleep(1000); cout<<"This is ThreadFunc2"<<endl; while(1) { } Sleep(1000); cout<<"This is ThreadFunc1"<<endl;