Monday, January 16, 2017

Visual Studio Code

in ubuntu linux : /usr/bin/code is the binary

Monday, January 09, 2017

General Unix Commands

wanna find a complete library path in linux?  try: ldconfig -p | grep libOpenCL
find -name foo.txt finds a file in a directory structure, seems default is recursive descent 

Friday, December 30, 2016

Quick Python notes

In python shell, use execfile('') to execute directly in the shell. Mostly trivia, not a good way to do things but don't want to look this up again if it comes up.

Thursday, December 29, 2016

Tensorflow installation on ubuntu linux hints

tensorflow 'Download and Setup' instructions seem to be great (verified for only installing the CPU version).

minor clarification: When reading the installation instructions you can disregard the part that says 'install tensorflow' if the command pip install tensorflow worked for you. no indentation on that page makes it a tiny bit ambiguous in the section 'Pip installation' on page:

Ubuntu hints

notes about ubuntu install for a NUC:

created a bootable USB with these instructions:

in particular the rufus tool was key to making this painless.

must also do:

sudo apt update
sudo apt upgrade

or the 'ubuntu software' tools won't work/broke when i tried to install emacs.

creating a shared drive with windows host:
with virtual mx shut down, go to 'edit virtual machine settings', select vmware options tab, select drive to share and name it
the drive will appear under /mnt/hgfx/ when you turn virtual machine back on

Saturday, December 24, 2016

Ubuntu in VMWare display issue?

only coming up in 800x600 or VGA? suspend the client, then resume it. seems to resolve issue for me. will update if i find this incorrect.

resizing the windows window also seemed to work.

Thursday, December 22, 2016

Where are Linux OpenCL SDKs installed?

you were wondering that too?

they are in the /opt directory:
cd /opt/intel/
cd /opt/AMDAPPSDK-3.0/

basic command line (confirmed to compile, not execute):
gcc -L/opt/intel/intel-opencl-1.2- -o target 1.c -lOpenCL

Tuesday, December 06, 2016

dispatch table with function pointers in C simple sample

#include "stdio.h"
#include "string.h"

void foo() {
printf("in foo\n");
void bar() {
printf("in bar\n");
void foo2() {
printf("in foo2\n");
struct table_entry_s { char *name; void(*function)(); };

typedef struct table_entry_s table_t;

//populate the table
table_t dispatchTable[256] =
{ {"foo", foo}, {"bar", bar}, {"foo2", foo2}, {NULL, NULL} };

#define NUM_ENTRIES 3

void dispatchKernel(char *string)
int iFound = 0;

printf("dispatchKernel with %s\n", string);

for (int i = 0; i < NUM_ENTRIES; i++)
char *result = NULL;
result = strstr(string, dispatchTable[i].name);
if (result == NULL)
printf("%s was not in %s\n", dispatchTable[i].name, string);
iFound = 1;
printf("Found %s in %s\n", dispatchTable[i].name, string);

void main()

printf("dispatchTable[0] name = %s\n", dispatchTable[0].name);
printf("dispatchTable[1] name = %s\n", dispatchTable[1].name);
printf("dispatchTable[2] name = %s\n", dispatchTable[2].name);





Wednesday, November 16, 2016

doxygen getting started

i'm sure i'll add more to this later, but just spent an hour getting this up and running and don't want to forget this:

when creating the doxyfile.txt for your project, if you want to add (for example) .cl files as input, you might need to make the addition in two places. first to tell it to look for these types of files and the second is how you want these files treated when parsing the marked up file: EXTENSION_MAPPING as well as FILE_PATTERNS variable. Also don't forget to point the OUTPUT_DIRECTORY and INPUT to the appropriate locations.


and add this to FILE_PATTERNS = blah blah \ *.cl

Your file won't be parsed if you don't add this to the top of the .cl file (self referential statement):

/*! \file
\brief A test file class.

A more detailed class description.

Running Doxygen (basics):

To run doxygen (assuming it has been added to your path) you can traverse to the directory that the template you generated lives (doxyfile.txt) and it will grab the template. Not recommending this for production but just for getting things up and running.

Monday, August 22, 2016

Creating Labels for Excel Columns

If you want the columns to have a label, the term you are looking for is 'categories', which does make sense, just not the way i was thinking about it, usually 'x-axis, y-axis or something like that in my head'

To give your columns names, select the little funnel looking icon, go to 'horizontal (category) axis labels' select 'edit', then select the names you want each column to have from your spreadsheet and the fields will populate as you expect.

just another note for my own personal FYI.