봄 크리에이터 세일을 시작합니다! 4월 18일 오후 10시 59분까지 엄선된 콘텐츠를 최대 70% 할인받으세요.

MathVM

평점 없음

Math Expressions (parallel) evaluation and plotting

  • 지원 플랫폼
  • 지원 엔진 버전
    5.3
  • 다운로드 유형
    엔진 플러그인
    이 제품은 코드 플러그인과 함께 미리 빌드한 바이너리와 언리얼 엔진에 통합되는 모든 소스 코드를 포함하고 있으며 원하시는 엔진 버전에 설치하여 프로젝트에 따라 활성화할 수 있습니다.

MathVM exposes a simple framework (both C++ and Blueprint) for running user-defined math expressions:

y = sin(x) * 2

This expression will compute the sin of x and multiply it by 2. The result will be put in y.


The two symbols (x and y), can be local variables or globals (more on this below) and, in the case of x, it can be a constant.


There is a very important difference between local and global: MathVM supports running expressions in parallel (read: on multiple threads) but while accessing local variables is fully thread-safe and lock-free (each thread works on a different copy of them), global variables are shared between parallel evaluations.


For global variables a locking is required to avoid race conditions (see below). Constants are shared and lock-free (but obviously you cannot change them).


The native data type is double and multiple statements can be specified by using the ; separator:

y = tan(x * 2); y = y + (3 * sin(z)); final = y + x;

If there are parts of your expressions that works over global variables (or resources, see below), and you want to avoid race conditions you can "surround" critical sections with curly brackets (braces):

y = sin(z); {x = x + 1;}

Here the x increment (assuming x is a global variable) will be under lock.


Note: the compiler will automatically detect deadlocks


A plotter is included for drawing simple lines/points based graphs.


The plugin is open source under the MIT license. This marketplace version is meant for supporting the development of the project.

기술적 세부사항

Features:

  •  Runtime evaluation of Math Expressions
  •  Parallel evaluation
  •  Plotting of results


Code Modules:

  •  MathVM (Runtime)


Number of Blueprints: 1

Number of C++ Classes: 10

Network Replicated: No

Supported Development Platforms: Windows, Linux, Mac

Supported Target Build Platforms: Windows, Linux, Mac, Android, iOS

Documentation: https://github.com/rdeioris/MathVM/blob/master/README.md