Skip to content

Commit

Permalink
Extracted no mex template functions in externalCall lib.
Browse files Browse the repository at this point in the history
  • Loading branch information
hkhauke committed Feb 9, 2024
1 parent bb81281 commit fda90bd
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
1 change: 1 addition & 0 deletions sources/jvxLibraries/jvxLexternalCall/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ set(LOCAL_SOURCES

${CMAKE_CURRENT_SOURCE_DIR}/include/CjvxMexCallsProfileInterfacing.h
${CMAKE_CURRENT_SOURCE_DIR}/include/CjvxMexCallsProfileTpl.h
${CMAKE_CURRENT_SOURCE_DIR}/include/CjvxMexCallsProfileNoMexTpl.h
)

set(LOCAL_PCG_FILES
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#ifndef __CJVXMEXCALLSPROFILENOMEXTPL_H__
#define __CJVXMEXCALLSPROFILENOMEXTPL_H__

#include "CjvxMexCallsProfileInterfacing.h"

template <class T>
class CjvxMexCallsProfileNoMexTpl : public T, public CjvxMexCallsProfileInterfacing
{
protected:

public:
JVX_CALLINGCONVENTION CjvxMexCallsProfileNoMexTpl(JVX_CONSTRUCTOR_ARGUMENTS_MACRO_DECLARE) :
T(JVX_CONSTRUCTOR_ARGUMENTS_MACRO_CALL) {};

jvxErrorType prepare_connect_icon(JVX_CONNECTION_FEEDBACK_TYPE(fdb))
{
jvxErrorType res = T::prepare_connect_icon(JVX_CONNECTION_FEEDBACK_CALL(fdb));
if (res == JVX_NO_ERROR)
{
res = local_prepare_connect_icon(JVX_CONNECTION_FEEDBACK_CALL(fdb));
}
return res;
};

jvxErrorType postprocess_connect_icon(JVX_CONNECTION_FEEDBACK_TYPE(fdb))
{
jvxErrorType res = T::postprocess_connect_icon(JVX_CONNECTION_FEEDBACK_CALL(fdb));
if (res == JVX_NO_ERROR)
{
res = local_postprocess_connect_icon(JVX_CONNECTION_FEEDBACK_CALL(fdb));
}
return res;
};

jvxErrorType process_buffers_icon(jvxSize mt_mask, jvxSize idx_stage)
{
jvxErrorType res = JVX_NO_ERROR;

// Run core algorithm in C
res = local_process_buffers_icon(mt_mask, idx_stage);

// Forward calling chain
return fwd_process_buffers_icon(mt_mask, idx_stage);
};
};

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include "CjvxMexCallsProfileInterfacing.h"
#include "CjvxMexCallsTpl.h"

// ================================================================================================

template <class T>
class CjvxMexCallsProfileTpl : public CjvxMexCallsTpl<T>, public CjvxMexCallsProfileInterfacing
{
Expand Down

0 comments on commit fda90bd

Please sign in to comment.