mxGetProperty function in octave - octave

I'm trying to adopt some C-coded matlab module to octave. mkoctave returns batch of warning, but no errors and generates mex file. However octave cannot load this file and returns an error:
error: JustKmodel.m: /home/simulations/exampls/RetinalMap-master/stepFastGlobal.mex:
failed to load: /home/simulations/exampls/RetinalMap-master/stepFastGlobal.mex: undefined symbol: mxGetProperty
As far as I can understand there is no such function GetProperty or library isn't available.
I'll appreciate any ideas how to work around this problem

Related

Identifier "cusparseXXX" is undefined on cuda11

I'm building a package tested for CUDA 9,10 from source, trying to compile it for CUDA11.
I've already changed gencode=arch=compute_70 (was set on 30), and added
target_link_libraries(tsnecuda ${CUDA_cusparse_LIBRARY})
Unfortunately, I still get
tsne-cuda/src/util/math_utils.cu(153): error: identifier "cusparseScsr2csc" is undefined
tsne-cuda/src/util/math_utils.cu(165): error: identifier "cusparseXcsrgeamNnz" is undefined
tsne-cuda/src/util/math_utils.cu(195): error: identifier "cusparseScsrgeam" is undefined
3 errors detected in the compilation of "tsne-cuda/src/util/math_utils.cu".
CMake Error at tsnecuda_generated_math_utils.cu.o.cmake:276 (message):
Error generating file
tsne-cuda/build/CMakeFiles/tsnecuda.dir/src/util/./tsnecuda_generated_math_utils.cu.o
Is there a chance the build process somehow ignores my target_link_libraries? Should I add something else?
Undefined identifier is a compilation issue, not a linking issue.
At least part of the problem here is that CUDA deprecated and removed some functionality from cusparse, including cusparse<t>csr2csc(). The code would need to be rewritten to compile correctly under the latest versions of CUDA 11.x.
For example, for csr2csc, the call to cusparseScsr2csc might be refactored to use this function instead.
One example of deprecation/removal notice for cusparse<t>csr2csc is given here.

Fsharp CSV parsing

I'm trying to get this to work
http://fsharp.github.io/FSharp.Data/library/CsvFile.html
But to me it seems like tha CsvFile class and the CSVextionson are removed of the Data lib
I'm running it on Manjaro (Arclinux system)
I'm using the mono compiler (fsharpc)
I got the dotnet core lib
So nothing should be wrong
please help
EDITED
Code
open FSharp.Data
let msft = CsvFile.Load("https://github.com/kam1986/Data-Science-project/blob/master/news_sample.csv")
It is placed in a .fsx file
get hte error message
Fake News.fsx(3,14): error FS0039: The value, namespace, type or module 'CsvFile' is not defined.

VS2017 - Error overloading function with different template template parameters with same argument

Error overloading function with different template template parameters with same argument
In VS2017 I am getting an error
error C2535: 'bool
However, the two function declarations clearly have different arguments.
This code compiles fine on GCC.
I found a similar error here:
Error overloading function with different template template parameters with same argument
Could anybody suggest a solution as I want to code to be the same for linux and windows and compile with both GCC and MSVC.

TypeScript 'var' is undefined error

I built a console app to find all the *.ts files in my project and then compile them using tsc.exe.
Everything was working fine, but as I converted my JavaScript files to TypeScript, I eventually ran into the following error:
ytsc.js(21053, 17) Microsoft JScipt runtime error: 'window' is undefined
Each time this happened when I was trying to extend window:
window['prop'] = "something";
I tested the code until I found the answer, which had little to do with my code...
The fault was my build tool.
I had declared the -e (execute) command line option when calling tsc.exe:
I did this because I thought I might add some automated testing code in the modules.
The cause for the error:
Most of my code is in functions.
However, there were a few places that I wanted to extend 'window' (for example if a built in function is missing from an old browser, I was shimming those calls). The code to shim the window object was running as the file loaded:
if (window.fun == null) {
window.fun = function(){...};
}
Anyway, because of the -e option, the tsc.exe was attempting to run the code (outside of a browser environment). This caused the above error.

defmacro not defined in ClojureScript?

I'm trying to use defmacro in ClojureScript, but I'm getting a console error:
TypeError: 'undefined' is not an object (evaluating 'crd.core.defmacro.call')
Here's the test code that's generating the error:
(ns crd.core)
(defmacro t [] `())
And the generated JavaScript code:
goog.provide('crd.core');
goog.require('cljs.core');
crd.core.defmacro.call(null,crd.core.t,cljs.core.Vector.fromArray([]),null);
Any pointers on what I'm doing wrong?
My failure: I didn't read Differences from Clojure. ClojureScript does support macros, but only in .clj files that are imported with require-macros.