Maple für Professional
Maple für Akademiker
Maple für Studenten
Maple Personal Edition
Maple Player
Maple Player für iPad
MapleSim für Professional
MapleSim für Akademiker
Maple T.A. - Testen & beurteilen
Maple T.A. MAA Placement Test Suite
Möbius - Online-Courseware
Machine Design / Industrial Automation
Luft- und Raumfahrt
Fahrzeugtechnik
Robotics
Energiebranche
System Simulation and Analysis
Model development for HIL
Anlagenmodelle für den Regelungsentwurf
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematikausbildung
Technik
Allgemein- und berufsbildende Schulen
Testen und beurteilen
Studierende
Finanzmodelle
Betriebsforschung
Hochleistungsrechnen
Physik
Live-Webinare
Aufgezeichnete Webinare
Geplante Veranstaltungen
MaplePrimes
Maplesoft-Blog
Maplesoft-Mitgliedschaft
Maple Ambassador Program
MapleCloud
Technische Whitepapers
E-Mail Newsletters
Maple-Bücher
Math Matters
Anwendungs-Center
MapleSim Modell-Galerie
Anwenderberichte
Exploring Engineering Fundamentals
Lehrkonzepte mit Maple
Maplesoft Welcome-Center
Resource-Center für Lehrer
Help-Center für Studierende
define_external(..., GENARGS=f, ...) - save an external procedure
Calling Sequence
define_external( functionName ..., GENARGS=f, ...)
Parameters
functionName
-
name of externally defined subroutine
f
procedure used to generate a partial argument list
Description
Procedures returned by the define_external command contain runtime information about the linkage to their corresponding external library. Instead of saving this information which is only valid for the current session, Maple saves the original parameter sequence passed to define_external. These parameters are used to regenerate the external procedure in the next Maple session.
The parameters used by define_external are not always machine independent. For example, on a Windows machine you may link to "mystuff.dll", while on a Linux box, the filename must be "libmystuff.so". Similarly, arguments may contain installation specific references to paths. Use the GENARGS=f option to specify a command to generate platform-specific arguments to define_external. This option is replaced by the return value of . This happens before processing of all arguments.
Examples
The following links to the Windows version of clapack.dll that comes with Maple. If you only ever use this function on Windows, it is fine to declare it in the usual way.
dgetrf := define_external('dgetrf_',
'm':REF(integer[4]),
'n':REF(integer[4]),
'a':ARRAY(float[8]),
'lda':REF(integer[4]),
'ipiv':ARRAY(integer[4]),
'info':REF(integer[4]),
'LIB'="clapack.dll"
):
If you want to use the same function on both Windows and Linux, you may want to declare it as follows.
'GENARGS'=proc()
'LIB'=ExternalCalling:-ExternalLibraryName("clapack");
end proc
Other arguments can be returned as well as 'LIB'. When defining a named procedure, ensure it is saved.
clapack_args := proc( fn:string )
if fn = "dgetrf_" then
end if;
end proc;
dgetrf := define_external("dgetrf_",'GENARGS'=clapack_args):
See Also
COMPILE_OPTIONS, CustomWrapper, define_external, define_external,types, SharedLibrary, trademarks, WRAPPER
Download Help Document