• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IntelPython / dpctl / 13717251992

07 Mar 2025 09:01AM UTC coverage: 87.855% (-0.3%) from 88.138%
13717251992

Pull #1984

github

web-flow
Merge 5dca7bafb into 7aa6fb773
Pull Request #1984: Add support for work_group_memory extension

3159 of 3658 branches covered (86.36%)

Branch coverage included in aggregate %.

10 of 56 new or added lines in 2 files covered. (17.86%)

74 existing lines in 3 files now uncovered.

11981 of 13575 relevant lines covered (88.26%)

7122.61 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

23.53
/libsyclinterface/source/dpctl_sycl_extension_interface.cpp
1
//===---- dpctl_sycl_extension_interface.cpp - Implements C API for SYCL ext =//
2
//
3
//                      Data Parallel Control (dpctl)
4
//
5
// Copyright 2020-2025 Intel Corporation
6
//
7
// Licensed under the Apache License, Version 2.0 (the "License");
8
// you may not use this file except in compliance with the License.
9
// You may obtain a copy of the License at
10
//
11
//    http://www.apache.org/licenses/LICENSE-2.0
12
//
13
// Unless required by applicable law or agreed to in writing, software
14
// distributed under the License is distributed on an "AS IS" BASIS,
15
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
// See the License for the specific language governing permissions and
17
// limitations under the License.
18
//
19
//===----------------------------------------------------------------------===//
20
///
21
/// \file
22
/// This file implements the data types and functions declared in
23
/// dpctl_sycl_extension_interface.h.
24
///
25
//===----------------------------------------------------------------------===//
26

27
#include "dpctl_sycl_extension_interface.h"
28

29
#include "dpctl_error_handlers.h"
30
#include "dpctl_sycl_type_casters.hpp"
31

32
#include <sycl/sycl.hpp>
33

34
using namespace dpctl::syclinterface;
35

36
DPCTL_API
37
__dpctl_give DPCTLSyclWorkGroupMemoryRef
38
DPCTLWorkGroupMemory_Create(size_t nbytes)
NEW
39
{
×
NEW
40
    DPCTLSyclWorkGroupMemoryRef wgm = nullptr;
×
NEW
41
    try {
×
NEW
42
        auto WorkGroupMem = new RawWorkGroupMemory{nbytes};
×
NEW
43
        wgm = wrap<RawWorkGroupMemory>(WorkGroupMem);
×
NEW
44
    } catch (std::exception const &e) {
×
NEW
45
        error_handler(e, __FILE__, __func__, __LINE__);
×
NEW
46
    }
×
NEW
47
    return wgm;
×
NEW
48
}
×
49

50
DPCTL_API
51
void DPCTLWorkGroupMemory_Delete(__dpctl_take DPCTLSyclWorkGroupMemoryRef Ref)
NEW
52
{
×
NEW
53
    delete unwrap<RawWorkGroupMemory>(Ref);
×
NEW
54
}
×
55

56
DPCTL_API
57
bool DPCTLWorkGroupMemory_Available()
58
{
12✔
59
#ifdef SYCL_EXT_ONEAPI_WORK_GROUP_MEMORY
60
    return true;
61
#else
62
    return false;
12✔
63
#endif
12✔
64
}
12✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc