This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CLContext context = JavaCL.createBestContext(DeviceFeature.GPU); | |
CLQueue queue = context.createDefaultQueue(); | |
ByteOrder byteOrder = context.getByteOrder(); | |
// Read the program sources and compile them : | |
String src = IOUtils.readText(SampleSolverService.class.getResource(KERNEL_PATH)); | |
CLProgram program = context.createProgram(src); | |
// I/O BUFFERS DECLARATION | |
Pointer<Float> I_in_Ptr = allocateFloats(ELEM_COUNT).order(byteOrder); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jun 28, 2012 1:04:08 PM com.nativelibs4java.opencl.JavaCL log | |
WARNING: At least one OpenCL platform uses OpenCL 1.0, which is not thread-safe: will use (slower) synchronized low-level bindings. | |
Jun 28, 2012 1:04:08 PM org.bridj.AbstractBridJRuntime log | |
SEVERE: Failed to get address of method public synchronized native long com.nativelibs4java.opencl.library.OpenCLLibrary$SynchronizedNative.clCreateSubBuffer(long,long,int,long,long) | |
Jun 28, 2012 1:04:08 PM org.bridj.AbstractBridJRuntime log | |
SEVERE: Failed to get address of method public synchronized native int com.nativelibs4java.opencl.library.OpenCLLibrary$SynchronizedNative.clSetMemObjectDestructorCallback(long,long,long) | |
Jun 28, 2012 1:04:08 PM org.bridj.AbstractBridJRuntime log | |
SEVERE: Failed to get address of method public synchronized native long com.nativelibs4java.opencl.library.OpenCLLibrary$SynchronizedNative.clCreateUserEvent(long,long) | |
Jun 28, 2012 1:04:08 PM org.bridj.AbstractBridJRuntime log | |
SEVERE: Failed to get address of method public synchro |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"While the connectivity of the head circuit for locomotion is known, the roles of the individual neurons are somewhat unclear. One contributing factor is that the dense packing of neurons in the nerve ring makes laser ablation of specific cells more difficult." | |
"When a healthy worm is touched on the nose, it will immediately start backing up [24]. Similarly if touched on the tail, it will reverse direction if currently backing up, and will accelerate if going forward" | |
Source: http://www.comp.leeds.ac.uk/jboyle/JordanBoyle_files/J_Boyle_PhD.pdf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [ fitness ] = majorityClassificationFitness( rule , varargin ) | |
%CALCULATEFITNESS | |
% this function calculates performance fitness of given rule - returns a | |
% scalar calculated as successfulRuns/TotalRuns. Takes a 128 bits vector | |
% representing a CA rule for a neighborhood of radius 3. | |
% Note: A lot of (if not all) the costants declared here could be passed down as | |
% parameters - but since this is going to be used as the fitness function | |
% in a Genetic Algorithm very specific to the problem at hand to be called | |
% from the matlab Genetic Algorithm toolkit, it is more practical to pass | |
% down as input param only the transformation rule. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [ fitness ] = majorityClassificationFitness( rule , varargin ) | |
%CALCULATEFITNESS | |
% this function calculates performance fitness of given rule - returns a | |
% scalar calculated as successfulRuns/TotalRuns. Takes a 128 bits vector | |
% representing a CA rule for a neighborhood of radius 3. | |
% Note: A lot of (if not all) the costants declared here could be passed down as | |
% parameters - but since this is going to be used as the fitness function | |
% in a Genetic Algorithm very specific to the problem at hand to be called | |
% from the matlab Genetic Algorithm toolkit, it is more practical to pass | |
% down as input param only the transformation rule. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [ fitness ] = majorityClassificationFitness( rule , varargin ) | |
%CALCULATEFITNESS | |
% this function calculates performance fitness of given rule - returns a | |
% scalar calculated as successfulRuns/TotalRuns. Takes a 128 bits vector | |
% representing a CA rule for a neighborhood of radius 3. | |
% Note: A lot of (if not all) the costants declared here could be passed down as | |
% parameters - but since this is going to be used as the fitness function | |
% in a Genetic Algorithm very specific to the problem at hand to be called | |
% from the matlab Genetic Algorithm toolkit, it is more practical to pass | |
% down as input param only the transformation rule. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public enum TweetSectionType { NormalText, Url, AtName, HashCode } | |
public class TweetSection | |
{ | |
public TweetSectionType SectionType; | |
public string Text; | |
} | |
public class TweetDecoder | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public enum TweetSectionType { NormalText, Url, AtName, HashCode } | |
public class TweetSection | |
{ | |
public TweetSectionType SectionType; | |
public string Text; | |
} | |
public class TweetDecoder | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [ Population ] = genHighDiversityPop(GenomeLength, FitnessFcn, options) | |
%generateHighDensityPopulation generates initial population of rules | |
% This function generates popSize rules of size chromSize. The rules are | |
% generated with pseudo-uniform distribution of densitites of 1s, spanning from | |
% very low to very high as this facilitates evolution. | |
%constants | |
chromSize = GenomeLength; | |
popSize = 100; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [ fitness ] = majorityClassificationFitness( rule , varargin ) | |
%CALCULATEFITNESS | |
% this function calculates performance fitness of given rule - returns a | |
% scalar calculated as successfulRuns/TotalRuns. Takes a 128 bits vector | |
% representing a CA rule for a neighborhood of radius 3. | |
% Note: A lot of (if not all) the costants declared here could be passed down as | |
% parameters - but since this is going to be used as the fitness function | |
% in a Genetic Algorithm very specific to the problem at hand to be called | |
% from the matlab Genetic Algorithm toolkit, it is more practical to pass | |
% down as input param only the transformation rule. |