mcc

Why are some functions extremely long? (ideas needed for an academic research!)

Hi, I am writing a small academic research project about extremely long functions. Obviously, I am not looking for examples for bad programming, but for examples of 100, 200 and 600 lines long functions which makes sense. I will be investigating the Linux kernel source using a script written for a Master's degree written in the Hebrew ...

Can this kernel function be more readable? (Ideas needed for an academic research!)

Following my previous question regarding the rationale behind extremely long functions, I would like to present a specific question regarding a piece of code I am studying for my research. It's a function from the Linux Kernel which is quite long (412 lines) and complicated (an MCC index of 133). Basically, it's a long and nested switch...

How to extract a single function from a source file

Hi, I'm working on a small academic research about extremely long and complicated functions in the Linux kernel. I'm trying to figure out if there is a good reason to write 600 or 800 lines-long functions. For that purpose, I would like to find a tool that can extract a function from a .c file, so I can run some automated tests on the ...

Matlab deployment: add files to source control?

I've created a deployment project which works rather well and now I want to add it to source control repository for others to use. The main problem I'm facing is that the .prj file which deploytool creates contains absolute paths which will not work on other computers. So far I've tried the following: Create the stand alone exe using j...

MATLAB arbitrary code execution

I am writing an automatic grader program under linux. There are several graders written in MATLAB, so I want to tie them all together and let students run a program to do an assignment, and have them choose the assignment. I am using a C++ main program, which then has mcc-compiled MATLAB libraries linked to it. Specifically, my progra...

How do I change the Mobile Country Code (MCC) in the Android Emulator?

My Android application needs to react differently to different Mobile Country Codes. It seems like it is hardcoded to mcc310 (US). I can read this value from TelephonyManager.getSimCountryIso() or by using a resource folder like res/values-mcc123/, but how do I set this value in the emulator? ...

How to compile matlab script for specified Matlab Runtime (MCR)

Hello. I have Matlab 2010a installed on my machine, and MCR 7.6 installed on client's machine. I try to figure out how can I compile my code for MCR 7.6. Currently mcc comlipes scripts for 7.9 ( which has been installed with Mathlab). Does mcc has any arguments for it, or parameters in cfg file? (or anything else) Thank you. ...

matlab shared c++ libraries and OpenCL

Hi, I have a project that requires lots of image processing and wanted to add GPU support to speed things up. I was wondering if i compiled my matlab into c++ shared library and called it from within OpenCL program, does that mean that the matlab code is going to be run on GPU? ...

The mcc compiler "Depfun error" when building dll with .NET-dependencies and Enumerations That Encapsulate Data

Hi! I ran into problems in MATLAB R2010b when creating a DLL that uses .NET-integration and enumerations with encapsulate data. Example: There is a .NET Assembly which is used in MATLAB, let's call it "MyAssembly" (MyAssembly.dll). There Matlab Enumerations Class "OpenMode" classdef OpenMode methods function obj = OpenMo...