增加了第一版本的正射算法库

master
剑古敛锋 2022-12-07 18:21:30 +08:00
parent 6872c62bce
commit 929e67e347
23 changed files with 4286 additions and 0 deletions

View File

@ -0,0 +1,49 @@
// ConsoleApplication1.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//
#include <iostream>
#include <Eigen/Core>
#include <Eigen/Dense>
#include <time.h>
//#include <armadillo>
//using namespace arma;
using namespace std;
using namespace Eigen;
int main(int argc, char* argv[])
{
cout << cos(30) << endl;
cout << cos(45) << endl;
cout << cos(60) << endl;
cout << pow(1, 3) << endl;
cout << pow(2, 3) << endl;
Eigen::MatrixXd a = Eigen::MatrixXd::Ones(6, 3); // 随机初始化矩阵
Eigen::MatrixXd b = Eigen::MatrixXd::Ones(6,3).array()*2;
Eigen::Vector3d p(3, 1, 2);
double start = clock();
Eigen::MatrixXd c = (a.array()/b.array());// .rowwise().sum();
double endd = clock();
double thisTime = (double)(endd - start) / CLOCKS_PER_SEC;
cout << thisTime << endl;
cout << c.rows() << "," << c.cols() << endl;
cout << c(Eigen::all, { 0,1}) << endl;
system("PAUSE");
return 0;
}
// 运行程序: Ctrl + F5 或调试 >“开始执行(不调试)”菜单
// 调试程序: F5 或调试 >“开始调试”菜单
// 入门使用技巧:
// 1. 使用解决方案资源管理器窗口添加/管理文件
// 2. 使用团队资源管理器窗口连接到源代码管理
// 3. 使用输出窗口查看生成输出和其他消息
// 4. 使用错误列表窗口查看错误
// 5. 转到“项目”>“添加新项”以创建新的代码文件,或转到“项目”>“添加现有项”以将现有代码文件添加到项目
// 6. 将来,若要再次打开此项目,请转到“文件”>“打开”>“项目”并选择 .sln 文件

View File

@ -0,0 +1,140 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{db6d05f9-271e-4954-98ed-591ab27bb05e}</ProjectGuid>
<RootNamespace>ConsoleApplication1</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<UseInteloneMKL>Parallel</UseInteloneMKL>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LibraryPath>C:\Program Files (x86)\Intel\oneAPI\mpi\2021.6.0\lib\release;C:\Program Files %28x86%29\Intel\oneAPI\compiler\2022.1.0\windows\compiler\lib\intel64_win;C:\Program Files %28x86%29\Intel\oneAPI\mkl\2022.1.0\lib\intel64;$(oneMKLOmpLibDir);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>mkl_scalapack_ilp64.lib;mkl_cdft_core.lib;mkl_intel_ilp64.lib;mkl_sequential.lib;mkl_core.lib;mkl_blacs_intelmpi_ilp64.lib;impi.lib;mkl_intel_thread.lib;libiomp5md.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="ConsoleApplication1.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="源文件">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="头文件">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="资源文件">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="ConsoleApplication1.cpp">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>

View File

@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain

View File

@ -0,0 +1,363 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Oo]ut/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd

View File

@ -0,0 +1,191 @@
// PSTM_simulation_windows.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//
#include <iostream>
#include <vector>
#include <memory>
#include <medparam.h>
#include <malloc.h>
#include <string>
#include "ParameterInFile.h"
#include <time.h>  
#include <crtdbg.h>
//
// 引用变量的空间
//
using namespace std;
int test(ParameterInFile parmas) {
cout << parmas.doppler_para[0] << endl;
return 0;
}
/// <summary>
/// 检查环境,主要检查内存情况
/// </summary>
/// <param name="parmas"></param>
/// <returns></returns>
bool check(ParameterInFile& parmas) {
return true;
}
sim_block testsimblock(int a = 1) {
sim_block result(1, 2, 1, 2, 1, 1);
return result;
}
int Fmaintest() {
sim_block temp = testsimblock(1);
point lla = point{ 110,22,33 };
point xyz = point{ -2023567.6297546995,5559706.3694903487,2374425.2573203994 };
point ttxyz = LLA2XYZ(lla);
point ttlla = XYZ2LLA(xyz);
VectorPoint v1 = getVector(xyz, ttxyz);
VectorPoint v2 = getVector(lla, ttlla);
cout << getModule(v1) << std::endl;
cout << getModule(v2) << std::endl;
return 0;
}
int main(int argc, char* argv[])
{
// try {
testPP();
std::cout << "PSTM_simulation_windows.exe [mode] [pars_path] [resample_para] [--thead_num]" << endl;// 输出帮助文档
std::cout << "[mode]: 调用模块 0,1,2 " << endl;
std::cout << " 0:默认路径 " << endl;
std::cout << " 1:计算正射模拟图 " << endl;
std::cout << " 2:计算正射校正插值算法与强度图生成 " << endl;
std::cout << "[para_path]:必选 正射模拟参数文件 " << endl;
std::cout << "[resample_para]:当mode==2时必选 计算正射校正插值算法与强度图生成参数文件 " << endl;
std::cout << "[--thead_num]:可选 线程数默认是8" << endl;
std::cout << "example:" << endl;
std::cout << "PSTM_simulation_windows.exe 2 C:\\sim_sar_paras.txt D:\\resample_para.txt --thead_num 8" << endl;
int mode = -1;
int thread_num = 6;
std::string pars_path = ""; //配置文件代码
std::string resample_para = "";
std::string thread_str = "--thead_num";
try {
if (argc < 3) {
std::cout << "缺少参数" << endl;
//return 0;
}
for (int i = 1; i < argc; i++) {
if (i == 1) {
mode = stoi(argv[1]);
if (mode == 0) {
pars_path = "D:\\otherSoftware\\Ortho\\Ortho\\ortho_indirect\\datafolder\\testworkspace4\\sim_sar_paras.txt";
resample_para = "D:\\otherSoftware\\Ortho\\Ortho\\ortho_indirect\\datafolder\\testworkspace4\\resample_para.txt";
mode = 2;
break;
}
}
if (i == 2) {
pars_path= argv[2];
}
if (i == 3) {
if (mode == 1) {
break;
}
else {
resample_para = argv[3];
}
}
}
for (int i = 1; i < argc; i++) {
std::string temp = argv[i];
if (temp== thread_str) {
i = i + 1;
if (i >= argc) { break; }
else {
thread_num = stoi(argv[i]);
}
}
}
}
catch(exception ex) {
std::cout << "参数解析错误" << endl;
// 开始test模式
return -1;
}
if (1) {
pars_path = "D:\\MicroWorkspace\\C-SAR\\Ortho\\Temporary\\sim_sar_paras.txt";
resample_para = "";// "D:\\otherSoftware\\Ortho\\Ortho\\ortho_indirect\\datafolder\\testworkspace\\resample_para.txt";
mode = 1;
}
std::cout << "线程数:" << thread_num << endl;
//Fmaintest();
cout << mode << "\n";
int d=round(3.13);
if (mode == 1) {
cout << "sim_sar program run....\n";
cout << pars_path << "\n";
ParameterInFile parmas(pars_path);
//testPTSN(parmas);
if (!check(parmas)) {
throw "不符合运行条件";
return 0;
}
//SimProcess(parmas, 32);
SimProcess_LVY(parmas, thread_num);
// ResamplingSim(parmas);
// 检查解析结果
cout << "programover" << "\n";
}
else if (mode == 2) {
try {
ConvertResampleParameter converPara(resample_para);
ParameterInFile parmas(pars_path);
testPTSN(pars_path);
SimProcess_Calsim2ori(parmas, converPara, thread_num);
SimProcess_ResamplingOri2Orth(parmas, converPara, thread_num);
SimProcess_Calspow(parmas, converPara, thread_num);
}
catch(exception& ex) {
std::cout << ex.what() << std::endl;
return -1;
}
//SimProcess_CalXYZ(parmas, converPara,16);
//ConverOri2Sim(parmas, converPara);
//CalCoondinaryXYZOfSAR(parmas, converPara);
}
// }
//catch (exception ex) {
// 防止内存泄露,保证内存能够被调用
// throw "error";
// }
}
// 运行程序: Ctrl + F5 或调试 >“开始执行(不调试)”菜单
// 调试程序: F5 或调试 >“开始调试”菜单
// 入门使用技巧:
// 1. 使用解决方案资源管理器窗口添加/管理文件
// 2. 使用团队资源管理器窗口连接到源代码管理
// 3. 使用输出窗口查看生成输出和其他消息
// 4. 使用错误列表窗口查看错误
// 5. 转到“项目”>“添加新项”以创建新的代码文件,或转到“项目”>“添加现有项”以将现有代码文件添加到项目
// 6. 将来,若要再次打开此项目,请转到“文件”>“打开”>“项目”并选择 .sln 文件

View File

@ -0,0 +1,41 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32602.215
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PSTM_simulation_windows", "PSTM_simulation_windows.vcxproj", "{418EA1F3-8583-4728-ABC4-45B98FC053BF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ConsoleApplication1", "..\ConsoleApplication1\ConsoleApplication1.vcxproj", "{DB6D05F9-271E-4954-98ED-591AB27BB05E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{418EA1F3-8583-4728-ABC4-45B98FC053BF}.Debug|x64.ActiveCfg = Debug|x64
{418EA1F3-8583-4728-ABC4-45B98FC053BF}.Debug|x64.Build.0 = Debug|x64
{418EA1F3-8583-4728-ABC4-45B98FC053BF}.Debug|x86.ActiveCfg = Debug|Win32
{418EA1F3-8583-4728-ABC4-45B98FC053BF}.Debug|x86.Build.0 = Debug|Win32
{418EA1F3-8583-4728-ABC4-45B98FC053BF}.Release|x64.ActiveCfg = Release|x64
{418EA1F3-8583-4728-ABC4-45B98FC053BF}.Release|x64.Build.0 = Release|x64
{418EA1F3-8583-4728-ABC4-45B98FC053BF}.Release|x86.ActiveCfg = Release|Win32
{418EA1F3-8583-4728-ABC4-45B98FC053BF}.Release|x86.Build.0 = Release|Win32
{DB6D05F9-271E-4954-98ED-591AB27BB05E}.Debug|x64.ActiveCfg = Debug|x64
{DB6D05F9-271E-4954-98ED-591AB27BB05E}.Debug|x64.Build.0 = Debug|x64
{DB6D05F9-271E-4954-98ED-591AB27BB05E}.Debug|x86.ActiveCfg = Debug|Win32
{DB6D05F9-271E-4954-98ED-591AB27BB05E}.Debug|x86.Build.0 = Debug|Win32
{DB6D05F9-271E-4954-98ED-591AB27BB05E}.Release|x64.ActiveCfg = Release|x64
{DB6D05F9-271E-4954-98ED-591AB27BB05E}.Release|x64.Build.0 = Release|x64
{DB6D05F9-271E-4954-98ED-591AB27BB05E}.Release|x86.ActiveCfg = Release|Win32
{DB6D05F9-271E-4954-98ED-591AB27BB05E}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C2C843D5-F54A-4745-908B-8387B47D60A3}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,169 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{418ea1f3-8583-4728-abc4-45b98fc053bf}</ProjectGuid>
<RootNamespace>PSTMsimulationwindows</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<UseInteloneMKL>No</UseInteloneMKL>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<UseInteloneMKL>Parallel</UseInteloneMKL>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<ExternalIncludePath>$(ExternalIncludePath)</ExternalIncludePath>
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<ExternalIncludePath>$(ExternalIncludePath)</ExternalIncludePath>
<LibraryPath>$(LibraryPath)</LibraryPath>
<OutDir>$(SolutionDir)bin\$(Platform)\$(Configuration)</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<OpenMPSupport>true</OpenMPSupport>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="common.cpp" />
<ClCompile Include="ParameterInFile.cpp" />
<ClCompile Include="PSTM_simulation_windows.cpp" />
<ClCompile Include="taskprocess.cpp" />
<ClCompile Include="threadpool.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="common.h" />
<ClInclude Include="ParameterInFile.h" />
<ClInclude Include="taskprocess.h" />
<ClInclude Include="threadpool.hpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,576 @@
#pragma once
#include <iostream>
#include <memory>
#include <vector>
#include <future>
#include <complex>
#include "gdalwarper.h"
#define PI_180 180/3.141592653589793238462643383279;
#define T180_PI 3.141592653589793238462643383279/180;
#define Radians2Degrees(Radians) Radians*PI_180
#define Degrees2Radians(Degrees) Degrees*T180_PI
const long double PI=3.141592653589793238462643383279;
const long double epsilon = 0.000000000000001;
const long double pi = 3.14159265358979323846;
const long double d2r = pi / 180;
const long double r2d = 180 / pi;
const long double a = 6378137.0; //椭球长半轴
const long double f_inverse = 298.257223563; //扁率倒数
const long double b = a - a / f_inverse;
const long double e = sqrt(a * a - b * b) / a;
const long double eSquare = e*e;
int testPP();
using namespace std;
///
/// 内敛函数
///
struct point // 点 SAR影像的像素坐标
{
long double x; // 纬度 lat pixel_row
long double y; // 经度 lon pixel_col
long double z; // 高程 ati pixel_time
};
struct VectorPoint {
long double x;
long double y;
long double z;
};
/// <summary>
/// 将经纬度转换为地固参心坐标系
/// </summary>
/// <param name="XYZP">经纬度点--degree</param>
/// <returns>投影坐标系点</returns>
inline point LLA2XYZ(point& LLA) {
long double L = LLA.x * d2r;
long double B = LLA.y * d2r;
long double H = LLA.z;
long double sinB = sin(B);
long double cosB = cos(B);
//long double N = a / sqrt(1 - e * e * sin(B) * sin(B));
long double N = a / sqrt(1 - eSquare * sinB * sinB);
point result = { 0,0,0 };
result.x = (N + H) * cosB * cos(L);
result.y = (N + H) * cosB * sin(L);
//result.z = (N * (1 - e * e) + H) * sin(B);
result.z = (N * (1 - eSquare) + H) * sinB;
return result;
}
/// <summary>
/// 将地固参心坐标系转换为经纬度
/// </summary>
/// <param name="XYZ">固参心坐标系</param>
/// <returns>经纬度--degree</returns>
point XYZ2LLA(point& XYZ);
/// <summary>
/// 计算两个点之间的XY平面欧式距离的平方
/// </summary>
/// <param name="p1"></param>
/// <param name="p2"></param>
/// <returns></returns>
inline long double caldistanceXY(point& p1, point& p2) {
//return pow(p1.x - p2.x, 2) + pow(p1.y - p2.y, 2);
return (p1.x - p2.x)* (p1.x - p2.x) + (p1.y - p2.y)* (p1.y - p2.y);
}
/// <summary>
/// 使用两个点,生成向量 p1-->p2
/// </summary>
/// <param name="p1">p1</param>
/// <param name="p2">p2</param>
/// <returns>向量</returns>
inline VectorPoint getVector(point& p1, point& p2) {
VectorPoint result = { 0,0,0 };
result.x = p2.x - p1.x;
result.y = p2.y - p1.y;
result.z = p2.z - p1.z;
return result;
}
/// <summary>
/// 获取向量的模
/// </summary>
/// <param name="vector1">向量</param>
/// <returns>向量模</returns>
inline long double getModule(VectorPoint& vector1) {
//return sqrt(pow(vector1.x, 2) + pow(vector1.y, 2) + pow(vector1.z, 2));
return sqrt(vector1.x* vector1.x + vector1.y* vector1.y + vector1.z* vector1.z);
}
inline long double getModuleV1V2(VectorPoint& v1, VectorPoint& v2)
{
return sqrt((v1.x * v1.x + v1.y * v1.y + v1.z * v1.z) * (v2.x * v2.x + v2.y * v2.y + v2.z * v2.z));
}
/// <summary>
/// 向量夹角的角度( 角度)
/// </summary>
/// <param name="vector1">向量</param>
/// <returns>向量夹角的角度</returns>
inline long double getVectorAngle(VectorPoint& vector1,VectorPoint& vector2) {
//return Radians2Degrees( acos((vector1.x * vector2.x + vector1.y * vector2.y + vector1.z * vector2.z) / (getModule(vector1) * getModule(vector2))));
return Radians2Degrees(acos((vector1.x * vector2.x + vector1.y * vector2.y + vector1.z * vector2.z) / (getModuleV1V2(vector1, vector2))));
}
/// <summary>
/// 向量的夹角值
/// </summary>
/// <param name="vector1">向量</param>
/// <returns>向量夹角的角度</returns>
inline long double getVectorAngleValue(VectorPoint& vector1, VectorPoint& vector2) {
//return (vector1.x * vector2.x + vector1.y * vector2.y + vector1.z * vector2.z) / (getModule(vector1) * getModule(vector2));
return (vector1.x * vector2.x + vector1.y * vector2.y + vector1.z * vector2.z) / (getModuleV1V2(vector1, vector2));
}
/// <summary>
/// 向量点乘
/// </summary>
/// <param name="V1">向量1</param>
/// <param name="v2">向量2</param>
/// <returns>点乘值</returns>
inline long double Vectordot(VectorPoint& V1, VectorPoint& v2) {
return V1.x * v2.x + V1.y * v2.y + V1.z * v2.z;
}
/// <summary>
/// 向量点乘
/// </summary>
/// <param name="V1">向量1</param>
/// <param name="lamda">系数值</param>
/// <returns>向量与数之间的插值</returns>
inline VectorPoint VectordotNumber(VectorPoint& V1, long double lamda) {
V1.x = V1.x * lamda;
V1.y = V1.y * lamda;
V1.z = V1.z * lamda;
return V1;
}
/// <summary>
/// 向量叉乘
/// 旋转方向v1->v2
/// </summary>
/// <param name="v1">v1</param>
/// <param name="v2">v2</param>
/// <returns>叉乘的结果向量</returns>
inline VectorPoint VectorFork(VectorPoint &v1, VectorPoint& v2) {
VectorPoint result{ 0,0,0 };
result.x = v1.y * v2.z - v1.z * v2.y;
result.y =v1.z*v2.x -v1.x * v2.z;
result.z = v1.x * v2.y - v1.y * v2.x;
return result;
}
//
// 参数文件解析
//
//参数文件标准格式
// 文件值 类型 对应的代号
// DEM文件的路径 str dem_path
// 模拟影像输出路径 str sar_sim_path
// 模拟影像的宽 int
// 模拟影像的高 int
// 模拟影像的匹配坐标文件输出路径 str sar_sim_match_point_x_path
// 模拟影像的匹配坐标X输出路径 str sar_sim_match_point_x_path
// 模拟影像的匹配坐标Y输出路径 str sar_sim_match_point_y_path
// 模拟影像的匹配坐标Z输出路径 str sar_sim_match_point_z_path
// 采样率 long double sample_f
// 近斜距 long double R0
// 成像起始时间 long double starttime ---UTC 时间
// 光速 long double
// 波长 long double
// 多普勒参考时间 long double TO ---UTC 时间
// 脉冲重复频率 long double PRF
// 斜距采样间隔 long double delta_R
// 多普勒系数个数 int
// 多普勒系数1 long double
// 多普勒系数2 long double
// ....
// 卫星轨道模型是否为多项式模型 int 1 是。0 不是
// 卫星轨道模型多项式次数 int 4 5
// 卫星轨道模型起始时间 long double
// 卫星轨道模型X值系数1 long double
// ....
// 卫星轨道模型Y值系数1 long double
// ...
// 卫星轨道模型Z值系数1 long double
// ...
// 卫星轨道模型Vx值系数1 long double
// ...
// 卫星轨道模型Vy值系数1 long double
// ...
// 卫星轨道模型Vz值系数1 long double
// ...
//
//
class ParameterInFile
{
public:
ParameterInFile(std::string infile_path);
ParameterInFile(const ParameterInFile& paras);
~ParameterInFile();
public:
//参数组
std::string dem_path; //dem 路径
std::string out_sar_sim_path; // 输出模拟sar
std::string out_sar_sim_dem_path; // 输出模拟sar
std::string out_sar_sim_resampling_path; // 输出模拟sar
std::string out_sar_sim_resampling_rc;
int sim_height; // 模拟影像的高
int sim_width;
long double widthspace;// 距离向分辨率
std::string sar_sim_match_point_path; //输出模拟影像的地点x
std::string sar_sim_match_point_xyz_path; //输出模拟影像的地点x
int sample_f; //采样率
long double R0; //近斜距
long double LightSpeed;//光速
long double lamda;//波长
long double refrange;// 参考斜距
long double delta_R; // 斜距间隔
long double imgStartTime; //成像起始时间
long double PRF;// 脉冲重复率
long double delta_t;// 时间间隔
// 多普勒
int doppler_paramenter_number;// 多普勒系数个数
long double* doppler_para;//多普勒系数
//卫星轨道模型
int polySatelliteModel;// 是否为卫星多轨道模型
int polynum;// 多项数
long double SatelliteModelStartTime;
long double* polySatellitePara;
};
// 根据轨道模型计算卫星空间位置
struct SatelliteSpacePoint {
long double x=0;
long double y=0;
long double z=0;
long double vx=0;
long double vy=0;
long double vz=0;
};
/// <summary>
/// 根据卫星轨道模型计算卫星
/// </summary>
/// <param name="satelliteTime">卫星轨道点时间</param>
/// <param name="SatelliteModelStartTime">卫星轨道模型起始时间</param>
/// <param name="polySatellitePara">卫星轨道坐标模型参数</param>
/// <param name="polynum">多项式项数</param>
/// <returns></returns>
inline SatelliteSpacePoint getSatellitePostion(long double satelliteTime,long double SatelliteModelStartTime,long double* polySatellitePara,int polynum);
/// <summary>
/// 数值模拟法计算多普勒频移值
/// </summary>
/// <param name="R">斜距</param>
/// <param name="LightSpeed">光速</param>
/// <param name="T0">多普勒参考时间</param>
/// <param name="doppler_para">多普勒参数</param>
/// <returns>多普勒频移值</returns>
inline long double calNumericalDopplerValue(long double R,long double LightSpeed,long double T0, long double* doppler_para,int doppler_paramenter_number);
/// <summary>
/// 根据理论模型计算多普勒频移值
/// </summary>
/// <param name="R">斜距</param>
/// <param name="lamda">波长</param>
/// <param name="R_sl">地面->卫星的空间向量</param>
/// <param name="V_sl">地面->卫星之间的速度向量</param>
/// <returns>多普勒频移值</returns>
inline long double calTheoryDopplerValue(long double R, long double lamda, VectorPoint R_sl, VectorPoint V_sl);
/// <summary>
/// 根据地面点求解对应的sar影像坐标
/// </summary>
/// <param name="landpoint">地面点的坐标--地固坐标系</param>
/// <param name="Starttime">影片开始成像时间</param>
/// <param name="lamda">波长</param>
/// <param name="T0">多普勒参考时间</param>
/// <param name="LightSpeed">光速</param>
/// <param name="delta_t">时间间隔</param>
/// <param name="R0">近斜距</param>
/// <param name="delta_R">斜距间隔</param>
/// <param name="SatelliteModelStartTime">卫星轨道模型时间</param>
/// <param name="polySatellitePara">卫星轨道坐标模型参数</param>
/// <param name="polynum">卫星轨道模型项数</param>
/// <param name="doppler_paramenter_number">多普勒模型数</param>
/// <returns>影像坐标x:行号y:列号z成像时刻</returns>
inline point PSTN(point& landpoint, long double Starttime, long double lamda, long double T0, long double* doppler_para, long double LightSpeed, long double delta_t, long double R0, long double delta_R, long double SatelliteModelStartTime, long double* polySatellitePara, int polynum = 4, int doppler_paramenter_number = 5);
struct translateArray {
long double a0, a1, a2;
long double b0, b1, b2;
};
/// <summary>
/// 转换影像
/// </summary>
/// <param name="row_ids"></param>
/// <param name="col_ids"></param>
/// <param name="value"></param>
/// <param name="gt"></param>
/// <returns></returns>
inline point Translation(long double row_ids,long double col_ids,long double value,translateArray& gt) {
point result{ 0,0,0 };
result.x = gt.a0 + gt.a1 * col_ids + gt.a2 * row_ids;
result.y = gt.b0 + gt.b1 * col_ids + gt.b2 * row_ids;
result.z = value;
return result;
}
inline int Translation(long double& x, long double& y, long double& r, long double& c, translateArray& gt) {
c = gt.a0 + gt.a1 * x + gt.a2 * y;
r = gt.b0 + gt.b1 * x + gt.b2 * y;
return 0;
}
/// <summary>
/// dem块
/// </summary>
class dem_block {
public:
dem_block(int all_start_row,int all_start_col,int start_row, int end_row, int start_col, int end_col, int height, int width,int sample_f);
dem_block(const dem_block& demblocks);
~dem_block();
dem_block resample_dem();
//dem_block resample_dem_cudic();
int rowcol2blockids(int row_ids, int col_ids);
point getpointblock(int row_ids, int col_ids);
int setpointblock(int row_ids, int col_ids, point& value);
point getpointblock(int ids);
int setpointblock(int ids, point& value);
int UpdatePointCoodinarary();
VectorPoint getslopeVector(int row_ids, int col_ids);
public:
int all_start_row;
int all_start_col;
int start_row; // 目标区域的起始行号
int end_row; //
int start_col; // 目标区域的起始列号
int end_col;
int height;
int width;
int size;
int sample_f;
point* pointblock; // 原始块
};
inline point bilineadInterpolation(point& p,point& p11,point& p12,point& p21,point& p22);
inline point cubicInterpolation(point& p, point& p11, point& p12,point& p13,point& p14, point& p21, point& p22,point& p23,point& p24,point& p31,point& p32,point& p33,point& p34,point& p41,point& p42,point& p43,point& p44);
/// <summary>
/// 双线性插值方法
/// </summary>
/// <param name="p"></param>
/// <param name="p11"></param>
/// <param name="p12"></param>
/// <param name="p21"></param>
/// <param name="p22"></param>
/// <returns></returns>
inline point SARbilineadInterpolation(point& p, point& p11, point& p12, point& p21, point& p22) {
}
/// <summary>
/// 入射角 -- 弧度制
/// </summary>
struct IncidenceAngle
{
long double incidenceAngle; // 雷达入射角
long double localincidenceAngle; // 局地入射角
};
struct matchPoint {
long double r, c, ti;
long double land_x, land_y, land_z;
long double distance;
long double incidenceAngle, localincidenceAngle;
};
/// <summary>
/// 模拟sar 的矩阵块累加模块默认使用short 类型(累加上限:
/// </summary>
class sim_block {
public:
sim_block(int start_row,int end_row,int start_col,int end_col,int height,int width);
sim_block(const sim_block& sim_blocks);
~sim_block();
int rowcol2blockids(int row_ids, int col_ids);
short getsimblock(int row_ids, int col_ids);
int setsimblock(int row_ids,int col_ids, short value);
int addsimblock(int row_ids, int col_ids,short value);
matchPoint getpointblock(int row_ids,int col_ids);
int setpointblock(int row_ids, int col_ids, matchPoint value);
//
long double getdistanceblock(int row_ids, int col_ids);
int setdistanceblock(int row_ids, int col_ids, long double value);
public:
int start_row;
int end_row;
int start_col;
int end_col;
int height;
int width;
int size;
short* block;
long double* distanceblock;
matchPoint* pointblock;
};
/// <summary>
/// 根据卫星坐标,地面坐标,地面法向量,求解对应的雷达入射角和局地入射角
/// </summary>
/// <param name="satellitepoint">卫星空间坐标</param>
/// <param name="landpoint">地面坐标</param>
/// <param name="slopvector">地面坡度</param>
/// <returns>入射角文件</returns>
inline IncidenceAngle calIncidence(point satellitepoint,point landpoint,VectorPoint slopvector) {
IncidenceAngle result;
VectorPoint R_ls = getVector(landpoint, satellitepoint);
result.localincidenceAngle = getVectorAngleValue(R_ls, slopvector);
VectorPoint R_s{ satellitepoint.x,satellitepoint.y,satellitepoint.z };
result.incidenceAngle = getVectorAngleValue(R_s, R_ls);
return result;
}
int SimProcessBlock(dem_block demblock, ParameterInFile paras, matchPoint* result_shared, int* Pcount);
int ResamplingSim(ParameterInFile paras);
int ResampleGDAL(const char* pszSrcFile, const char* pszOutFile, float fResX, float fResY, GDALResampleAlg eResample);
/// <summary>
/// 模拟sar的处理算法模块。
/// 为了控制内存的取用
/// 线程数8 --以进程类的方式进行管理--使用队列的方法
/// 线程内存dem_block_size*sample_f*sample_f< 1 G
/// </summary>
/// <param name="paras">参数文件项</param>
/// <param name="thread_num">线程数默认为8</param>
/// <returns>执行情况</returns>
int SimProcess(ParameterInFile paras, int thread_num);
int SimProcess_LVY(ParameterInFile paras, int thread_num);
int WriteMatchPoint(string path, std::vector<matchPoint>* matchps);
// 测试函数接口
int testPTSN(ParameterInFile paras);
///
///
/// 考虑影像的插值方案
///
///
class ConvertResampleParameter {
public:
ConvertResampleParameter(string path);
ConvertResampleParameter(const ConvertResampleParameter& para);
~ConvertResampleParameter();
public:
string in_ori_dem_path;
string ori_sim;
string out_sar_xyz_path;
string out_sar_xyz_incidence_path;
string out_orth_sar_incidence_path;
string out_orth_sar_local_incidence_path;
string outFolder_path;
int file_count;
std::vector<string> inputFile_paths;
std::vector<string> outFile_paths;
std::vector<string> outFile_pow_paths;
int ori2sim_num;
long double* ori2sim_paras;
int sim2ori_num;
long double* sim2ori_paras;
};
inline int ori2sim(long double ori_x,long double ori_y,long double& sim_x,long double& sim_y,long double* conver_paras) {
long double xy = ori_x * ori_y;
long double x2 = ori_x * ori_x;
long double y2 = ori_y * ori_y;
sim_x = conver_paras[0] + ori_x * conver_paras[1] + ori_y * conver_paras[2] + x2 * conver_paras[3] + y2 * conver_paras[4] + xy * conver_paras[5];
sim_y = conver_paras[6] + ori_x * conver_paras[7] + ori_y * conver_paras[8] + x2 * conver_paras[9] + y2 * conver_paras[10] + xy * conver_paras[11];
return 1;
}
/// <summary>
/// 将模拟的行列号转换为目标行列号
/// </summary>
/// <param name="sim_r">模拟的行号</param>
/// <param name="sim_c">模拟的列号</param>
/// <param name="ori_r">待计算的目标行号</param>
/// <param name="ori_c">待计算的目标列号</param>
/// <param name="conver_paras">变换矩阵</param>
/// <returns>默认0 表示计算结束</returns>
inline int sim2ori(long double sim_r,long double sim_c,long double& ori_r,long double& ori_c, long double* conver_paras) {
long double xy = sim_r * sim_c;
long double x2 = sim_r * sim_r;
long double y2 = sim_c * sim_c;
ori_r = conver_paras[0] + sim_r * conver_paras[1] + sim_c * conver_paras[2] + x2 * conver_paras[3] + y2 * conver_paras[4] + xy * conver_paras[5];
ori_c = conver_paras[6] + sim_r * conver_paras[7] + sim_c * conver_paras[8] + x2 * conver_paras[9] + y2 * conver_paras[10] + xy * conver_paras[11];
return 0;
}
// 查询精确坐标
point GetOriRC(point& landp, ParameterInFile& paras, ConvertResampleParameter& convparas);
int SimProcessBlock_CalXYZ(dem_block demblock, ParameterInFile paras, ConvertResampleParameter converParas, matchPoint* result_shared, int* Pcount);
int SimProcess_CalXYZ(ParameterInFile paras, ConvertResampleParameter conveparas, int thread_num);
/*
dem->sim->ori(r,c) <--> ori
step1: dem ori -> ori_sim.tif (r,c,incidence,localincidence)
step2: a,b
*/
int SimProcess_Calsim2ori(ParameterInFile paras, ConvertResampleParameter conveparas, int thread_num); // 正射模块
/*
step1
step2:
*/
int SimProcess_ResamplingOri2Orth(ParameterInFile paras, ConvertResampleParameter conveparas, int thread_num);
/*
*/
int SimProcess_Calspow(ParameterInFile paras, ConvertResampleParameter conveparas, int thread_num); // 正射模块

View File

@ -0,0 +1,30 @@
#include "common.h"
#include <time.h>
#include <chrono>
#include <ctime>
/**
* @brief GetCurrentTime
* @return
*/
std::string getCurrentTimeString() {
std::time_t t = std::time(NULL);
char mbstr[100];
std::strftime(mbstr, sizeof(mbstr), "%Y-%m-%d %H:%M:%S",
std::localtime(&t));
std::string strTime = mbstr;
return strTime;
}
std::string getCurrentShortTimeString() {
std::time_t t = std::time(NULL);
char mbstr[100];
std::strftime(mbstr, sizeof(mbstr), "%H:%M:%S",
std::localtime(&t));
std::string strTime = mbstr;
return strTime;
}

View File

@ -0,0 +1,14 @@
#ifndef COMMON_H
#define COMMON_H
#include <iostream>
#include <string>
/**
* @brief GetCurrentTime
* @return
*/
std::string getCurrentTimeString();
std::string getCurrentShortTimeString();
#endif

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<ExecutablePath>C:\Program Files (x86)\Intel\oneAPI\mkl\2022.1.0\bin\intel64;$(VC_ExecutablePath_x64);$(CommonExecutablePath)</ExecutablePath>
<IncludePath>C:\Program Files (x86)\Intel\oneAPI\mpi\2021.6.0\include;C:\Program Files (x86)\Intel\oneAPI\mkl\2022.1.0\include;$(oneMKLIncludeDir);$(IncludePath)</IncludePath>
<LibraryPath>C:\Program Files (x86)\Intel\oneAPI\mkl\2022.1.0\lib\intel64;C:\Program Files (x86)\Intel\oneAPI\mpi\2021.6.0\lib\release;C:\Program Files (x86)\Intel\oneAPI\compiler\2022.1.0\windows\compiler\lib\intel64_win;$(LibraryPath)</LibraryPath>
<_PropertySheetDisplayName>mkl_debug_x64</_PropertySheetDisplayName>
</PropertyGroup>
<ItemDefinitionGroup>
<Link>
<AdditionalDependencies>mkl_intel_ilp64.lib;mkl_intel_thread.lib;mkl_core.lib;mkl_blacs_intelmpi_ilp64.lib;libiomp5md.lib;impi.lib;mkl_sequential.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<ExecutablePath>C:\Program Files (x86)\Intel\oneAPI\mkl\2022.1.0\bin\intel64;$(VC_ExecutablePath_x64);$(CommonExecutablePath)</ExecutablePath>
<IncludePath>C:\Program Files (x86)\Intel\oneAPI\mpi\2021.6.0\include;C:\Program Files (x86)\Intel\oneAPI\mkl\2022.1.0\include;$(oneMKLIncludeDir);$(IncludePath)</IncludePath>
<LibraryPath>C:\Program Files (x86)\Intel\oneAPI\mkl\2022.1.0\lib\intel64;C:\Program Files (x86)\Intel\oneAPI\mpi\2021.6.0\lib\release;C:\Program Files (x86)\Intel\oneAPI\compiler\2022.1.0\windows\compiler\lib\intel64_win;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup>
<Link>
<AdditionalDependencies>mkl_intel_ilp64.lib;mkl_intel_thread.lib;mkl_core.lib;mkl_blacs_intelmpi_ilp64.lib;libiomp5md.lib;impi.lib;mkl_sequential.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>

View File

@ -0,0 +1,11 @@
#include "taskprocess.h"
TaskProcess::TaskProcess()
{
}
TaskProcess::~TaskProcess()
{
}

View File

@ -0,0 +1,15 @@
#ifndef TASKPROCESS_H
#define TASKPROCESS_H
class TaskProcess
{
public:
TaskProcess();
~TaskProcess();
private:
};
#endif

View File

@ -0,0 +1,182 @@
#include "threadpool.hpp"
#include <sstream>
#include <string>
//#include <unistd.h>
#include <windows.h>
static const int MAX_THREADS = 10000; //最大线程数目
/**
* @brief ThreadPool
* @param number[in]线 *线
* @param
* emptyQuit[in]线退falsetruestartwaite
*/
ThreadPool::ThreadPool(int number, bool emptyQuit)
: m_StopFlag(false), m_EmptyQuit(emptyQuit), m_JoinFlag(false), m_QuitNum(0), m_EmptyQuitWaite(false) {
std::cout << "线程池中线程数:" << number << std::endl;
if (number <= 0 || number > MAX_THREADS) throw std::exception();
m_ThreadNum = number;
}
ThreadPool::~ThreadPool() {
// std::cout << "~ThreadPool()" << std::endl;
stop();
}
/**
* @brief stop
*/
void ThreadPool::stop() {
//保证多线程情况下只调用一次stopThreadGroup
std::call_once(m_CallStopSlag, [this] { stopThreadGroup(); });
}
/**
* @brief stopThreadGroup 线
*/
void ThreadPool::stopThreadGroup() {
m_StopFlag = true;
Sleep(500);
m_Condition.notify_all();
waiteFinish(); //等待线程退出
std::thread* thread = NULL;
for (int i = 0; i < m_WorkThreads.size(); i++)
{
thread = m_WorkThreads[i];
if (thread != NULL)
{
thread->join();
delete thread;
thread = NULL;
}
m_WorkThreads[i] = NULL;
}
m_WorkThreads.clear();
}
/**
* @brief startThread 线
*/
void ThreadPool::startThread() {
for (int i = 0; i < m_ThreadNum; i++) {
std::thread* thread = new std::thread(ThreadPool::worker, this);
m_WorkThreads.push_back(thread);
}
}
/**
* @brief waiteThreadFinish 线
*/
void ThreadPool::waiteThreadFinish() {
if (m_JoinFlag) return;
if (m_EmptyQuit)
{
m_EmptyQuitWaite = true;
do
{
if (m_ThreadNum == m_QuitNum)
break;
Sleep(400);
} while (true);
m_StopFlag = true;
m_Condition.notify_all();
}
/* for (int i = 0; i < work_threads.size(); i++) {
if (work_threads[i]) { work_threads[i]->join(); }
}*/
m_JoinFlag = true;
}
/**
* @brief start
*/
void ThreadPool::start() {
std::call_once(m_CallStartSlag, [this] { startThread(); });
}
/**
* @brief waiteFinish ,退
*/
void ThreadPool::waiteFinish() {
std::call_once(m_CallWaiteFinisFlag, [this] { waiteThreadFinish(); });
}
/**
* @brief
*/
int ThreadPool::taskNum()
{
return m_TasksQueue.size();
}
/**
* @brief append task_queue<T *>
* @param task
* @return
*/
bool ThreadPool::append(Task task) {
/*操作工作队列时一定要加锁,因为他被所有线程共享*/
m_DataMutex.lock();
m_TasksQueue.push(task);
m_DataMutex.unlock();
m_Condition.notify_one(); //线程池添加进去了任务,自然要通知等待的线程
return true;
}
/**
* @brief worker 线
* @param arg
* @return
*/
void* ThreadPool::worker(void* arg) {
ThreadPool* pool = (ThreadPool*)arg;
pool->run();
return pool;
}
/**
* @brief notEmpty
* @return
*/
bool ThreadPool::notEmpty() {
bool empty = m_TasksQueue.empty();
if (empty) {
// std::ostringstream oss;
// oss << std::this_thread::get_id();
// printf("queue empty thread id %s waite...!\n", oss.str().c_str());
}
return !empty;
}
/**
* @brief run 线,
*/
void ThreadPool::run() {
bool flag = false;
int remainder = 0;
while (!m_StopFlag) {
flag = false;
{
std::unique_lock<std::mutex> lk(this->m_QueueMutex);
/* unique_lock() 出作用域会自动解锁 */
m_Condition.wait(lk, [this] { return m_StopFlag || notEmpty(); });
}
if (m_StopFlag) break;
Task task;
m_DataMutex.lock();
//如果任务队列不为空,就停下来等待唤醒
if (!this->m_TasksQueue.empty()) {
task = m_TasksQueue.front();
m_TasksQueue.pop();
remainder = m_TasksQueue.size();
flag = true;
}
m_DataMutex.unlock();
if (flag) task();
//如果队列为空并且完成退出,已经开始等待退出就退出
if (m_TasksQueue.empty() && m_EmptyQuit && m_EmptyQuitWaite)
{
break;
}
}
m_QuitNum += 1;
std::ostringstream oss;
oss << std::this_thread::get_id();
printf("thread %s end\n", oss.str().c_str());
}

View File

@ -0,0 +1,102 @@
#ifndef THREADPOOL_HPP
#define THREADPOOL_HPP
#include <atomic>
#include <condition_variable>
#include <functional>
#include <iostream>
#include <memory> //unique_ptr
#include <queue>
#include <stdexcept>
#include <thread>
#include <vector>
typedef std::function<void(void)> Task;
class ThreadPool {
public:
/**
* @brief ThreadPool
* @param number[in]线 *线
* @param
* emptyQuit[in]线退falsetruestartwaite
*/
ThreadPool(int number = 1, bool emptyQuit = false);
~ThreadPool();
/**
* @brief append task_queue<T *>
* @param task
* @return
*/
bool append(Task task);
/**
* @brief start
*/
void start();
/**
* @brief stop
*/
void stop();
/**
* @brief waiteFinish ,退
*/
void waiteFinish();
/**
* @brief
*/
int taskNum();
private:
/**
* @brief worker 线
* @param arg
* @return
*/
static void *worker(void *arg);
/**
* @brief run 线,
*/
void run();
/**
* @brief stopThreadGroup 线
*/
void stopThreadGroup();
/**
* @brief startThread 线
*/
void startThread();
/**
* @brief waiteThreadFinish 线
*/
void waiteThreadFinish();
/**
* @brief notEmpty
* @return
*/
bool notEmpty();
private:
std::vector<std::thread *> m_WorkThreads; /*工作线程*/
std::queue<Task> m_TasksQueue; /*任务队列*/
std::mutex m_QueueMutex;
std::condition_variable m_Condition; /*必须与unique_lock配合使用*/
std::recursive_mutex m_DataMutex; //数据锁
std::atomic_bool m_StopFlag; //是否停止标志
std::once_flag m_CallStopSlag;
std::once_flag m_CallStartSlag;
std::once_flag m_CallWaiteFinisFlag;
int m_ThreadNum; //线程数
std::atomic_bool m_EmptyQuit; //无任务退出模式,改模式先添加任务,再启动
std::atomic_bool m_JoinFlag; //线程是否Join
std::atomic_bool m_EmptyQuitWaite;//开始退出等待
std::atomic_int m_QuitNum;//退出的线程计数
};
typedef std::shared_ptr<ThreadPool> ThreadPoolPtr;
#endif // THREADPOOL_HPP

View File

@ -0,0 +1,20 @@
// testengiewithmkl.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//
#include <iostream>
int main()
{
std::cout << "Hello World!\n";
}
// 运行程序: Ctrl + F5 或调试 >“开始执行(不调试)”菜单
// 调试程序: F5 或调试 >“开始调试”菜单
// 入门使用技巧:
// 1. 使用解决方案资源管理器窗口添加/管理文件
// 2. 使用团队资源管理器窗口连接到源代码管理
// 3. 使用输出窗口查看生成输出和其他消息
// 4. 使用错误列表窗口查看错误
// 5. 转到“项目”>“添加新项”以创建新的代码文件,或转到“项目”>“添加现有项”以将现有代码文件添加到项目
// 6. 将来,若要再次打开此项目,请转到“文件”>“打开”>“项目”并选择 .sln 文件

View File

@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{c26dab80-43be-4542-a2a3-7b5acb6e35e6}</ProjectGuid>
<RootNamespace>testengiewithmkl</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="testengiewithmkl.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="源文件">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="头文件">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="资源文件">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="testengiewithmkl.cpp">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>