-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Cpp DLL * Code Cleaning * Update README.md * bug fix * fix utility * Add .NET 8 * Update README
- Loading branch information
1 parent
de13b6e
commit 098350c
Showing
28 changed files
with
591 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"profiles": { | ||
"Demo": { | ||
"commandName": "Project", | ||
"nativeDebugging": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "NativeAccelerator.h" | ||
#include "math.h" | ||
|
||
double StartIteration(struct Term* terms, int length, double tj, double tit) { | ||
double result = 0; | ||
for (int n = 0; n < length; n++) { | ||
double u = terms[n].aa + terms[n].bb * tj; | ||
double su = sin(u); | ||
double cu = cos(u); | ||
result += tit * (terms[n].ss * su + terms[n].cc * cu); | ||
} | ||
return result; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#pragma once | ||
|
||
|
||
#ifdef DLLEXPORT// DLLEXPORT | ||
#define DLL_EXPORT __declspec(dllexport) | ||
#else | ||
#define DLL_EXPORT __declspec(dllimport) | ||
#endif | ||
|
||
struct Term | ||
{ | ||
double ss; | ||
double cc; | ||
double aa; | ||
double bb; | ||
}; | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
DLL_EXPORT double StartIteration(struct Term* terms,int length, double tj, double tit); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |
Oops, something went wrong.