• Stars
    star
    112
  • Rank 312,240 (Top 7 %)
  • Language Pascal
  • Created almost 9 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

PasMP - a parallel-processing/multi-processing library for Object Pascal

PasMP

PasMP - a parallel-processing/multi-processing library for Object Pascal

License: zlib

Support me

Support me at Patreon

Features

  • Low-level-based design with optional high-level-based constructs
  • Designed for fully-strict fork-join model in mind (because it's less error-prone to work with it than with terminally-strict fork-join for my taste), but it can be also abused for more flexible models, the only important thing is, that you're releasing the jobs again as soon as they are completed (the simplest weay would be by calling TPasMP.Reset per workload-frame), otherwise you'll have memory leaks, or just use the PasMPJobFlagReleaseOnFinish flag.
  • It can be used as a job scheduler for multithreaded game engines and so on
  • Work-first lock-free work-stealing dynamic-sized Chase-Lev queue/deque (where only the resizing code part of it isn't lock-free, so that on the other hand it is garbage-collector-free)
  • Lock-free job memory allocator (al least lock-free on x86-32 and x86-64 targets)
  • Parallel-for pattern
  • Parallel intro sort (direct and indirect)
  • Parellel merge sort (direct and indirect)
  • Thread-safe single producer single consumer queue (untyped and typed, bounded-only, lock-free)
  • Thread-safe multiple producer multiple consumer stack (untyped and typed, bounded and unbounded, lock-free on x86-32/x86-64/ARM32, lock-based on another CPU targets)
  • Thread-safe multiple producer multiple consumer queue (untyped and typed, bounded and unbounded, lock-free on x86-32/x86-64/ARM32, lock-based on another CPU targets)
  • Thread-safe hash table (untyped and typed, hybrid-implementation of lock-free and fine-graded lock-based single-operation code parts)
  • Thread-safe dynamic-sized array (untyped and typed, fine-graded lock-based)
  • TPasMPMath class with class static useful (primary bit-twiddling) math function methods
  • TPasMPInterlocked class with class static atomic function methods
  • TPasMPMemoryBarrier class with class static memory barrier function methods
  • TPasMPMemory class with class static aligned memory allocation function methods
  • Synchronisation primitives:
    • TPasMPEvent
    • TPasMPSimpleEvent
    • TPasMPCriticalSection
    • TPasMPMutex
    • TPasMPConditionVariableLock
    • TPasMPConditionVariable
    • TPasMPSemaphore
    • TPasMPInvertedSemaphore
    • TPasMPMultipleReaderSingleWriterLock
    • TPasMPMultipleReaderSingleWriterSpinLock
    • TPasMPSlimReaderWriterLock
    • TPasMPSpinLock
    • TPasMPBarrier
  • Optional strict singleton usage option per global PasMPUseAsStrictSingletonInstance define (besides the option of usage of multiple PasMP instances)
  • Compatible with FreePascal >= 3.0.0 and Delphi >= 7
  • Cross platform (Windows (needs Vista or higher, so no XP, no 9x, no NT 3.x, no NT 4.x), Linux, etc.)

Target informations (i.e. System requirements)

  • 32-bit x86 targets must support the cmpxchg8b instruction (it present on most all post-80486 processors, so >= Pentium 1 and newer)
  • 64-bit x86 targets must support the cmpxchg16b instruction (early AMD64 processors before Revision F and some early stepping D Intel Nocona processors lacked the CMPXCHG16B instruction, otherwise all 64-bit x86 processors should have support for the cmpxchg16b instruction)
  • ARM targets must support the ldrexd and strexd instructions (it present on ARMv6k and ARMv7 and higher ARM processors)
  • MIPS targets aren't supported in the lock-free PasMP build variant (only as lock-based PasMP build variant), until I've found a way to do Double-Compare-And-Swap on the MIPS target. I would be most pleased to have your hints and suggestions to help up me to implement DCAS (or a lock-free ABA-free multiple producer multiple consumer queue and stack) on the MIPS target.
  • PowerPC targets aren't supported in the lock-free PasMP build variant (only as lock-based PasMP build variant), until I've found a way to do Double-Compare-And-Swap on the PowerPC target. I would be most pleased to have your hints and suggestions to help up me to implement DCAS (or a lock-free ABA-free multiple producer multiple consumer queue and stack) on the PowerPC target.

More Repositories

1

besen

Complete ECMAScript Fifth Edition Implemention in Object Pascal
Pascal
215
star
2

pasvulkan

Vulkan header generator, OOP-style API wrapper, framework and prospective Vulkan-based game engine for Object Pascal
Pascal
191
star
3

kraft

Kraft Physics Engine is an open source Object Pascal physics engine library that can be used in 3D games.
Pascal
110
star
4

flre

FLRE - Fast Light Regular Expressions - A fast light regular expression library
Pascal
94
star
5

rnl

RNL - Realtime Network Library - The opensource reliable UDP network library
Pascal
84
star
6

pacc

PACC (PAscal C Compiler) is an C compiler, which is implemented in Delphi-7-compatible Object Pascal
Pascal
64
star
7

berotinypascal

A self-hosting capable tiny pascal compiler for the Win32 x86 platform
Pascal
55
star
8

crosspascal

CrossPascal aims to be a Delphi 7 compatible cross-platform source-to-source compiler which generates intermediate C code.
Pascal
43
star
9

pasgltf

An Object-Pascal-native GLTF 2.0 low-level-data loader and writer for GLTF and GLB files
Pascal
33
star
10

pasjson

A unified JSON library for both Object-Pascal ecosystems (Delphi and FreePascal)
Pascal
31
star
11

sasm

SASM - Scriptable ASseMbler - A x86 assembler with ECMAScript as (additional) macro language as an optional compile-in-option
Pascal
27
star
12

pashtmldown

PasHTMLDown MarkDown Libary
Pascal
25
star
13

br808

BR808 is a originally demoscene-originated software synthesizer, which became a bit too big for 64k intros.
Pascal
20
star
14

pucu

PUCU Pascal UniCode Utils Libary
Pascal
17
star
15

poca

Yet another scripting language
Pascal
16
star
16

pasenet

Pascal port of ENet with IPv6 support
Pascal
16
star
17

brre

yet another efficient, principled regular expression library
Pascal
15
star
18

micro64disktool

A c64 diskette image converter tool
Pascal
12
star
19

pasdblstrutils

Pascal library for cross-compiler consistent and exact conversion between double-precision floating point number values and strings
Pascal
10
star
20

pasmultilang

An cross-compiler Object Pascal unit for internationalization and localization
Pascal
10
star
21

tine

TINE (This is not EFI) - A fake-(U)EFI boot loader for pure BIOS environments
Assembly
5
star
22

pasvulkan_old

PasVulkan with the full old too big history
Pascal
3
star