Code generation from matlab function using my own BLAS function

2 views (last 30 days)
codegen is by default replacing multiplication with cblas_sgemm though the header file have fun definition with different name.
What is the correct approach. I want to replace maths operators with BLAS?
classdef ifxcallback < coder.BLASCallback
methods (Static)
function updateBuildInfo(buildInfo, ~)
buildInfo.addSourceFiles(fullfile(pwd,'BLAS','src.c'))
buildInfo.addIncludePaths(fullfile(pwd,'BLAS'));
end
function headerName = getHeaderFilename()
headerName = 'inc.h';
end
function intTypeName = getBLASIntTypeName()
intTypeName = 'int';
end
end
end
function p = useEnumNameRatherThanTypedef()
p = true;
end
  12 Comments
anamika kumari
anamika kumari on 6 Apr 2021
@Ryan Livingston Thank you very much for the proposal to raise an internal request. I, like many others are certain to find the curated list extraordinarily helpful. It helps prioritizing development activities.
Thanks a lot, again.
anamika kumari
anamika kumari on 20 Apr 2021
Edited: anamika kumari on 21 Apr 2021
@Ryan Livingston Assuming that a sequence of mathematical operation have been described using simulink operators (e.g. multiply, add, transpose), it should be possible to generate either a BLAS call or perhaps a call to a function defined in the code replacement library. In a specific case such as matrix multiply, it should be possible for code generator to either generate cblas_sgemm() or crl_matrix_multiply(). Given availability of two alternative definitions, is it possible to prioritize one code replacement style over other?
For e.g. can i get code for operator matrix multiplication mapped to BLAS function while getting the code for the matrix transpose operator mapped to function defined in code replacement library?

Sign in to comment.

Answers (0)

Categories

Find more on Get Started with GPU Coder in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!