UTF-8 Last-Modified: Fri, 16 Oct 2026 23:01:40 GMT Expires: Mon, 16 Nov 2026 23:01:40 GMT nvdebug.git - Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiffstats
path: root/include/os/posix/nvlink.c
Commit message (Collapse)AuthorAge
* Include nvgpu headersJoshua Bakita2023-06-28
These are needed to build on NVIDIA's Jetson boards for the time being. Only a couple structs are required, so it should be fairly easy to remove this dependency at some point in the future.
e)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/********************************
Author: Sravanthi Kota Venkata
********************************/

/** C File **/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <math.h>
#include "timingUtils.h"
#include "sdvbs_common.h"

unsigned int * photonReportTiming(unsigned int* startCycles,unsigned int* endCycles)
{

    static unsigned int *elapsed;
    elapsed = (unsigned int*)malloc(sizeof(unsigned int)*2);
	unsigned long long start = (((unsigned long long)0x0) | startCycles[0]) << 32 | startCycles[1];
	unsigned long long end = (((unsigned long long)0x0) | endCycles[0]) << 32 | endCycles[1];
	unsigned long long diff = end - start;
	elapsed[0] = (unsigned int)(diff >> 32);
	elapsed[1] = (unsigned int)(diff & 0xffffffff);
    return elapsed;

}

/** End of C Code **/