Skip to content

Instantly share code, notes, and snippets.

View sonney2k's full-sized avatar

Soeren Sonnenburg sonney2k

View GitHub Profile
scan-build --help
USAGE: scan-build [options] <build command> [build options]
OPTIONS:
-analyze-headers
Also analyze functions in #included files. By default, such functions
are skipped unless they are called by functions within the main source file.
#include <shogun/base/init.h>
#include <shogun/classifier/svm/SVMOcas.h>
#include <shogun/features/HashedDocDotFeatures.h>
#include <shogun/features/DenseFeatures.h>
#include <shogun/lib/NGramTokenizer.h>
#include <shogun/classifier/svm/SVMLight.h>
#include <shogun/lib/DelimiterTokenizer.h>
#include <shogun/io/LineReader.h>
#include <shogun/labels/BinaryLabels.h>
#include <shogun/classifier/svm/LibLinear.h>
#include <cstdlib>
#include <iostream>
#include <vector>
#include <string.h>
int main() {
int *c = (int*)malloc(sizeof(*c));
int *old_c = c;
size_t cnt_c = 0;
#include <cstdlib>
#include <iostream>
#include <vector>
int main() {
int *c = (int*)malloc(sizeof(*c));
int *old_c = c;
size_t cnt_c = 0;
std::vector<int> v(1);
#include <stdio.h>
#include <atomic>
int main(int argc, char** argv)
{
volatile std::atomic<int> x;
volatile int i;
for (i=0; i<100000000; i++)
#include <stdio.h>
#include <atomic>
int main(int argc, char** argv)
{
volatile std::atomic<int> x;
x.store(0);
IGNORE_IN_CLASSLIST class CLock
{
void init();
void destroy();
void lock();
void unlock();
#ifdef HAVE_PTHREAD
/** lock */
PTHREAD_LOCK_T lock;
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Written (W) 2013 Soumyajit De
*/
#include <shogun/lib/common.h>
@sonney2k
sonney2k / First Sketch.cpp
Created May 4, 2012 15:48 — forked from nicococo/Sketch.cpp
Shogun Structured Output Toolbox Interface
class CVanillaStructuredOutputMachine : public CMachine {
// Constructor, Destructor
CStructuredOutputMachine(
CStructuredData* trainset,CLoss* loss,CModel* model)
virtual ~CStructuredOutputMachine
// heritable data
CStructuredData* trainset
CLoss* loss
CModel* model
@sonney2k
sonney2k / nodifference.cpp
Created February 14, 2012 16:51
no difference
/*g++ -O9 -mfpmath=sse -march=native -mtune=native nodifference.cpp */
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <vector>
#include <cmath>
#include <sys/time.h>