<commit_before>#include "cones.h"

#define CONE_RATE (2)
#define CONE_TOL (1e-8)
#define EXP_CONE_MAX_ITERS (100)

#ifdef LAPACK_LIB_FOUND
/* underscore for blas / lapack, single or double precision */
#ifdef NOBLASUNDERSCORE
#ifndef FLOAT
#define BLAS(x) d ## x
#else
#define BLAS(x) s ## x
#endif
#else
#ifndef FLOAT
#define BLAS(x) d ## x ## _
#else
#define BLAS(x) s ## x ## _
#endif
#endif

#ifdef MATLAB_MEX_FILE
typedef ptrdiff_t blasint;
#elif defined BLAS64
#include <stdint.h>
typedef int64_t blasint;
#else
typedef int blasint;
#endif

void BLAS(syevr)(char* jobz, char* range, char* uplo, blasint* n, scs_float* a, blasint* lda, scs_float* vl,
		scs_float* vu, blasint* il, blasint* iu, scs_float* abstol, blasint* m, scs_float* w, scs_float* z, blasint* ldz,
		blasint* isuppz, scs_float* work, blasint* lwork, blasint* iwork, blasint* liwork, blasint* info);
void BLAS(syr)(const char *uplo, const blasint *n, const scs_float *alpha, const scs_float *x, const blasint *incx,
		scs_float *a, const blasint *lda);
void BLAS(axpy)(const blasint *n, const scs_float *alpha, const scs_float *dx, const blasint *incx, scs_float *dy,
		const blasint *incy);
/* private data to help cone projection step */
static struct ConeData_t {
	/* workspace for eigenvector decompositions: */
	scs_float * Xs, *Z, *e, *work;
	blasint *iwork, lwork, liwork;
}c;
#endif

static timer coneTimer;
static scs_float totalConeTime;

 /*<commit_msg>allow compile-time suffix for BLAS functions<commit_after>#include "cones.h"

#define CONE_RATE (2)
#define CONE_TOL (1e-8)
#define EXP_CONE_MAX_ITERS (100)

/* Default to underscore for blas / lapack */
#ifndef BLASSUFFIX
#define BLASSUFFIX _
#endif

#ifdef LAPACK_LIB_FOUND
#define paste(pre,x,post) pre ## x ## post
#define paste_(pre,x,post) paste(pre,x,post)
/* single or double precision */
#ifndef FLOAT
#define BLAS(x) paste_(d,x,BLASSUFFIX)
#else
#define BLAS(x) paste_(s,x,BLASSUFFIX)
#endif

#ifdef MATLAB_MEX_FILE
typedef ptrdiff_t blasint;
#elif defined BLAS64
#include <stdint.h>
typedef int64_t blasint;
#else
typedef int blasint;
#endif

void BLAS(syevr)(char* jobz, char* range, char* uplo, blasint* n, scs_float* a, blasint* lda, scs_float* vl,
		scs_float* vu, blasint* il, blasint* iu, scs_float* abstol, blasint* m, scs_float* w, scs_float* z, blasint* ldz,
		blasint* isuppz, scs_float* work, blasint* lwork, blasint* iwork, blasint* liwork, blasint* info);
void BLAS(syr)(const char *uplo, const blasint *n, const scs_float *alpha, const scs_float *x, const blasint *incx,
		scs_float *a, const blasint *lda);
void BLAS(axpy)(const blasint *n, const scs_float *alpha, const scs_float *dx, const blasint *incx, scs_float *dy,
		const blasint *incy);
/* private data to help cone projection step */
static struct ConeData_t {
	/* workspace for eigenvector decompositions: */
	scs_float * Xs, *Z, *e, *work;
	blasint *iwork, lwork, liwork;
}c;
#endif

static timer coneTimer;
static scs_float totalConeTime;

 /*
{'fraction_non_alphanumeric': 0.12226338834624453, 'fraction_numerical': 0.006736274840013472, 'mean_word_length': 5.5131578947368425, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3890789', 'n_tokens_mistral': 1256, 'n_tokens_neox': 1222, 'n_words': 362}