Macaulay2 » Documentation
Packages » ForeignFunctions :: Table of Contents
next | previous | forward | backward | up | index | toc

# ForeignFunctions : Table of Contents

- ForeignFunctions -- foreign function interface
  - fast Fourier transform example -- fast Fourier transforms using foreign function calls to the FFTW library
  - general linear model example -- constrained least squares using foreign function calls to the LAPACK library
  - just-in-time compilation example -- using foreign function calls for computing Fibonacci numbers using JIT
  - foreignFunction -- construct a foreign function
  - SharedLibrary -- a shared library
    - openSharedLibrary -- open a shared library
  - ForeignType -- abstract foreign type
    - size(ForeignType) -- size of a foreign type
    - ForeignArrayType -- foreign array type
      - foreignArrayType -- construct a foreign array type
      - ForeignArrayType VisibleList -- cast a Macaulay2 list to a foreign array
    - ForeignIntegerType -- foreign integer type
      - mpzT -- GMP arbitrary-precision integer type
      - ForeignIntegerType Number -- cast a Macaulay2 number to a foreign integer object
    - ForeignPointerType -- foreign pointer type
      - ForeignPointerType Pointer -- cast a Macaulay2 pointer to a foreign pointer
      - * voidstar = Thing -- assign value to object at address
      - ForeignType * voidstar -- dereference a voidstar object
      - getMemory -- allocate memory using the garbage collector
    - ForeignPointerArrayType -- foreign type for NULL-terminated arrays of pointers
      - foreignPointerArrayType -- construct a foreign pointer array type
      - ForeignPointerArrayType VisibleList -- cast a Macaulay2 list to a foreign pointer array
    - ForeignRealType -- foreign real type
      - mpfrT -- MPFR multiple-precision floating-point type
      - ForeignRealType Number -- cast a Macaulay2 number to a foreign real object
    - ForeignStringType -- foreign string type
      - ForeignStringType String -- cast a Macaulay2 string to a foreign string
    - ForeignStructType -- foreign struct type
      - foreignStructType -- construct a foreign struct type
      - ForeignStructType VisibleList -- cast a hash table to a foreign struct
    - ForeignUnionType -- foreign union type
      - foreignUnionType -- construct a foreign union type
      - ForeignUnionType Thing -- cast a thing to a foreign union
    - ForeignVoidType -- foreign void type
  - ForeignObject -- foreign object
    - foreignObject -- construct a foreign object
    - foreignSymbol -- get a foreign symbol
    - value(ForeignObject) -- get the value of a foreign object as a Macaulay2 thing
    - ForeignType ForeignObject -- cast a foreign object to the given foreign type
    - registerFinalizer(ForeignObject,Function) -- register a finalizer for a foreign object
  - Pointer -- pointer to memory address
    - nullPointer -- the null pointer
    - address -- pointer to type or object
    - ForeignType Pointer -- dereference a pointer