Machine code and assembly code is sometimes called native code when referring to platform-dependent parts of language features or libraries.

learn more… | top users | synonyms

3
votes
2answers
103 views

Hello World using Python embedded in C++, with RAII library initialization

I have written a small Hello World application that uses Python's C-API. The C library requires some functions to be called for global library (de-)initialization and the objects created by the ...
4
votes
1answer
102 views

Mean of the squares of differences for a large matrix

I have tried to obtain speed gains by transferring Matlab calculations to C and call it using .mex. My goal is to operate on a matrix \$B\$ which has roughly the dimension 10000x1000 $$ ...
6
votes
3answers
4k views

k-nearest neighbors using MATLAB with MEX

I have implemented kNN (k-nearest neighbors) as follows, but it is very slow. I want to get an exact k-nearest-neighbor, not the approximate ones, so I didn't use the FLANN or ANN libraries. ...
7
votes
1answer
210 views

Linspace method build in Python's C API

Today I built a linspace function in Python's C API: ...