mirror of
https://github.com/karpathy/llm.c.git
synced 2026-07-28 20:35:09 -04:00
Merge branch 'unistd_h_in_dev' of https://github.com/rosslwheeler/llm.c into rosslwheeler-unistd_h_in_dev
This commit is contained in:
commit
7e42c8b356
1 changed files with 21 additions and 0 deletions
21
dev/unistd.h
Normal file
21
dev/unistd.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#ifndef UNISTD_H
|
||||
#define UNISTD_H
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <math.h>
|
||||
//#define gen_max_length 64 // compile as C++ to skip this VLA issue
|
||||
#include <time.h>
|
||||
#define CLOCK_MONOTONIC 0
|
||||
int clock_gettime(int ignore_variable, struct timespec* tv)
|
||||
{
|
||||
return timespec_get(tv, TIME_UTC); // TODO: not sure this is the best solution. Need to review.
|
||||
}
|
||||
#define OMP /* turn it on */
|
||||
#include <io.h> /* needed for access below */
|
||||
#define F_OK 0
|
||||
#define access _access
|
||||
|
||||
#define TURN_OFF_FP_FAST __pragma(float_control( precise, on, push )) // Save current setting and turn on /fp:precise
|
||||
#define TURN_ON_FP_FAST __pragma(float_control(pop)) // Restore file's default settings
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue