Skip to content

Add matfrostfunction macro #68

@jorisbelierasml

Description

@jorisbelierasml

i.e. a @matfrostfunction macro that will do:

  1. Check validity of function to be exposed.
  2. Add precompilation statements
  3. Create cfunction to be used in MEX.

For:

@matfrostfunction function broadcast_multiply(c::Float64, v::Vector{Float64})...
  1. Check validity.
    a. Are types concrete entirely
    b. Does function have only a single method implementation.

  2. Create the

function _matfrostfunction_broadcast_multiply(mfa::MATFrostArray)...
  1. Create a function to pull c function pointers
_matfrostfunction_c_broadcast_multiply() = @cfunction(matfrostfunction_broadcast_multiply, MATFrostArray, (MATFrostArray,))
  1. Add precompilation statements. (If necessary.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions