Code generation from matlab function using my own BLAS function

1 次查看(过去 30 天)
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 个评论
anamika kumari
anamika kumari 2021-4-6
@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 2021-4-20
编辑:anamika kumari 2021-4-21
@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?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with GPU Coder 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by