aboutsummaryrefslogtreecommitdiffstats
path: root/include/nvgpu/bitops.h
blob: 00336d02a4a79df4e500bbb79c8519d12ca413d5 (plain) (blame)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 * Copyright (c) 2017-2018, NVIDIA CORPORATION.  All rights reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 */
#ifndef NVGPU_BITOPS_H
#define NVGPU_BITOPS_H

#include <nvgpu/types.h>

/*
 * Explicit sizes for bit definitions. Please use these instead of BIT().
 */
#define BIT8(i)		(U8(1)  << (i))
#define BIT16(i)	(U16(1) << (i))
#define BIT32(i)	(U32(1) << (i))
#define BIT64(i)	(U64(1) << (i))

#ifdef __KERNEL__
#include <linux/bitops.h>
#include <linux/bitmap.h>
#elif defined(__NVGPU_POSIX__)
#include <nvgpu/posix/bitops.h>
#else
#include <nvgpu_rmos/include/bitops.h>
#endif

#endif /* NVGPU_BITOPS_H */
add' style='width: 0.0%;'/> -rw-r--r--SD-VBS/README4
-rw-r--r--SD-VBS/README.md2
-rw-r--r--SD-VBS/SD-VBS.docbin0 -> 148992 bytes-rw-r--r--SD-VBS/SD-VBS.pdfbin0 -> 147996 bytes-rw-r--r--SD-VBS/benchmarks/Makefile10
-rw-r--r--SD-VBS/benchmarks/disparity/Makefile5
-rw-r--r--SD-VBS/benchmarks/disparity/data/Makefile4
-rw-r--r--SD-VBS/benchmarks/disparity/data/cif/1.bmpbin0 -> 304182 bytes-rw-r--r--SD-VBS/benchmarks/disparity/data/cif/2.bmpbin0 -> 304182 bytes-rw-r--r--SD-VBS/benchmarks/disparity/data/cif/Makefile7
-rw-r--r--SD-VBS/benchmarks/disparity/data/cif/expected.m288
-rw-r--r--SD-VBS/benchmarks/disparity/data/cif/expected_C.txt288
-rw-r--r--SD-VBS/benchmarks/disparity/data/cif/lmm.txt89
-rw-r--r--SD-VBS/benchmarks/disparity/data/cif/mm.txt89
-rw-r--r--SD-VBS/benchmarks/disparity/data/cif/nomm.txt89
-rw-r--r--SD-VBS/benchmarks/disparity/data/fullhd/1.bmpbin0 -> 6220854 bytes-rw-r--r--SD-VBS/benchmarks/disparity/data/fullhd/2.bmpbin0 -> 6220854 bytes-rw-r--r--SD-VBS/benchmarks/disparity/data/fullhd/Makefile7
-rw-r--r--SD-VBS/benchmarks/disparity/data/fullhd/expected_C.txt1920
-rw-r--r--SD-VBS/benchmarks/disparity/data/qcif/1.bmpbin0 -> 81366 bytes-rw-r--r--SD-VBS/benchmarks/disparity/data/qcif/2.bmpbin0 -> 81366 bytes-rw-r--r--SD-VBS/benchmarks/disparity/data/qcif/Makefile15
-rw-r--r--SD-VBS/benchmarks/disparity/data/qcif/expected.m154
-rw-r--r--SD-VBS/benchmarks/disparity/data/qcif/expected_C.txt154
-rw-r--r--SD-VBS/benchmarks/disparity/data/sim/1.bmpbin0 -> 11718 bytes-rw-r--r--SD-VBS/benchmarks/disparity/data/sim/2.bmpbin0 -> 11718 bytes-rw-r--r--SD-VBS/benchmarks/disparity/data/sim/Makefile6
-rw-r--r--SD-VBS/benchmarks/disparity/data/sim/expected.m54
-rw-r--r--SD-VBS/benchmarks/disparity/data/sim/expected_C.txt54
-rw-r--r--SD-VBS/benchmarks/disparity/data/sim/time.txt93
-rw-r--r--SD-VBS/benchmarks/disparity/data/sim_fast/1.bmpbin0 -> 9270 bytes-rw-r--r--SD-VBS/benchmarks/disparity/data/sim_fast/2.bmpbin0 -> 9270 bytes-rw-r--r--SD-VBS/benchmarks/disparity/data/sim_fast/Makefile5
-rw-r--r--SD-VBS/benchmarks/disparity/data/sim_fast/c.txt19
-rw-r--r--SD-VBS/benchmarks/disparity/data/sim_fast/expected.m48
-rw-r--r--SD-VBS/benchmarks/disparity/data/sim_fast/expected_C.txt48
-rw-r--r--SD-VBS/benchmarks/disparity/data/sim_fast/m.txt35
-rw-r--r--SD-VBS/benchmarks/disparity/data/sqcif/1.bmpbin0 -> 36918 bytes-rw-r--r--SD-VBS/benchmarks/disparity/data/sqcif/2.bmpbin0 -> 36918 bytes-rw-r--r--SD-VBS/benchmarks/disparity/data/sqcif/Makefile8
-rw-r--r--SD-VBS/benchmarks/disparity/data/sqcif/expected.m96
-rw-r--r--SD-VBS/benchmarks/disparity/data/sqcif/expected_C.txt96
-rw-r--r--SD-VBS/benchmarks/disparity/data/test/1.bmpbin0 -> 454 bytes-rw-r--r--SD-VBS/benchmarks/disparity/data/test/2.bmpbin0 -> 454 bytes-rw-r--r--SD-VBS/benchmarks/disparity/data/test/Makefile6
-rw-r--r--SD-VBS/benchmarks/disparity/data/test/expected.m10
-rw-r--r--SD-VBS/benchmarks/disparity/data/test/expected_C.txt10
-rw-r--r--SD-VBS/benchmarks/disparity/data/vga/1.bmpbin0 -> 846774 bytes-rw-r--r--SD-VBS/benchmarks/disparity/data/vga/2.bmpbin0 -> 846774 bytes-rw-r--r--SD-VBS/benchmarks/disparity/data/vga/Makefile7
-rw-r--r--SD-VBS/benchmarks/disparity/data/vga/expected.m480
-rw-r--r--SD-VBS/benchmarks/disparity/data/vga/expected_C.txt480
-rw-r--r--SD-VBS/benchmarks/disparity/src/c/computeSAD.c27
-rw-r--r--SD-VBS/benchmarks/disparity/src/c/correlateSAD_2D.c34
-rw-r--r--SD-VBS/benchmarks/disparity/src/c/disparity.h24
-rw-r--r--SD-VBS/benchmarks/disparity/src/c/finalSAD.c28
-rw-r--r--SD-VBS/benchmarks/disparity/src/c/findDisparity.c29
-rw-r--r--SD-VBS/benchmarks/disparity/src/c/getDisparity.c43
-rw-r--r--SD-VBS/benchmarks/disparity/src/c/integralImage2D2D.c31
-rw-r--r--SD-VBS/benchmarks/disparity/src/c/padarray2.c33
-rw-r--r--SD-VBS/benchmarks/disparity/src/c/padarray4.c41
-rw-r--r--SD-VBS/benchmarks/disparity/src/c/script_disparity.c132
-rw-r--r--SD-VBS/benchmarks/localization/Makefile3
-rwxr-xr-xSD-VBS/benchmarks/localization/data/GroundData/log1_pose.txt11598
-rwxr-xr-xSD-VBS/benchmarks/localization/data/GroundData/log1_sensor.txt127357
-rwxr-xr-xSD-VBS/benchmarks/localization/data/GroundData/log1_sensor_sort.txt127357
-rw-r--r--SD-VBS/benchmarks/localization/data/Makefile3
-rw-r--r--SD-VBS/benchmarks/localization/data/cif/1.txt89
-rw-r--r--SD-VBS/benchmarks/localization/data/cif/Makefile7
-rwxr-xr-xSD-VBS/benchmarks/localization/data/cif/VBS_Ver1bin0 -> 99419 bytes-rwxr-xr-xSD-VBS/benchmarks/localization/data/cif/cifbin0 -> 99219 bytes-rw-r--r--SD-VBS/benchmarks/localization/data/cif/expected.m3
-rw-r--r--SD-VBS/benchmarks/localization/data/cif/expected_C.txt3
-rw-r--r--SD-VBS/benchmarks/localization/data/qcif/1.txt89
-rw-r--r--SD-VBS/benchmarks/localization/data/qcif/Makefile8
-rw-r--r--SD-VBS/benchmarks/localization/data/qcif/expected.m3
-rw-r--r--SD-VBS/benchmarks/localization/data/qcif/expected_C.txt3
-rw-r--r--SD-VBS/benchmarks/localization/data/sim/1.txt89
-rw-r--r--SD-VBS/benchmarks/localization/data/sim/2.txt4077
-rw-r--r--SD-VBS/benchmarks/localization/data/sim/Makefile8
-rw-r--r--SD-VBS/benchmarks/localization/data/sim/expected.m3
-rw-r--r--SD-VBS/benchmarks/localization/data/sim/expected_C.txt3
-rw-r--r--SD-VBS/benchmarks/localization/data/sim_fast/1.txt26
-rw-r--r--SD-VBS/benchmarks/localization/data/sim_fast/2.txt203
-rw-r--r--SD-VBS/benchmarks/localization/data/sim_fast/Makefile8
-rw-r--r--SD-VBS/benchmarks/localization/data/sim_fast/expected.m3
-rw-r--r--SD-VBS/benchmarks/localization/data/sim_fast/expected_C.txt3
-rw-r--r--SD-VBS/benchmarks/localization/data/sqcif/1.txt7
-rw-r--r--SD-VBS/benchmarks/localization/data/sqcif/Makefile8
-rw-r--r--SD-VBS/benchmarks/localization/data/sqcif/expected.m3
-rw-r--r--SD-VBS/benchmarks/localization/data/sqcif/expected_C.txt3
-rw-r--r--SD-VBS/benchmarks/localization/data/test/1.txt7
-rw-r--r--SD-VBS/benchmarks/localization/data/test/Makefile8
-rw-r--r--SD-VBS/benchmarks/localization/data/test/expected.m3
-rw-r--r--SD-VBS/benchmarks/localization/data/test/expected_C.txt3
-rw-r--r--SD-VBS/benchmarks/localization/data/vga/1.txt89
-rw-r--r--SD-VBS/benchmarks/localization/data/vga/Makefile7
-rw-r--r--SD-VBS/benchmarks/localization/data/vga/expected.m3
-rw-r--r--SD-VBS/benchmarks/localization/data/vga/expected_C.txt3
-rwxr-xr-xSD-VBS/benchmarks/localization/result/log1_whist.txtbin0 -> 228 bytes-rw-r--r--SD-VBS/benchmarks/localization/src/c/eul2quat.c50
-rw-r--r--SD-VBS/benchmarks/localization/src/c/generateSample.c88
-rw-r--r--SD-VBS/benchmarks/localization/src/c/get3DGaussianProb.c49
-rw-r--r--SD-VBS/benchmarks/localization/src/c/input.txt8
-rw-r--r--SD-VBS/benchmarks/localization/src/c/localization.h24
-rw-r--r--SD-VBS/benchmarks/localization/src/c/mcl.c34
-rw-r--r--SD-VBS/benchmarks/localization/src/c/quat2eul.c47
-rw-r--r--SD-VBS/benchmarks/localization/src/c/quatConj.c32
-rw-r--r--SD-VBS/benchmarks/localization/src/c/quatMul.c55
-rw-r--r--SD-VBS/benchmarks/localization/src/c/quatRot.c47
-rw-r--r--SD-VBS/benchmarks/localization/src/c/readSensorData.c63
-rw-r--r--SD-VBS/benchmarks/localization/src/c/script_localization.c534
-rw-r--r--SD-VBS/benchmarks/localization/src/c/weightedSample.c37
-rwxr-xr-xSD-VBS/benchmarks/mser/.mser.mex.c.swpbin0 -> 16384 bytes-rw-r--r--SD-VBS/benchmarks/mser/Makefile3
-rw-r--r--SD-VBS/benchmarks/mser/data/Makefile3
-rw-r--r--SD-VBS/benchmarks/mser/data/cif/1.bmpbin0 -> 278838 bytes-rw-r--r--SD-VBS/benchmarks/mser/data/cif/Makefile6
-rwxr-xr-xSD-VBS/benchmarks/mser/data/cif/VBS_Ver1bin0 -> 79632 bytes-rw-r--r--SD-VBS/benchmarks/mser/data/cif/expected.m162