Jump to content

bsvingen

Members
  • Posts

    280
  • Joined

  • Last visited

Files posted by bsvingen

  1. LU Solver

    A native Labview (wire) general real matrix solver.
    Based on BLAS (FORTRAN code included)

    152 downloads

    Submitted

  2. Pointer System

    Author:
    bsvingen - Bjornar Svingen
    --see readme file for contact information
    Description:
    A set of VIs that creates and controls pointer-data pairs. The basic idea is to simulate random access memory and malloc()/free() by using one single LV2 style global. The data type must specified in "..\Pointer\Data Typedef\Data Typedef__P.vi", or it can be replaced with an LVOOP class for LV 8.2. The only restriction to the number of references is the physical memory on the computer. The global stores data in an Array and uses a separate Bool Array to control access and free/protect the data.
    The "address" to the data is returned directly with no type conversion (int32). Basicly the LV2 global takes data as input, put the data in an array within the global and returns the index where the data is set. This index therefore becomes a pointer to the data, and can be used later to set and get data.
    The upper 8 bits of the pointer is used as a counter that is incremented by one for each new "dispose pointer" call. The "Get" and "Set" function checks these 8 bits in the pointer with corresponding counter array and throws an error if they are not equal. By doing this an error is thrown when trying to use a disposed pointer. Thanks to JFM for the counter code.
    Due to the inherent effectiveness of LV2 style globals and no type conversions, this method is twice as efficient as using queue primitives, see examples provided. Functions such as New, Get, Set etc can be found in the ..\Pointer folder. A project file is also provided for LV 8.x. A more general system that takes arbitrary types is called General Reference System and can be found on this Code repository.
    In contrast to queues that can be regarded as synchronous references to data, this reference system is fully asynchronous.
    Allocation and freeing of data is done dynamically.
    Allthough this pointer system may at first glance have some resemblence to "classic" GOOP, it is by no means a GOOP system. This pointer system is best regarded as a normal LV2 global, but with the difference that it returns a pointer (index) to the data, and therefore can be used for an arbitrary number of data.
    All the VIs in the library are documented.
    Version History:
    1.1.2
    Fixed "dispose pointer" and "obtain pointer from pointer". Some other small fixes.
    1.1.1
    Updated the counter so it will increment at each "dispose pointer" instead of "obtain pointer".
    1.1.0
    Updated the pointers so that the upper 8 bits is uses as a counter. Using a disposed pointer will therefore create an error. Thanks to JFM.
    Updated the allocation routine so 100 elements are added in one chunk. Thanks to JFM.
    1.0.1
    Updated this readme.txt file
    Fixed a bug in "Obtain P from P" function in the global.
    Added a placeholder VI (for easier conversion to LV7)
    1.0.0:
    Initial release of the code.

    1,006 downloads

    Submitted

  3. General reference system

    Author:
    bsvingen - Bjornar Svingen
    --see readme file for contact information
    Description:
    An LVOOP class that creates and controls reference-data pairs. The basic idea is to simulate random access memory and malloc()/free() by using one single LV2 style global. The data can be of any type (including any LVOOP class and strict typedefs) and can be allocated in any order. The only restriction to the number of references is the physical memory on the computer. The global stores data in a Variant Array and uses a separate Bool Array to control access and free/protect the data.
    The "address" to the data that is stored in the reference (LV Object) ,is the index in the Variant Array where the data is stored in the LV2 Global. By using Variant as the type, it is possible to get a reference to all types, and there is no need to manually change a typedef and possibly the names for every vi when more than one typedef will be used.
    A small performance penalty is introduced due to the type conversions to/from Variant. However, due to the inherent effectiveness of LV2 style globals, this method is still 2-3 times faster than an equivalent scheme made with wrappers around queue primitives, but slightly slower than using queue primitives directly, (no wrappers around the queues, see example provided). For an even faster reference system, twice the speed of queue primitives, se the separate "Pointer System" on this Code Repository.
    In contrast to queues that can be regarded as synchronous references to data, this reference system is fully asynchronous.
    Allocation and freeing of data is done dynamically.
    Allthough this reference system may at first glance have some resemblence to "classic" GOOP, it is by no means a GOOP system. The main purpose of the reference system is to have a fully asynchronous and fully reusable system for read and write access to one single instance of data in more than one place.
    All the VIs in the library are documented.
    Version History:
    1.0.3
    Added an example using queue primitives as references with no wrappers.
    Updated this Readme.txt
    1.0.2
    Minor fixes to the New function and some text.
    1.0.1
    Added this readme.txt file + some small cosmetic changes
    1.0.0:
    Initial release of the code.

    910 downloads

    Submitted

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.