repo_name
stringclasses
10 values
file_path
stringlengths
29
222
content
stringlengths
24
926k
extention
stringclasses
5 values
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/db/src/query11/pipe_types.hpp
#ifndef __PIPE_TYPES_H__ #define __PIPE_TYPES_H__ #pragma once #include <sycl/sycl.hpp> #include <sycl/ext/intel/fpga_extensions.hpp> #include "../db_utils/StreamingData.hpp" #include "../dbdata.hpp" using namespace sycl; // // A single row of the PARTSUPPLIER table // with a subset of the columns (needed for this ...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/db/src/query1/query1_kernel.hpp
#ifndef __QUERY1_KERNEL_HPP__ #define __QUERY1_KERNEL_HPP__ #pragma once #include <sycl/sycl.hpp> #include <sycl/ext/intel/fpga_extensions.hpp> #include "../dbdata.hpp" using namespace sycl; bool SubmitQuery1(queue& q, Database& dbinfo, DBDate low_date, std::array<DBDecimal, kQuery1OutSize>& sum_q...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/db/src/query1/query1_kernel.cpp
#include <stdio.h> #include "query1_kernel.hpp" #include "../db_utils/Accumulator.hpp" #include "../db_utils/Tuple.hpp" #include "../db_utils/Unroller.hpp" using namespace std::chrono; // how many elements to compute per cycle #if defined(FPGA_SIMULATOR) constexpr int kElementsPerCycle = 2; #else constexpr int kEle...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/decompress/src/main.cpp
#include <sycl/sycl.hpp> #include <algorithm> #include <array> #include <fstream> #include <limits> #include <numeric> #include <optional> #include <sstream> #include <string> #include <sycl/ext/intel/fpga_extensions.hpp> #include <thread> #include <type_traits> #include <utility> #include <vector> #include "constexpr...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/decompress/src/common/simple_crc32.hpp
#ifndef __SIMPLE_CRC32_HPP__ #define __SIMPLE_CRC32_HPP__ // // A simple CRC-32 implementation (not optimized for high performance). // Compute CRC-32 on 'len' elements in 'buf', starting with a CRC of 'init'. // // Arguments: // init: the initial CRC value. This is used to string together multiple // calls to...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/decompress/src/common/lz77_decoder.hpp
#ifndef __LZ77_DECODER_HPP__ #define __LZ77_DECODER_HPP__ #include <sycl/sycl.hpp> #include <sycl/ext/intel/ac_types/ac_int.hpp> #include <sycl/ext/intel/fpga_extensions.hpp> #include "common.hpp" #include "constexpr_math.hpp" // included from ../../../../include #include "metaprogramming_utils.hpp" //...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/decompress/src/common/common_metaprogramming.hpp
#ifndef __COMMON_METAPROGRAMMING_HPP__ #define __COMMON_METAPROGRAMMING_HPP__ // // Metaprogamming utility to check if a class has a boolean member named 'flag' // namespace detail { template <typename T, typename = bool> struct has_flag_bool_impl : std::false_type {}; template <typename T> struct has_flag_bool_impl<...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/decompress/src/common/byte_stacker.hpp
#ifndef __BYTE_STACKER_HPP__ #define __BYTE_STACKER_HPP__ #include <sycl/sycl.hpp> #include <sycl/ext/intel/ac_types/ac_int.hpp> #include <sycl/ext/intel/fpga_extensions.hpp> #include "constexpr_math.hpp" // included from ../../../../include #include "metaprogramming_utils.hpp" // included from ../../../../i...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/decompress/src/common/common.hpp
#ifndef __COMMON_HPP__ #define __COMMON_HPP__ #include <sycl/sycl.hpp> #include <functional> #include <iostream> #include <optional> #include <sycl/ext/intel/ac_types/ac_int.hpp> #include <sycl/ext/intel/fpga_extensions.hpp> #include "common_metaprogramming.hpp" #include "constexpr_math.hpp" // included from ../../....
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/decompress/src/gzip/gzip_metadata_reader.hpp
#ifndef __GZIP_METADATA_READER_HPP__ #define __GZIP_METADATA_READER_HPP__ #include <sycl/sycl.hpp> #include <sycl/ext/intel/ac_types/ac_int.hpp> #include <sycl/ext/intel/fpga_extensions.hpp> #include "../common/common.hpp" #include "constexpr_math.hpp" // included from ../../../../include #include "gzip_header_data....
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/decompress/src/gzip/byte_bit_stream.hpp
#ifndef __BYTE_BIT_STREAM_HPP__ #define __BYTE_BIT_STREAM_HPP__ #include <sycl/sycl.hpp> #include <sycl/ext/intel/ac_types/ac_int.hpp> #include <sycl/ext/intel/fpga_extensions.hpp> #include "constexpr_math.hpp" // included from ../../../../include // // A stream of bits that is filled with a byte at a time // // Te...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/decompress/src/gzip/gzip_header_data.hpp
#ifndef __GZIP_HEADER_DATA_HPP__ #define __GZIP_HEADER_DATA_HPP__ #include <iomanip> #include <iostream> #include <string> // // States for parsing the GZIP header // enum class GzipHeaderState { MagicNumber, CompressionMethod, Flags, Time, ExtraFlags, OS, Errata, Filename, CRC, Comment, SteadyS...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/decompress/src/gzip/huffman_decoder.hpp
#ifndef __HUFFMAN_DECODER_HPP__ #define __HUFFMAN_DECODER_HPP__ #include <sycl/sycl.hpp> #include <sycl/ext/intel/ac_types/ac_int.hpp> #include <sycl/ext/intel/fpga_extensions.hpp> #include "../common/common.hpp" #include "byte_bit_stream.hpp" #include "constexpr_math.hpp" // included from ../../../../include...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/decompress/src/gzip/gzip_decompressor.hpp
#ifndef __GZIP_DECOMPRESSOR_HPP__ #define __GZIP_DECOMPRESSOR_HPP__ #include <sycl/sycl.hpp> #include <chrono> #include <sycl/ext/intel/ac_types/ac_int.hpp> #include <sycl/ext/intel/fpga_extensions.hpp> #include "../common/byte_stacker.hpp" #include "../common/common.hpp" #include "../common/lz77_decoder.hpp" #includ...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/decompress/src/snappy/snappy_data_gen.hpp
#ifndef __SNAPPY_DATA_GEN_HPP__ #define __SNAPPY_DATA_GEN_HPP__ #include <vector> // // A function to generate compressed Snappy data for testing purposes. // Generates a file as follows: // 'num_lit_strs' literal strings of length 'lit_str_len' // 'num_copies' of length 'copy_len' and offset max(16k, lit_str_l...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/decompress/src/snappy/byte_stream.hpp
#ifndef __BYTE_STREAM_HPP__ #define __BYTE_STREAM_HPP__ #include <sycl/sycl.hpp> #include <sycl/ext/intel/ac_types/ac_int.hpp> #include <sycl/ext/intel/fpga_extensions.hpp> #include "../common/common.hpp" #include "constexpr_math.hpp" // included from ../../../../include // // A stream of bytes with capacity 'num_b...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/decompress/src/snappy/snappy_decompressor.hpp
#ifndef __SNAPPY_DECOMPRESSOR_HPP__ #define __SNAPPY_DECOMPRESSOR_HPP__ #include <sycl/sycl.hpp> #include <chrono> #include <optional> #include <sycl/ext/intel/ac_types/ac_int.hpp> #include <sycl/ext/intel/fpga_extensions.hpp> #include "../common/byte_stacker.hpp" #include "../common/common.hpp" #include "../common/l...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/decompress/src/snappy/snappy_reader.hpp
#ifndef __SNAPPY_READER_HPP__ #define __SNAPPY_READER_HPP__ #include <sycl/sycl.hpp> #include <sycl/ext/intel/ac_types/ac_int.hpp> #include <sycl/ext/intel/fpga_extensions.hpp> #include "byte_stream.hpp" #include "constexpr_math.hpp" // included from ../../../../include #include "metaprogramming_utils.hpp" /...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/crr/src/main.cpp
// ============================================================== // Copyright Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated docum...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/crr/src/CRR_common.hpp
// ============================================================== // Copyright Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated docum...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/StructuredGrids/iso3dfd_omp_offload/src/utils.cpp
//============================================================== // Copyright © 2020 Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= #include "../include/iso3dfd.h" /* * Host-Code * Utility function to get input arguments */ void Usage(const std...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/StructuredGrids/iso3dfd_omp_offload/src/iso3dfd_verify.cpp
//============================================================== // Copyright © 2020 Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= #include "../include/iso3dfd.h" /* * Host-Code * OpenMP implementation for single iteration of iso3dfd kernel. *...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/StructuredGrids/iso3dfd_omp_offload/src/iso3dfd.cpp
//============================================================== // Copyright © 2020 Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= #include <string> #include "../include/iso3dfd.h" /* * Inline device function to find minimum */ #pragma omp decl...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/StructuredGrids/iso3dfd_omp_offload/include/iso3dfd.h
//============================================================== // Copyright © 2020 Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= #include <omp.h> #include <algorithm> #include <chrono> #include <cmath> #include <cstring> #include <ctime> #includ...
h
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/CompilerInfrastructure/guided_matmul_opt_report/src/driver.c
//============================================================== // Copyright © 2020 Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= #define ROW 101 #define COL 101 #define COLBUF 0 #define COLWIDTH COL+COLBUF #define REPEATNTIMES 1000000 #include <...
c
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/CompilerInfrastructure/guided_matmul_opt_report/src/multiply.h
//============================================================== // Copyright © 2020 Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= #ifndef FTYPE #define FTYPE double #endif void matvec(int size1, int size2, FTYPE a[][size2], FTYPE b[], FTYPE x[])...
h
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/CompilerInfrastructure/guided_matmul_opt_report/src/multiply.c
//============================================================== // Copyright © 2020 Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= #include "multiply.h" void matvec(int size1, int size2, FTYPE a[][size2], FTYPE b[], FTYPE x[]) { int i, j; ...
c
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/CompilerInfrastructure/Intrinsics/src/intrin_dot_sample.cpp
/* [DESCRIPTION] * This C code sample demonstrates how to use C, Intel(R) MMX(TM), * Intel(R) Streaming SIMD Extensions 3 (Intel(R) SSE3), * Intel(R) Advanced Vector Extensions (Intel(R) AVX), and * Intel(R) Advanced Vector Extensions 2 (Intel(R) AVX2) * intrinsics to calculate the dot product of two vectors. * ...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/CompilerInfrastructure/Intrinsics/src/intrin_double_sample.cpp
/* [DESCRIPTION] * This C code sample demonstrates how to use C in * comparison with * Intel(R) Streaming SIMD Extensions 2 (Intel(R) SSE2), * Intel(R) Streaming SIMD Extensions 3 (Intel(R) SSE3), * Intel(R) Advanced Vector Extensions (Intel(R) AVX), and * Intel(R) Advanced Vector Extensions 2 (Intel(R) AVX2) * ...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/CompilerInfrastructure/Intrinsics/src/intrin_ftz_sample.cpp
/* [DESCRIPTION] * This code sample demonstrates how to use the * _MM_GET_FLUSH_ZERO_MODE() and _MM_GET_DENORMALS_ZERO_MODE() * macros to read the FTZ and DAZ flags in the control register. * * [Compile] * Windows*: icl * * Linux* and macOS*: icc -o <output file name> * * Turning off optimization changes the ...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/CompilerInfrastructure/OpenMP_Offload_Features/src/user_defined_mapper.cpp
//============================================================== // Copyright © 2021 Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= extern "C" int printf(const char *, ...); struct MyArr { int num; int *arr; }; #pragma omp declare mapper(id : M...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/CompilerInfrastructure/OpenMP_Offload_Features/src/usm_and_composability_with_dpcpp.cpp
//============================================================== // Copyright © 2021 Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= #include <omp.h> #include <sycl/sycl.hpp> #include <algorithm> #include <iostream> using namespace sycl; extern "C...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/CompilerInfrastructure/OpenMP_Offload_Features/src/class_member_functor.cpp
//============================================================== // Copyright © 2021 Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= #include <bits/stdc++.h> using namespace std; // A Functor class Inc { private: int num; public: Inc(int n) ...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/CompilerInfrastructure/OpenMP_Offload_Features/src/function_pointer.cpp
//============================================================== // Copyright © 2021 Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= #include <stdio.h> #include <string.h> #pragma omp declare target int foo(int y) { printf("called from device, y ...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/CombinationalLogic/MandelbrotOMP/src/main.cpp
//============================================================== // // Copyright 2020 Intel Corporation // // 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 wi...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/CombinationalLogic/MandelbrotOMP/src/timer.cpp
//============================================================== // // Copyright 2020 Intel Corporation // // 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 wi...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/CombinationalLogic/MandelbrotOMP/src/mandelbrot.cpp
//============================================================== // // Copyright 2020 Intel Corporation // // 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 wi...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/CombinationalLogic/MandelbrotOMP/src/mandelbrot.hpp
//============================================================== // // Copyright 2020 Intel Corporation // // 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 wi...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/CombinationalLogic/MandelbrotOMP/src/timer.hpp
//============================================================== // // Copyright 2020 Intel Corporation // // 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 wi...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/Jupyter/OpenMP-offload-training/intro/simple_solution.cpp
//============================================================== // Copyright © 2020 Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= #include <omp.h> #include <iostream> constexpr int N = 16; int main() { int is_cpu = true; int *data = static_c...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/Jupyter/OpenMP-offload-training/parallelism/main.cpp
//============================================================== // Copyright © 2020 Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= #include <omp.h> #include <stdio.h> constexpr int ARRAY_SIZE = 256; constexpr int NUM_BLOCKS = 9; int main(int arg...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/Jupyter/OpenMP-offload-training/parallelism/saxpy_func_parallel_solution.cpp
#pragma omp target map(from: is_cpu) map(from:num_teams) map(to:x[0:ARRAY_SIZE]) map(tofrom:y[0:ARRAY_SIZE]) { // 1. Add pragma to create multiple master threads use clause num_teams(NUM_BLOCKS) // and distribute loop iterations to the various master threads. #pragma omp teams distribute num_teams(NUM_BLOCKS) ...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/Jupyter/OpenMP-offload-training/parallelism/main_test.cpp
//============================================================== // Copyright © 2020 Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= #include <omp.h> #include <stdio.h> constexpr int ARRAY_SIZE = 256; constexpr int NUM_BLOCKS = 9; int main(int arg...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/Jupyter/OpenMP-offload-training/USM/main.cpp
//============================================================== // Copyright © 2020 Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= #include <omp.h> #include <stdio.h> #pragma omp requires unified_shared_memory constexpr int ARRAY_SIZE = 256; vo...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/Jupyter/OpenMP-offload-training/USM/alloc_func_solution.cpp
// Allocate Shared Memory float *x = (float *)omp_target_alloc_shared(ARRAY_SIZE * sizeof(float), deviceId); float *y = (float *)omp_target_alloc_shared(ARRAY_SIZE * sizeof(float), deviceId);
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/Jupyter/OpenMP-offload-training/USM/usm_explicit.cpp
//============================================================== // Copyright © 2020 Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= #include <omp.h> #include <stdio.h> #pragma omp requires unified_shared_memory constexpr int ARRAY_SIZE = 256; vo...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/Jupyter/OpenMP-offload-training/datatransfer/main.cpp
//============================================================== // Copyright © 2020 Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= #include <omp.h> #include <stdio.h> constexpr int ARRAY_SIZE = 256; int main(int argc, char *argv[]) { int i, j,...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/Jupyter/OpenMP-offload-training/datatransfer/saxpy_func_solution.cpp
// Add the target pragma with the map clauses here #pragma omp target map(tofrom : y) map(to : x) map(from : is_cpu) { is_cpu = omp_is_initial_device(); for (i = 0; i < ARRAY_SIZE; i++) { y[i] = a * x[i] + y[i]; } }
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/Jupyter/OpenMP-offload-training/datatransfer/main_data_region.cpp
//============================================================== // Copyright © 2020 Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= #include <omp.h> #include <stdio.h> constexpr int ARRAY_SIZE = 256; void init1(float *x, int N) { for (int i = 0...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/Jupyter/OpenMP-offload-training/datatransfer/saxpy_func_solution_length.cpp
// Add the target pragma with the map clauses here #pragma omp target map(tofrom: y[0:ARRAY_SIZE]) map(to: x[0:ARRAY_SIZE]) map(from: is_cpu) { is_cpu = omp_is_initial_device(); for (i = 0; i < ARRAY_SIZE; i++) { y[i] = a * x[i] + y[i]; } }
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/Jupyter/OpenMP-offload-training/datatransfer/main_test.cpp
//============================================================== // Copyright © 2020 Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= #include <omp.h> #include <stdio.h> constexpr int ARRAY_SIZE = 256; int main(int argc, char *argv[]) { int i, j,...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/Jupyter/OpenMP-offload-training/datatransfer/target_data_region_solution.cpp
// Solution Using Target Data #pragma omp target data map(tofrom : x) { #pragma omp target map(to : y) { for (int i = 0; i < ARRAY_SIZE; i++) x[i] += y[i]; } init2(y, ARRAY_SIZE); #pragma omp target map(to : y) { for (int i = 0; i < ARRAY_SIZE; i++) x[i] += y[i]; } } // Solution Using Target Enter...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/ParallelPatterns/openmp_reduction/src/main.cpp
//============================================================== // Copyright © 2020 Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= #include <iomanip> // setprecision library #include <iostream> // dpc_common.hpp can be found in the dev-utilities ...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++/GraphTraversal/MergesortOMP/src/merge_sort.cpp
#define _CRT_SECURE_NO_DEPRECATE #include <omp.h> #include <algorithm> #include <chrono> #include <iostream> constexpr int task_threshold = 5000; constexpr int n = 100000000; // Description: // Initializes the array, and shuffle all elements in it. // // [in]: a Array to be initialized. // n Leng...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/Common/helper_timer.h
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of condi...
h
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/Common/helper_string.h
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of condi...
h
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/Common/helper_image.h
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of condi...
h
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/Common/exception.h
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of condi...
h
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/Common/helper_cuda.h
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of condi...
h
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/Common/helper_functions.h
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of condi...
h
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/Samples/5_Domain_Specific/quasirandomGenerator/quasirandomGenerator_common.h
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of condi...
h
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/Samples/5_Domain_Specific/quasirandomGenerator/quasirandomGenerator_gold.cpp
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of condi...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/Samples/5_Domain_Specific/quasirandomGenerator/quasirandomGenerator.cpp.dp.cpp
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of condi...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/Samples/5_Domain_Specific/quasirandomGenerator/quasirandomGenerator_kernel.dp.cpp
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of condi...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/include/dpct/ccl_utils.hpp
//==---- ccl_utils.hpp----------------------------*- C++ -*----------------==// // // Copyright (C) Intel Corporation // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // See https://llvm.org/LICENSE.txt for license information. // //===----------------------------------------------------------------------===/...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/include/dpct/util.hpp
//==---- util.hpp ---------------------------------*- C++ -*----------------==// // // Copyright (C) Intel Corporation // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // See https://llvm.org/LICENSE.txt for license information. // //===----------------------------------------------------------------------===...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/include/dpct/image.hpp
//==---- image.hpp --------------------------------*- C++ -*----------------==// // // Copyright (C) Intel Corporation // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // See https://llvm.org/LICENSE.txt for license information. // //===----------------------------------------------------------------------===...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/include/dpct/kernel.hpp
//==---- kernel.hpp -------------------------------*- C++ -*----------------==// // // Copyright (C) Intel Corporation // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // See https://llvm.org/LICENSE.txt for license information. // //===----------------------------------------------------------------------===...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/include/dpct/dpct.hpp
//==---- dpct.hpp ---------------------------------*- C++ -*----------------==// // // Copyright (C) Intel Corporation // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // See https://llvm.org/LICENSE.txt for license information. // //===----------------------------------------------------------------------===...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/include/dpct/dnnl_utils.hpp
//==---- dnnl_utils.hpp ---------------------------*- C++ -*----------------==// // // Copyright (C) Intel Corporation // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // See https://llvm.org/LICENSE.txt for license information. // //===----------------------------------------------------------------------===...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/include/dpct/lapack_utils.hpp
//==---- lapack_utils.hpp -------------------------*- C++ -*----------------==// // // Copyright (C) Intel Corporation // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // See https://llvm.org/LICENSE.txt for license information. // //===----------------------------------------------------------------------===...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/include/dpct/fft_utils.hpp
//==---- fft_utils.hpp ----------------------------*- C++ -*----------------==// // // Copyright (C) Intel Corporation // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // See https://llvm.org/LICENSE.txt for license information. // //===----------------------------------------------------------------------===...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/include/dpct/lib_common_utils.hpp
//==---- lib_common_utils.hpp ---------------------*- C++ -*----------------==// // // Copyright (C) Intel Corporation // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // See https://llvm.org/LICENSE.txt for license information. // //===----------------------------------------------------------------------===...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/include/dpct/sparse_utils.hpp
//==---- sparse_utils.hpp -------------------------*- C++ -*----------------==// // // Copyright (C) Intel Corporation // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // See https://llvm.org/LICENSE.txt for license information. // //===----------------------------------------------------------------------===...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/include/dpct/device.hpp
//==---- device.hpp -------------------------------*- C++ -*----------------==// // // Copyright (C) Intel Corporation // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // See https://llvm.org/LICENSE.txt for license information. // //===----------------------------------------------------------------------===...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/include/dpct/memory.hpp
//==---- memory.hpp -------------------------------*- C++ -*----------------==// // // Copyright (C) Intel Corporation // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // See https://llvm.org/LICENSE.txt for license information. // //===----------------------------------------------------------------------===...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/include/dpct/dpl_utils.hpp
//==---- dpl_utils.hpp ----------------------------*- C++ -*----------------==// // // Copyright (C) Intel Corporation // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // See https://llvm.org/LICENSE.txt for license information. // //===----------------------------------------------------------------------===...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/include/dpct/math.hpp
//==---- math.hpp ---------------------------------*- C++ -*----------------==// // // Copyright (C) Intel Corporation // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // See https://llvm.org/LICENSE.txt for license information. // //===----------------------------------------------------------------------===...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/include/dpct/blas_utils.hpp
//==---- blas_utils.hpp----------------------------*- C++ -*----------------==// // // Copyright (C) Intel Corporation // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // See https://llvm.org/LICENSE.txt for license information. // //===----------------------------------------------------------------------===...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/include/dpct/atomic.hpp
//==---- atomic.hpp -------------------------------*- C++ -*----------------==// // // Copyright (C) Intel Corporation // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // See https://llvm.org/LICENSE.txt for license information. // //===----------------------------------------------------------------------===...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/include/dpct/rng_utils.hpp
//==---- rng_utils.hpp ----------------------------*- C++ -*----------------==// // // Copyright (C) Intel Corporation // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // See https://llvm.org/LICENSE.txt for license information. // //===----------------------------------------------------------------------===...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/include/dpct/dpl_extras/numeric.h
//==---- numeric.h --------------------------------*- C++ -*----------------==// // // Copyright (C) Intel Corporation // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // See https://llvm.org/LICENSE.txt for license information. // //===----------------------------------------------------------------------===...
h
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/include/dpct/dpl_extras/iterators.h
//==---- iterators.h ------------------------------*- C++ -*----------------==// // // Copyright (C) Intel Corporation // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // See https://llvm.org/LICENSE.txt for license information. // //===----------------------------------------------------------------------===...
h
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/include/dpct/dpl_extras/algorithm.h
//==---- algorithm.h ------------------------------*- C++ -*----------------==// // // Copyright (C) Intel Corporation // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // See https://llvm.org/LICENSE.txt for license information. // //===----------------------------------------------------------------------===...
h
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/include/dpct/dpl_extras/memory.h
//==---- memory.h ---------------------------------*- C++ -*----------------==// // // Copyright (C) Intel Corporation // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // See https://llvm.org/LICENSE.txt for license information. // //===----------------------------------------------------------------------===...
h
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/include/dpct/dpl_extras/vector.h
//==---- vector.h ---------------------------------*- C++ -*----------------==// // // Copyright (C) Intel Corporation // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // See https://llvm.org/LICENSE.txt for license information. // //===----------------------------------------------------------------------===...
h
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/include/dpct/dpl_extras/dpcpp_extensions.h
//==---- dpcpp_extensions.h ------------------*- C++ -*---------------==// // // Copyright (C) Intel Corporation // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // See https://llvm.org/LICENSE.txt for license information. // //===----------------------------------------------------------------===// #ifndef ...
h
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/02_sycl_migrated_optimized/include/dpct/dpl_extras/functional.h
//==---- functional.h -----------------------------*- C++ -*----------------==// // // Copyright (C) Intel Corporation // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // See https://llvm.org/LICENSE.txt for license information. // //===----------------------------------------------------------------------===...
h
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/01_dpct_output/Common/helper_timer.h
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of condi...
h
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/01_dpct_output/Common/helper_string.h
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of condi...
h
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/01_dpct_output/Common/helper_image.h
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of condi...
h
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/01_dpct_output/Common/exception.h
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of condi...
h
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/01_dpct_output/Common/helper_cuda.h
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of condi...
h
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/01_dpct_output/Common/helper_functions.h
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of condi...
h
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/01_dpct_output/Samples/5_Domain_Specific/quasirandomGenerator/quasirandomGenerator_common.h
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of condi...
h
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/01_dpct_output/Samples/5_Domain_Specific/quasirandomGenerator/quasirandomGenerator_gold.cpp
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of condi...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/01_dpct_output/Samples/5_Domain_Specific/quasirandomGenerator/quasirandomGenerator.cpp.dp.cpp
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of condi...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/01_dpct_output/Samples/5_Domain_Specific/quasirandomGenerator/quasirandomGenerator_kernel.dp.cpp
/* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of condi...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/01_dpct_output/include/dpct/ccl_utils.hpp
//==---- ccl_utils.hpp----------------------------*- C++ -*----------------==// // // Copyright (C) Intel Corporation // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // See https://llvm.org/LICENSE.txt for license information. // //===----------------------------------------------------------------------===/...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL/MapReduce/guided_quasirandomGenerator_SYCLMigration/01_dpct_output/include/dpct/util.hpp
//==---- util.hpp ---------------------------------*- C++ -*----------------==// // // Copyright (C) Intel Corporation // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // See https://llvm.org/LICENSE.txt for license information. // //===----------------------------------------------------------------------===...
hpp